Hello,
I encounter on several sites the same problem with custom fields containing SVG code.
Indeed, most of the time on the sites that I develop, I provide the administrator with repeatable (or not) custom fields to generate blocks, for example (Title + Photo or SVG code + destination URL).
So my clients can themselves manage the sections to which their visitors are directed.
However, I encounter a recurring problem when it comes to using SVG code.
Indeed, instead of using images, most of the time, I use pictograms in SVG code (which I get from a notepad for example). So I insert the SVG code in my "Single Line" or "Multiple Line" fields and, when the page is saved, the picto appears on the site.
But if I ever come back a 2nd time in the administration of the page to modify, in another place, text for example (in the native WYSIWYG of WordPress for example or in a custom field of Toolset) and that I save this page --> there all the SVG codes of my fields disappear (???) and I have to go back to insert them in the fields. And if someone updates the page: the SVG codes disappear again..
Any solution ?
Quentin
Hi Quentin,
Thank you for contacting us and I'd be happy to assist.
I've performed some tests on my website with the regular SVG images and couldn't reproduce this issue. But, I'm not sure exactly in which form you're using the pictograms.
Can you please share temporary admin login details of a staging website, with some example code, so that I can see and reproduce the issue?
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
regards,
Waqar
Thank you for sharing these details.
When I checked your website's homepage, none of the "pictogramme" fields in the "Bloc Rassurant" repeating field group had any code for the SVG image.
The code that you shared in the message was showing some error, so I've used the SVG code for the image from the purple box on the homepage, but couldn't reproduce the issue either on your website or on my test website.
On my test website, I tested that SVG code in a regular multiple line field as well as in a multiple line field added inside a repeating field group. But after making changes to the content, the code in those fields remains unchanged.
Would it be possible for you to capture and share a short video showing the exact steps of the edits, which result in the lost code?
I can't reproduce the bug this morning 😅, it's amazing..
In general, it was enough to update any other field to make the field containing SVG code "disappear".
Is it possible to close/reopen this same ticket when I manage to re-simulate the bug?
Thanks for your follow up.
Thanks for the update and glad that this is no longer reproducible.
In case, this issue resurfaces, you're welcome to start a new ticket and include this ticket's link in it. This way, we'll know about the background.