• Resolved dmac

    (@darrenmcentee)


    Hi, I am getting a fatal error, when visiting the nav menu on a client site.
    i.e. /wp-admin/nav-menus.php

    Disabled all plugins, except five-star, default theme etc.

    debug.log:

    [11-May-2021 08:59:30 UTC] 
    PHP Fatal error:  Cannot redeclare checklinks0() 
    (previously declared in /home/www.com/public_html/wp-content/plugins/five-star-ratings-shortcode/includes/class-five-star-ratings-shortcode.php:399) in
    /home/www.com/public_html/wp-content/plugins/five-star-ratings-shortcode/includes/class-five-star-ratings-shortcode.php on line 399

    Thanks,
    Darren.

    • This topic was modified 3 years, 6 months ago by dmac.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Chris J. Z?hller

    (@seezee)

    Hi,

    What theme are you using? Based on the message, I’m guessing it uses a function name that is conflicting with the plugin. If you have file access you could try renaming the function to e.g., fsrs_checklinks() & see if the error goes away. If it does please let me know & I’ll push out an update with that solution.

    Thanks,

    — CZ

    Thread Starter dmac

    (@darrenmcentee)

    Hi, we are using the divi framework, with our own custom child theme.
    I have renamed like so:
    function fsrs_checklinks( $links )

    Also i have renamed the function call at line 411 (same file).
    Will monitor.
    Thanks.

    Plugin Author Chris J. Z?hller

    (@seezee)

    Right, please let me know if this solves the issue so I can update the plugin with this solution.

    Thread Starter dmac

    (@darrenmcentee)

    Following up…
    Error again:

    Error Details
    =============
    An error of type E_ERROR was caused in line 402 of the file /home/www.com/public_html/wp-content/plugins/five-star-ratings-shortcode/includes/class-five-star-ratings-shortcode.php. 
    Error message: Cannot redeclare fsrs_checklinks() (previously declared in /home/www.com/public_html/wp-content/plugins/five-star-ratings-shortcode/includes/class-five-star-ratings-shortcode.php:402)

    Same function call that was renamed.

    Plugin Author Chris J. Z?hller

    (@seezee)

    Well drat. I’ll see what I can do.

    Can you post the URL to the page that’s generating the error?

    FWIW I have the latest version of the plugin installed on my own site and it does not generate the error.

    Thread Starter dmac

    (@darrenmcentee)

    Send me an mail: darren at web watchdog io
    Cheers.

    Plugin Author Chris J. Z?hller

    (@seezee)

    Actually, try this code.

    https://pastebin.com/12xnUH3P

    Replace /includes/class-five-star-ratings-shortcode.php with it & let me know if it fixes the problem.

    Plugin Author Chris J. Z?hller

    (@seezee)

    Actually don’t use that. Needs work.

    Plugin Author Chris J. Z?hller

    (@seezee)

    OK should be safe to use now.

    Thread Starter dmac

    (@darrenmcentee)

    Hi Chris,
    I’ve upgraded to your v1.2.16 release, will monitor that, thank you.

    Plugin Author Chris J. Z?hller

    (@seezee)

    Cool. Did the error go away? I’d like to mark this support thread closed.

    EDIT: I saw from your email that it did. Closing this thread.

    Thread Starter dmac

    (@darrenmcentee)

    Monitoring it. no issues so far.
    Thanks.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘PHP Fatal error: Cannot redeclare checklinks0()’ is closed to new replies.