Viewing 6 replies - 1 through 6 (of 6 total)
  • I’m having the same problem. Did you figure anything out?

    Plugin Contributor ryanv12

    (@ryanv12)

    I’m not seeing this error at the moment, did you find a way to fix it?

    Oh, I did! I believe it was from wpautop which happens even when using the ‘text’ tab of the WYSIWYG editor. I was using ACF and used a text area field instead of the WYSIWYG to avoid the issue. In other words, it seems that wrapping the embed code in a <p> causes the error.

    Also – that’s using the raw embed code, not the plugin.

    Plugin Contributor ryanv12

    (@ryanv12)

    Was the raw embed code placed inside the post editor? It would make sense then because those editors usually escape certain characters and break the syntax of the script.

    Essentially, yes – I was using a WYSIWYG custom field through Advanced Custom Fields, but I’d imagine it acts the same way. wpautop isn’t run on the text area field type, so I think that’s what fixed it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘"Uncaught SyntaxError: Unexpected token’ is closed to new replies.