• I used 2 Shortcoder shortcodes when generating an event using another plugin and it’s causing the page to timeout.

    Contact us by [sc name="whatsapp-icon"][/sc] or [sc name="email-icon"][/sc].

    The developer of the Events Made Easy plugin looked into it and said: “Seems to be a bug in the shortcoder plugin. If I create the 2 shortcodes manually in functions.php , it works fine”.

    “it has something to do with the call to do_shortcode on that text. It seems it can cause a loop (and the loop actually happens in do_shortcode, not in EME), but I don’t know why … it doesn’t cause a loop when in the event body nor when I create 2 shortcodes (via functions.php in the theme) and use those in the title.”

    Can you please look into why this is happening?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author vaakash

    (@vaakash)

    Hi,

    Could you please share details on where exactly the shortcodes are inserted?

    Please share details as much possible so that it can help me reproduce the issue on my test setup.

    Thanks

    As the author of the Events Made Easy plugin: I use the filter “the_title” to change the title of an event and call do_shortcode on it too (since it might contain a shortcode).
    In your plugin you call get_the_title (“meta_by_id” function) and I’m guessing that’s where all the recursion starts …
    I tried putting this line 172 in comment in includes/metadata.php:

                //'title' => get_the_title( $id ),

    and then it seems to be ok. So it is a recursion, but I have no idea on how to fix this …

    Plugin Author vaakash

    (@vaakash)

    Hi Franky,

    The plugin has feature to replace placeholders with the title of the post. So it calls get_the_title.

    If a shortcode is used inside title of a post, then it can lead to recursion.

    Solution should be to comment out the line like above, take a different approach on how this function is called or avoid using shortcodes in post titles.

    Thanks,

    Aakash

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Page timing out when 2 shortcodes are used’ is closed to new replies.