Blocks with SVG icon become invalid when I’m not logged in as admin
-
Just checking if this is a known bug, or if another plugin could be messing things up.
When I create a Marketing button with your plugin and give it an SVG icon, everything works fine as long as I’m an administrator.
But, if I try to edit the block with another user role (FYI: it’s a custom role with admin capabilities as well), and save the block. Everything seems fine at first, but when I visit the front-end the SVG icon is gone. After inspection I see that the actual svg element is missing (it got stripped out during save I assume.) When I revisit the editor-screen the block now gives me the “invalid block” message. When I check the console I see that this is because gutenberg is expecting to get the block with the svg-element, but it was saved without svg-element. When I click “restore block” the block is restored in the editor and the svg icon reappears. However, when I save the post again and visit the front-end the svg icon is stripped away again.. Any idea what could be the cause?
- The topic ‘Blocks with SVG icon become invalid when I’m not logged in as admin’ is closed to new replies.