Shortcode in function not working for me after 4.17.0 update

Support General Shortcode in function not working for me after 4.17.0 updateResolved

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #13993
    BrianBrian
    Participant

    Hi -
    Since the most recent update of Meta Box 4.17.0 - my do_shortcode function has stopped working / not displaying. This is what I currently have in my functions.php file:

    https://ghostbin.com/paste/rnqqu/raw

    What do I need to change for it to continue working as before?

    Thanks in advance!

    #13997
    Anh TranAnh Tran
    Keymaster

    Hi Brian,

    I've just tested the code and it works fine to me. I modified the code a little bit to work for my test (as I don't have your hook, I use the_content, everything else is the same):

    https://ghostbin.com/paste/fn24m

    Here is my screenshots:

    https://screenshots.firefox.com/iwwS8S5VJn85bYN6/localhost
    https://screenshots.firefox.com/3coKCuQPHAxCyH00/localhost

    #14012
    BrianBrian
    Participant

    Hi Anh,
    Thanks for the reply. It's still is not working for me on my end. I'll try to explain better.

    It seems that the shortcodes are getting stripped out. When I change do_shortcode('[rwmb_meta id="tour_duration"]') to esc_html( $duration ) then my values display correctly again. See screenshot: https://cl.ly/2d608aa78e1b

    Why would that be the case?

    The shortcodes work fine on their own when adding directly to the tour page. But my hook is displaying these values in a grid display ( a custom visual composer post type grid module).

    Is there something I need to adjust so that the shortcodes don't get stripped out?

    Thanks in advance!

    #14021
    Anh TranAnh Tran
    Keymaster

    Hi Brian,

    If the shortcode works fine on their own somewhere else, then it works.

    In this case, the problem might come from how the post type grid module works. I have no idea about this.

    Can you try var_dump the value of do_shortcode('[rwmb_meta id="tour_date"]') in the function, just to see if it returns correct value?

    #14040
    BrianBrian
    Participant

    Hi Anh,
    Thanks for the reply. I'm not familiar with the proper way to use the var_dump. I tried a few things but each time got: null (maybe using it wrong?).

    Anyway I can tell you that your shortcodes were previously working before in the function. Nothing changed - there was no theme or plugin updates. Only thing that updated was the metabox plugin. That's when it stopped working.

    Thanks

    #14041
    Anh TranAnh Tran
    Keymaster

    Hi Brian, can you send me a temporary admin account to check that? Maybe the problem is somewhere else.

    #14205
    BrianBrian
    Participant

    Hi Anh,
    Ok I sent you the site info for you to take a look. Let me know what you find.
    Thanks!

    #14206
    Anh TranAnh Tran
    Keymaster

    Hi Brian,

    Thanks a lot for your info! I've figured it out and fixed on your site. The fix is also added in the plugin.

    #14209
    BrianBrian
    Participant

    Hi Anh,
    Excellent - thanks for looking into this for me.
    Thanks again!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.