Special characters on text type on Xml config file?

Started by gjordan, May 03, 2023, 19:09:27 PM

Previous topic - Next topic

gjordan

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

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

gjordan

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?

GJC Web Design

It needs to be fixed within VM... although you don't say what version your using - maybe already fixed?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

gjordan

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

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ssc3

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.
Virtuemart Payment Plugins
https://plugins.online-store.co.uk

gjordan

Thanks both for your replies, will check the suggestions