• Resolved icetechy

    (@icetechy)


    Please help me how do I stop this error?

    PHP Fatal error: Cannot redeclare ElementorPro\Modules\Woocommerce\WcTemplates\Cart\elementor_pro_render_mini_cart_item() (previously declared in /home/xxxxxx/public_html/wp-content/plugins/elementor-pro/modules/woocommerce/wc-templates/cart/mini-cart.php:7) in /home/xxxxxx/public_html/wp-content/plugins/elementor-pro/modules/woocommerce/wc-templates/cart/mini-cart.php on line 66

    • This topic was modified 5 years, 1 month ago by icetechy.
Viewing 13 replies - 1 through 13 (of 13 total)
  • pingram

    (@pingram3541)

    Wow, that’s interesting the function is being redeclared in the same file, once on line 7 and again on line 66.

    What version is this?

    Thread Starter icetechy

    (@icetechy)

    This is Version 2.7.2. this issue started with Version 2.7.1 please what do I do?

    pingram

    (@pingram3541)

    Taking a look at my copy now…

    pingram

    (@pingram3541)

    Ok, my copy does not have a duplicate declaration. I would delete and reinstall a fresh copy. No data should be lost because that is all stored in the database. It’s best to do it from the file system, zip the current folder as a backup and delete the elementor pro folder and then replace with your fresh copy.

    Thread Starter icetechy

    (@icetechy)

    I have done that and it’s keeps on doing that, don’t know what to do.

    pingram

    (@pingram3541)

    Have you looked at the code yourself to see if you see the duplication of that function in that file? What is your source of the plugin, was it from an upgraded previous version or did you download 2.7.2 directly from your membership dashboard?

    Not all files are overwritten on every update so if a previous version has some form of malformation and you keep starting from that version but updating to 2.7.2, that could also play into this.

    Otherwise I would suggest opening a ticket with Pro support as they typically won’t allow any Pro discussions to continue very long on these forums.

    Thread Starter icetechy

    (@icetechy)

    okay I will do just that. and the line 66 is actually a blank line.

    pingram

    (@pingram3541)

    That’s really strange, in my copy it is the closing curly } for the entire function of which is declare on line 7.

    pingram

    (@pingram3541)

    It also comes directly after an opening php tag on line 65: <?php

    Thread Starter icetechy

    (@icetechy)

    yes you’re right, that is how it is and that is what I meant. Its only the curly } that is there. I mean on line 66. I don’t see another declaration.

    pingram

    (@pingram3541)

    If you’ve already replaced from a direct download from elementor.com then I would suggest opening a ticket with your host as it seems maybe something is changing how php is reading this file. Maybe something in the .htaccess rewrite or some php module misbehaving because as you can see for yourself, there is no double declaration in the actual file.

    It still could not hurt to also open a ticket with Elementor directly via the website. One other thing you can do is check the Elementor system info in the back end which also provides error logs that could have additional information that may be useful.

    Lastly both WordPress and your hosting environment also have logging mechanisms. WordPress debugging can be activated through a constant in the wp-config.php file, there is many write ups on the net on how to do this.

    I def think you got something going on server side…feels very much like a rewrite is taking place.

    Thread Starter icetechy

    (@icetechy)

    okay thank you I will do that right away. I disable the file for now by renaming and my carts are displaying well.

    pingram

    (@pingram3541)

    Glad you found a temporary fix, if you do figure it out, please come back and update us so if others run into this they can see the path of resolution. Cheers!

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