Fatal single quote error in Meta Box 5.7.3 and AIO 1.21.2

Support General Fatal single quote error in Meta Box 5.7.3 and AIO 1.21.2Resolved

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #42346
    ArnoArno
    Participant

    Hello,

    Since upgrading to Meta Box 5.7.3 and Meta Box AIO 1.21.2, several Views throw fatal errors. I have narrowed it down to Views rendering shortcodes. If the output of the shortcode contains single quotes, Meta Box throws an error. It worked fine prior to the upgrade. I need a quick fix because many pages on our site are broken now.

    There are two issues:

    1) Meta Box no longer understands single quotes.

    For example, this line in my custom shortcode:
    $return_html = $return_html . '<div><button onclick="window.open(\'' . $file_url . '\', \'_blank\')">text</button></div>';

    throws this error if rendered in a Meta Box View:
    "Fatal error: Uncaught eLightUp\Twig\Error\SyntaxError: Unexpected token "name" of value "https" ("end of statement block" expected)"

    If I change the line to this, the error is gone and it renders fine, but of course, the onclick does not work because I need single quotes:
    $return_html = $return_html . '<div><button onclick="window.open(\"' . $file_url . '\", \"_blank\")">text</button></div>';

    2) Shortcodes are executed even when commented out.

    Setting a string to a shortcode name and commenting it out still throws an error if there is a problem with that shortcode. The shortcode is executed even though it is commented out.
    {# set shortcode_string = '[shortcode_name]' #}

    This may not be related to problem 1, and perhaps it's not a new issue in this version, but it made debugging harder.

    Thanks,
    Arno

    #42352
    A.A.
    Participant

    Hello.

    I have a similar problem as the original poster described above.

    The June 23 updates have broken my website. I did not receive any error messages, but all shortcodes used within my MB Views have stopped working.

    I was not able to find an older version of Metabox AIO to rollback to for a temporary fix. So please address this as soon as possible.

    Summary:
    Views are not rendering shortcodes for some reason. Webpages using Views display everything but shortcodes (that they used to display before the update).

    #42355
    AJ TatumAJ Tatum
    Participant

    Yea, it seems like Meta Box really dropped the ball on testing this version thoroughly.

    #42363
    Anh TranAnh Tran
    Keymaster

    Hi Arno,

    I'm trying to replicate the bug on my localhost but I don't see the error. I recorded a screencast, please take a look:

    https://mega.nz/file/rvgFFAbL#DRCDlXxp4MIdjAx37dpL6T0v2W_DPXavAv42GeSGTns

    #42366
    ArnoArno
    Participant

    Hi Anh Tran,

    Thanks for trying that. I have e-mailed more details and login credentials to my staging site. Please confirm if you have received that.

    Kind regards,
    Arno

    #42371
    Anh TranAnh Tran
    Keymaster

    Hi Arno,

    I got the details. Let me check that.

    #42383
    ArnoArno
    Participant

    This is solved in Meta Box AIO 1.21.3.

    @Anh: thanks for your help. Please make sure that new Meta Box releases are tested on larger more complex websites. That will prevent a lot of trouble.

    #42511
    Jeremy ParrottJeremy Parrott
    Participant

    Same issue here. I had a critical error for all my template pages/views for my data. Looking for confirmation when we can safely update the plugin. I don't need anything now but I am posting to keep track of the responses.

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