• Resolved Giorgio25b

    (@giorgio25b)


    There is no rendering of the shortcode and this error is displayed in console:

    Source map error: Error: JSON.parse: unexpected character at line 7 column 1 of the JSON data
    Resource URL: https://booking.roomcloud.net/be/js/ekko-lightbox.min.js
    Source Map URL: ekko-lightbox.js.map

    Is there a fix? It seems that the plugin hasn’t been updated for a while now.

    Thank you

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Giorgio25b

    (@giorgio25b)

    There is a + sign in front of the
    +function ($) {
    at ekko-lightbox.min.js

    Is it going to be fixed? Is the plugin maintained at all?
    Please advise, thank you.

    Thread Starter Giorgio25b

    (@giorgio25b)

    Shortcode does work! I missed the part where it needs the space between the words roomlcoud and hotel:

    [roomcloud hotel=’###’]

    In regards of the +function(){}; my bad! I missed the part where:

    `It forces the parser to treat the part following the + as an expression. This is usually used for functions that are invoked immediately, e.g.:

    +function() { console.log(“Foo!”); }();

    Without the + there, if the parser is in a state where it’s expecting a statement (which can be an expression or several non-expression statements), the word function looks like the beginning of a function declaration rather than a function expression and so the () following it (the ones at the end of the line above) would be a syntax error (as would the absense of a name, in that example). With the +, it makes it a function expression, which means the name is optional and which results in a reference to the function, which can be invoked, so the parentheses are valid.

    + is just one of the options. It can also be -, !, ~, or just about any other unary operator. Alternately, you can use parentheses (this is more common, but neither more nor less correct syntactically):

    (function() { console.log(“Foo!”); })();
    // or
    (function() { console.log(“Foo!”); }());`

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcode doesn’t work’ is closed to new replies.