• Resolved polarracing

    (@polarracing)


    Hi,

    after the latest update the previously working syntax <Shortcode my-shortcode /> is causing an error-message in the template editor (Unclosed “div” Tag).

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey @polarracing, I just ran a quick test with a simple shortcode in the latest version of L&L and I’m not seeing any errors using the standard syntax you’re using here. I wonder if this is specific to the shortcode you’re using. Could you confirm that this shortcode is working correctly on its own (using the standard WP shortcode syntax on a page instead of using L&L)? Could you also provide more information about what shortcode you’re using?

    Thread Starter polarracing

    (@polarracing)

    It only happens when the tag is wrapped into an other tag like <div></div> or <Note></Note>.

    See Tangliable Forum – I posted screenshots there.

    Hi @polarracing, I’m following up on this issue before I close this thread based on your discussion with Eliot on the Tangible forum. It seems that this error is appearing because the code editor’s “linter” (which checks for correct syntax in L&L) doesn’t seem to know that <Shortcode some_shortcode /> is a self-closing tag. We’ll get rid of this unnecessary error message in the next update. For now though, it seems you (and anyone else experiencing this issue) could get rid of the error by writing out your syntax with an opening and closing tag, like <Shortcode some_shortcode></Shortcode>, but that’s not necessary if you’re happy to simply ignore the false error message instead. This is purely an issue with the code editor’s automatic check to see if you’ve made any syntax errors and isn’t an indication of an actual problem with your syntax. You could safely use the normal self-closing tag syntax and your template/shortcode should still work as expected.

    Thread Starter polarracing

    (@polarracing)

    Hi,
    sure this is only a minor issue – just wanted to make you aware.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shortcode creating error in template editor’ is closed to new replies.