VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: gjordan on May 03, 2023, 19:09:27 PM

Title: Special characters on text type on Xml config file?
Post by: gjordan on May 03, 2023, 19:09:27 PM
Hi, I'm using VirtueMart 4, the thing is I'm kinda new to developing on VirtueMart, and I was trying to save an Api key
on my plugin config xml file, then I notice the normal text content is saved as it should, but if I use "|" in the content of the Api Key then the field is not saved.
Can someone tell me how to fix this? Or where could I look for information on how VirtueMart save the config fields.
I was looking on the docs and I could not find anything related, thanks
Title: Re: Special characters on text type on Xml config file?
Post by: GJC Web Design on May 03, 2023, 21:41:31 PM
see this one - related..  https://forum.virtuemart.net/index.php?topic=150030.0
Title: Re: Special characters on text type on Xml config file?
Post by: gjordan on May 04, 2023, 06:17:12 AM
Yes
Quote
Quote from: GJC Web Design on May 03, 2023, 21:41:31 PM
see this one - related..  https://forum.virtuemart.net/index.php?topic=150030.0
Yes, I read that before posting, as you could saw, nobody gave a solution or suggestion, I'm trying with my own fieldset file, yet without look. Is not a Joomla issue as Joomla plugins save that kind of characters, of course we should not change the core, so maybe someone could tell me how to process the request before the xml file is sended to the DB?
Title: Re: Special characters on text type on Xml config file?
Post by: GJC Web Design on May 04, 2023, 10:49:58 AM
It needs to be fixed within VM... although you don't say what version your using - maybe already fixed?
Title: Re: Special characters on text type on Xml config file?
Post by: gjordan on May 05, 2023, 00:15:50 AM
Quote from: GJC Web Design on May 04, 2023, 10:49:58 AM
It needs to be fixed within VM... although you don't say what version your using - maybe already fixed?
Thanks for your reply, so it's kind a bug, I was thinking there is only one version of VM4, I'm using the VirtueMart 4.0.14 10805 the latest from the download page, anyway if you know wish function it's using maybe I could take a look and see if I could override the class
Title: Re: Special characters on text type on Xml config file?
Post by: GJC Web Design on May 05, 2023, 11:21:18 AM
looking at VM4.0.20 the function is the same as discussed in the post https://forum.virtuemart.net/index.php?topic=150030.0

it's around line 609

So until fixed maybe set the code back to what is was or save/grab  the parameter directly form the DB as roger suggests
Title: Re: Special characters on text type on Xml config file?
Post by: ssc3 on May 05, 2023, 11:31:20 AM
The payment parameters are stored as a sting in the database using the pipe symbol "|" as a delimiter or separator for the payment parameters

It's possible to save a pipe symbol, but not read it back.

Seems to effect all versions of Virtuemart. Tried with an old VirtueMart 3.2.4 and got the same result.   Looks like it has always been there but no one has noticed.

The other problem with the equal = sign seems to be a separate issue.
Title: Re: Special characters on text type on Xml config file?
Post by: gjordan on May 09, 2023, 21:35:25 PM
Thanks both for your replies, will check the suggestions