There seems to be an issue with a particular block I am exporting. It isn’t doing this with any of my other blocks, but I cannot seem to find a fix. When I load wordpress using Local I get this error. I’m also using one of the bootstrap blocks as a template and only made minor changes to the structure.
Parse error : syntax error, unexpected token “/” in C:\Users\Simeo\Local Sites\living-waters\app\public\wp-content\themes\Living Waters Theme\blocks\meet-the-pastor\meet-the-pastor_register.php on line 15
Here is the code to the block…
I’ve seen certain SVGs cause issues with exported blocks, but never took the time to figure out the common denominator. Can you post the generated JS or PHP code from the block so the Pinegrow team can take a peek at what’s getting messed up?
Here is the php file that it says is causing the issue.
I just replied with the php registration file that is says is the issue.
Hey @aussieaudio, the screenshot doesn’t show the line with the SVG. You can paste the code using markdown. Alternatively, try removing the offending SVG or the xmlns attribute that the error message is referencing and see if that makes any difference.
@aussieaudio the error is most likely caused by the () used in the image name:
Pinegrow interprets () as a function call and therefore does not enclose the string in quotes. Renaming the image should take care of it. In the meantime I’ll check if there if we can somehow make this logic better.
Thanks! I just thought since it was literally a drag and drop from the bootstrap blocks that it would be ok. Oddly it also works elsewhere with other blocks I did the exact same way
This was it. For some reason it was causing issues. The wordpress error indicated that it causes an issue in the register file, not the actual block .php file.