Skip Navigation

[Resolved] SVG code disappears in custom fields

This support ticket is created 2 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 2 voices.

Last updated by Waqar 2 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#2453069

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

#2453557

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

#2455613

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?

#2456099

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.

#2456117

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.