Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED cpaddons WP update hangs on plugin error

Discussion in 'General Discussion' started by jndawson, Apr 14, 2017.

  1. jndawson

    jndawson Well-Known Member

    Joined:
    Aug 27, 2014
    Messages:
    169
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Western US
    cPanel Access Level:
    DataCenter Provider
    We have a customer trying to update his newly installed via cpaddons wordpress using the cpaddons update button and is getting the following error:
    Code:
    The system could not copy the “/home/username/public_html/wp-content/plugins/akismet/views/strict.php” folder to working folder “./wp-content/plugins/akismet/views/strict.php”.
    Error: The system could not prepare the working directory:
    That's the entire error message, and we also see it when trying the update via WHM. The odd thing is that the file 'strict.php' doesn't exist, permissions are all correct for directories (755) and files (644).

    In the /usr/local/cpanel/logs/error_log:
    Code:
    Cpanel::FileUtils::Copy::safecopy("/home/username/public_html/wp-content/plugins/akismet/views/st"..., "./wp-content/plugins/akismet/views/strict.php") called at /usr/local/cpanel/Cpanel/cPAddons/Obj.pm line 874
    Which is:
    Code:
            $copy_to_working_folder_ok = Cpanel::FileUtils::Copy::safecopy( $source_directory, $update_directory );
    Any ideas how to fix this?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify which version of cPanel is installed on the system? EX:

    Code:
    cat /usr/local/cpanel/version
    Also, can you verify the customer made no changes to the WordPress files after initially installing it via cPanel?

    Thank you.
     
  3. jndawson

    jndawson Well-Known Member

    Joined:
    Aug 27, 2014
    Messages:
    169
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Western US
    cPanel Access Level:
    DataCenter Provider
    64.0.12
    We're waiting for a response from the customer for confirmation, but from our ticket, he indicates he's not made any changes to WP files.
     
    #3 jndawson, Apr 14, 2017
    Last edited: Apr 14, 2017
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  5. jndawson

    jndawson Well-Known Member

    Joined:
    Aug 27, 2014
    Messages:
    169
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Western US
    cPanel Access Level:
    DataCenter Provider
    That might could be it. The install is identified with '(legacy)'.

    What's the solution? Your release notes aren't clear:
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Since it's a legacy WordPress cPAddon installation, the error message suggests the user modified the core WordPress files and thus the update is failing. If you can confirm the core files were not modified, feel free to open a support ticket using the link in my signature so we can take a closer look.

    Thanks!
     
  7. jndawson

    jndawson Well-Known Member

    Joined:
    Aug 27, 2014
    Messages:
    169
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Western US
    cPanel Access Level:
    DataCenter Provider
    UPDATE:
    We opened a ticket. There were several files missing due to th ecustomer removing stuff he thought he didn't need, and after several false starts at restoring the files, the following steps to re-install, then upgrade were taken:

    Code:
    /home/username/public_html # curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
     
    /home/username/public_html # chmod +x wp-cli.phar
    
    /home/username/public_html # php wp-cli.phar core download --version=4.7.2 --force
    
    The update to 4.7.3 was then properly completed using the cpaddons upgrade link.

    Hope that helps somebody.
     
    Infopro and cPanelMichael like this.
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm happy to see the issue is now solved. Thank you for updating us with the outcome.
     
  9. jndawson

    jndawson Well-Known Member

    Joined:
    Aug 27, 2014
    Messages:
    169
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Western US
    cPanel Access Level:
    DataCenter Provider
    Here we are a couple of months later, and another customer with the exact same issue with Akismet plugin using a cpAddon WP legacy install. We tried the above fix, but got the same error.

    I see this issue crops up a lot. Has anybody discovered a better fix?
     
  10. jndawson

    jndawson Well-Known Member

    Joined:
    Aug 27, 2014
    Messages:
    169
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Western US
    cPanel Access Level:
    DataCenter Provider
    We decided to try to run the upgrade after we discovered that creating the missing file moved the update along. We touched the following missing files:

    Code:
    public_html/wp-content/plugins/akismet/views/strict.php
    public_html/wp-content/plugins/hello.php
    public_html/wp-content/themes/twentyfifteen/genericons/example.html
    Worked great until we got stalled by the big error:
    Code:
    Warning: The plugin “cPanel & WHM® Site Software” could not be activated
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.2.1_4.2.2/diff” patch and returned the following error code: 1
    Error: You modified this cPAddon or the upgrade test failed. You cannot update this cPAddon via this interface.
    
    To force the upgrade, type the following in to the form below:
    
    Error: You modified this cPAddon or the upgrade test failed. You cannot update this cPaddon via this interface.
    
    For technical reasons, you can only attempt a forced upgrade via cPanel when logged in as the user with the user’s password.
    Logged into user's cpanel, ran the forced upgrade:
    Code:
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.2.1_4.2.2/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.2.1” to “4.2.2” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.2.1_4.2.2/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.2.2” to “4.2.3” …
    
    
    Starting forced upgrade from “4.2.3” to “4.2.4” …
    
    
    Starting forced upgrade from “4.2.4” to “4.2.4.cp1” …
    
    
    Starting forced upgrade from “4.2.4.cp1” to “4.2.4.cp2” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.2.4.cp2_4.3/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.2.4.cp2” to “4.3” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.2.4.cp2_4.3/diff” patch and returned the following error code: 1
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.3_4.3.1/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.3” to “4.3.1” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.3_4.3.1/diff” patch and returned the following error code: 1
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.3.1_4.4/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.3.1” to “4.4” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.3.1_4.4/diff” patch and returned the following error code: 1
    
    
    The system could not copy the “/home/username/public_html/wp-content/plugins/akismet/views/strict.php” folder to working folder “./wp-content/plugins/akismet/views/strict.php”.
    Error: The system could not prepare the working directory: No such file or directory
    On the upside, it looks like we got to WP version 4.4 before completely failing.

    More to come.
     
  11. jndawson

    jndawson Well-Known Member

    Joined:
    Aug 27, 2014
    Messages:
    169
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Western US
    cPanel Access Level:
    DataCenter Provider
    Tried touching strict.php again:
    Code:
    Site Software
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.4_4.4.1/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.4” to “4.4.1” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.4_4.4.1/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.4.1” to “4.4.2” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.4.2_4.5/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.4.2” to “4.5” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.4.2_4.5/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.5” to “4.5.1” …
    
    
    Starting forced upgrade from “4.5.1” to “4.5.2” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.5.2_4.5.3/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.5.2” to “4.5.3” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.5.2_4.5.3/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.5.3” to “4.6” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.6_4.6.1/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.6” to “4.6.1” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.6_4.6.1/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.6.1” to “4.7” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.7_4.7.1/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.7” to “4.7.1” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.7_4.7.1/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.7.1” to “4.7.2” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.7.2_4.7.3/diff” patch and returned the following error code: 1
    
    
    Starting forced upgrade from “4.7.2” to “4.7.3” …
    Error: The system could not apply the “/usr/local/cpanel/cpaddons/cPanel/Blogs/WordPress/upgrade/4.7.2_4.7.3/diff” patch and returned the following error code: 1
    Warning: You attempted to force an upgrade on a modified cPAddon. The upgrade process completed but returned errors. The cPAddon may be non-functional.
    The website appears to be working. We'll have the customer check for sure, but there do seem to be a whole lot of errors in that update scroll.
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Upgrading WordPress through the cPAddon feature is not supported once the WordPress files are manually upgrade or altered. Generally, you'd have to setup a new WordPress installation through "cPanel >> Site Software" and migrate the WordPress installation that was altered to it using the instructions at:

    Moving WordPress « WordPress Codex

    Thank you.
     
  13. jndawson

    jndawson Well-Known Member

    Joined:
    Aug 27, 2014
    Messages:
    169
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Western US
    cPanel Access Level:
    DataCenter Provider
    Just to clarify, the customer only removed a couple of files that cpaddon (apparently) looks for when upgrading, but there were no other updates attempted outside of the cpaddons feature. When the files were touched, the cpaddon upgrade function worked, more or less.

    This was easier than trying to explain how he would need to remove all of his content, delete his legacy WP install, and then install the new cpaddon WP package along with whatever plugins and other templates he needs, and then reinstall his content.

    The customer is happy - nothing broke.
     
    cPanelMichael likes this.
Loading...

Share This Page