-
newslang
Hi,
I don’t know if you ever witnessed this, but it occured to me around a month ago on a client’s website : when I saved a page, everything was fine on the backend (if I stayed on the edit page view) but on the frontend all the icons (SVGs) had disappeared.
But if I left the edit page and edited the page again, all icons were gone on the backend too. I needed to get an older revision in order to restore this content (and in the revision, we see the removed SVG in the diffs).
One of my client had this problem yesterday and again today. He tested this by previewing the page before publishing it and, even in the preview, the icons were already gone.
I tried to reproduce this on their website today but I was unable to.
Do you have any idea what could cause this problem on 2 distinct websites ?
-
Hi there,
I’ve never seen or heard of this issue.
It sounds like something a security plugin would do. Can you try disabling all plugins except the block plugin you are using to test?
-
newslang
Hi,
I’ve looked around and found this support question :
https://wordpress.org/support/topic/svg-content-get-deleted/And this potential fix :
https://mkaz.blog/wordpress/allowing-svg-in-wordpress-contentBut this is really weird since it should not allow any SVG to be saved inside of the content. So I believe your plugin is already doing this to avoid losing SVGs upon saving.
I told my client to test it since I cannot reproduce this issue myself. I don’t have a security plugin, and I since it’s hard to reproduce and I would need to create a dev environment to try disabling the plugin, I’ll see if this fix it or not.
Maybe adding this code to my theme overrides any of the plugins malfunctions.
-
Alvind
Hi there,
This issue can occur if the user role managing the content with the SVG isn’t an Administrator. SVG uploads are restricted to administrators for security reasons, which is how GenerateBlocks handles them. Check the user account role, if it’s not set an Administrator, that might be the cause.
- You must be logged in to reply to this topic.