Search code examples
phpcs-cart

Validator "Restore" returned fail status on WAMP


trying to upgrade from 4.3.3sp1 to 4.3.4 on my localhost ( WAMP ).

However on the validation step it fails with:

 Validation issue 
 Validator "Restore" returned fail status Unable to
 prepare restore script.

Tried changing file permissions and some other things I found on Google.

Did not manage to find any additional data about this even on their bugtracker.

Any help would be appreciated.


Solution

  • Found the issue.

    CS-Cart is trying to build the restore file name with this rule:

    $target_restore_file_name = 'restore_' . date('Y-m-d_H:i:s', TIME) . '.php';
    

    But Windows does not allow ":" in the filenames. So a workaround would be to do something like this:

    $target_restore_file_name = 'restore_' . date('Y-m-d_His', TIME) . '.php';
    

    Or other variations.

    This code is in app/Tygh/UpgradeCenter/App.php in the prepareRestore() function

    Hope this will help someone