• Resolved t.inoue

    (@tinoue)


    Thanks for the great plugin.
    The following error occurs when uploading to version 2.2.2 under PHP7.2.

    Parse error: syntax error, unexpected ‘)’ in /wp-content/plugins/easy-fancybox/inc/class-easyfancybox-admin.php on line 693

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author FirelightWP

    (@firelightwp)

    Hi! Thanks for the report. This one is puzzling.

    Normally, if that error existed, it should be there for everyone (the PHP version should not affect it). I just had a look at line 693 in that file, and there is not an extra parenthesis there (there is a closing parenthesis, but it is needed). I tried it against PHP 7 too, just to be sure.

    Can I ask how you uploaded – did you click update from your WP dashboard or download a zip and upload manually?

    I had prepped a change to apply PHP coding standards to this file. I was going to put that in the next release, but just as a safety measure, I will prepare a release with that shortly and deploy. In that file, both myself and PHP coding standards agree there are no issues.

    Hopefully that will resolve things for you. If not, I may ask if there any chance you can copy the lines of code around that line in your version of the plugin so I can see them. But we can hold on that until after this release..

    That release should go out in the next hour.

    Plugin Author FirelightWP

    (@firelightwp)

    Oh, in the meantime, if that error is blocking your site, you can try re-downloading the plugin from the www.ads-software.com page, and uploading. It will ask you if you want to override the plugin files – just say yes. That will double check you have all the right files and nothing went odd in your last update.

    1callservice

    (@1callservice)

    We are getting this Fatal Error now as well since the update. Same unexpected ‘)’ error

    1callservice

    (@1callservice)

    redownloading it fixed it. we use Installatron updater, which is what performed the overnight update and site was down. thanks

    Plugin Author FirelightWP

    (@firelightwp)

    Hmm. Well, that’s concerning.

    I did just push a release that imposes full PHP coding standards on that file. Notably, the coding standards did not flag or force any changes to the line above. In any case, feel free to update and confirm the issue is still fixed.

    I’m particularly concerned that using the updater may have generated an issue/message that’s not (a) consistent and (b) actually there in the code as far as I can see.

    In any case, hopefully this update also resolves things for people.

    Please definitely let me know if you continue to see any issues, and I’ll be available to troubleshoot immediately.

    Thread Starter t.inoue

    (@tinoue)

    Thank you for your response.
    The upload method was automatic plugin update.

    When I installed Version2.2.3 from the WordPress administration screen by uploading a ZIP file, the plugin could not be activated due to the following error.

    Parse error: syntax error, unexpected ‘)’ in /wp-content/plugins/easy-fancybox/inc/class-easyfancybox-admin.php on line 748

    I have used the plugin quite a few times, and I checked all the sites, but there were 3 that had the same error, and it is below the configuration.

    A Site | PHP7.2.34/WordPress 6.4.5
    B Site | PHP7.2.34/WordPress 6.2.6
    C Site | PHP7.2.34/WordPress 5.7.12

    Plugin Author FirelightWP

    (@firelightwp)

    @tinoue – Are you saying that you still have the error with the latest update?

    If so, is there any way you could please copy the lines of code around that line and paste them here?

    And I know you already did, but can you confirm if you go to the plugin pages, it says you have version 2.2.3?

    • This reply was modified 4 months, 4 weeks ago by FirelightWP.
    Plugin Author FirelightWP

    (@firelightwp)

    Actually, just to share from my side, here’s the code.

    The challenge I’m having is that this code is simple, correct, and does not have a syntax error. Line 748 is the last line, and the closing parenthesis is required as the closing parenthesis for the wp_enqueue_script() call.

    wp_enqueue_script(
    'firelight-block-js',
    $block_js,
    array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor', 'wp-hooks' ),
    $version,
    array( 'in_footer' => true ),
    ); // <- This is line 748. I cannot remove this closing paranthesis.
    Plugin Author FirelightWP

    (@firelightwp)

    @tinoue – Assuming you’re still having the issue, if you open to doing so, I might ask if you can reach out to us at firelightwp.com/contact. Just reference this thread. We can discuss some additional possible troubleshooting.

    Thread Starter t.inoue

    (@tinoue)

    Thank you.
    Sent from firelightwp.com/contact

    Thread Starter t.inoue

    (@tinoue)

    I was able to confirm the solution in version 2.2.5.

    Thank you for your support many times.

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