Cannot Redeclare

broken image


When the 'Cannot redeclare' error is shown it usually means that the two plugins are using the same function name and they conflict with each other because of that, however I searched through Hustle files and can't find any mention of wptranslatepostdata in there, and I can't replicate the issue on my installation.

  1. Cannot Redeclare Class Php
  2. Cannot Redeclare Php
  • Today I updated my 6 websites from ManageWP, and all of them get the same message:

    Fatal error: Cannot redeclare addslashes_strings_only() (previously declared in /home/u971747678/domains/mmdigital.me/public_html/wp-includes/formatting.php:5571) in /home/u971747678/domains/mmdigital.me/public_html/wp-includes/deprecated.php on line 4135

    There has been a critical error on your website.

    Please help.

    The page I need help with: [log in to see the link]

  1. Cannot redeclare class view, updating to PHP5.5 #2066561 Drupal.org describes a similar problem so in my ' etc php5 mods-available xcache.ini' is set xcache.size = 0 and restarted apache. Since then I have not seen the ‘redeclare class' again, Piwik is working fine. Nevertheless it is something you might want to investigate.
  2. This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website.

Cannot Redeclare Class Php

Cannot Redeclare

Cannot Redeclare Php

  • Hey @gnpskup,

    Unfortunately it looks like your WordPress sites upgrades have failed.

    In WordPress 5.6, some functions (In this case, addslashes_strings_only()) was moved from the formatting.php file to the deprecated.php file.
    Unfortuantely it looks like your website has a old version of the formatting.php file, but a newer version (The 5.6 version) of the deprecated.php file.

    You'll need to perform a Manual Upgrade through FTP in order to get WordPress back into a state where it can run.

    Your web host may also be able to assist you, but doing it yourself following the few steps in the above article is simple.

    As to why it happened on all of your WordPress sites, that's very odd and unexpected, where they all hosted on the same host? Had they had issues with a malware infection in the past? It sounds like maybe some of the files weren't writable or were locked in some way.. Did ManageWP give you any logs of the upgrade processes that could point to an error?





broken image