• Resolved Iacopo

    (@iacopoincerpi)


    Hi, when I try to reactivate this code snippet show this error
    Unclosed '{' on line 1
    Before was activated. What’s appened?

    This is the php code:

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @iacopoincerpi,

    Thank you for sharing the screenshot, I can’t replicate this issue on my end with the PHP code you shared. Have you changed the server PHP version recently by any chance?

    Is the end of the snippet correctly formatted to close the opening {?

    Do you have other PHP snippets active that might be interfering here somehow?

    Thread Starter Iacopo

    (@iacopoincerpi)

    Already tried to close, same result. In other website the same code work (same version of php and same codesnippet version)

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @iacopoincerpi,

    That’s not going to work and I’m not sure how it worked before but you need to close the add_action and the function, basically you need to add the line highlighted in the screenshot at the end: https://a.supportally.com/i/HXOQGI

    Thread Starter Iacopo

    (@iacopoincerpi)

    Now working on that site.

    But in other site still work activated like this…

    Plugin Author Mircea Sandu

    (@gripgrip)

    @iacopoincerpi – I’m not sure how that works but I’d recommend updating the code for both versions. Alternatively, you can simply remove all the PHP part and use an HTML snippet with the auto-insert location set to Site Wide Header and it will work the same but with no risk of a PHP error from the snippet.

    Thread Starter Iacopo

    (@iacopoincerpi)

    Thanks for the help, appreciated

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unclosed ‘{‘ on line 1’ is closed to new replies.