View Single Post
  #7  
Old 11-30-2016, 07:57 PM
 
Triple A Racing Triple A Racing is offline
 

X-Wizard
  
Join Date: Jul 2008
Location: Manchester UK
Posts: 1,028
 

Default Re: X-Cart 5.3.2: Increase Conversions, Design Easier, Enjoy Many Other New Cool Tools

This is the first time we've had a problem with an XC 5.3.* upgrade.

We tried to run this on our dev store which is set in developer mode. We made the normal pre-upgrade adjustments i.e. disable our own Custom Modules etc and then ran the whole upgrade as we do usually; all in one complete process. It ran perfectly until the 'unpacking archives' phase of the process (https://dl.dropboxusercontent.com/u/50440624/Z-Forum/5.3.2.png ) which is early on in the upgrade. There's a complete freeze at this point. We left it running for 20 mins, but no change...

No problem with the dev store. Simply login again and it's just as it was, prior to the upgrade starting. The contents of /var/tmp are deleted automatically and /var/run and /var/datacahce are not affected at this point in the process fortunately. So, a quick re-examine of options and we chose to first upgrade the XC Custom Skin module just on its own (It's a bug-fix only upgrade option) and this went perfectly.

We then attempted to run the complete upgrade again (it's now minus the bug fix module upgrade of course...) and sadly, it's back to freezing the process at the 'unpacking archives' phase. Hmmmm

A coffee later and not being put off by the doomsday message "Please take your attention that it is not guaranteed the correct site operation after upgrade if you select to not upgrade all. Use this on your own risk and if you exactly know what you do" (which needs a better translation into English before the merchant wave release ) we attempted to upgrade just the Core on its own, aiming to then run all the module upgrades once that Core upgrade was complete. The Core upgrade to 5.3.2.* ran perfectly.

So finally onto all the module upgrades and it appeared to run perfectly right up to step 13 when.... Boom! An error we haven''t seen before
Quote:
ERROR: "0" (code N/A)
Argument 1 passed to XLite\Core\DatabaseAbstract::detectDirectives() must be of the type array, null given, called in **/var/run/classes/XLite/Core/DatabaseAbstract.php on line 744
Line 744 in that file is this:
Quote:
743 if ($repo) {
744 $rows = $this->detectDirectives($rows);
The PHP error log is shown below (we've replaced the actual very long file location prefix with *** for easier reading):
PHP Code:
<?php die(1); ?>
[01-Dec-2016 03:07:46] Error (code: 0): Argument 1 passed to XLite\Core\DatabaseAbstract::detectDirectives() must be of the type array, null given, called in ***/var/run/classes/XLite/Core/DatabaseAbstract.php on line 744
Server API: cgi-fcgi;
Request method: GET;
URI: /admin.php?target=upgrade;
Backtrace: 
#0 ***/var/run/classes/XLite/Core/DatabaseAbstract.php(744): XLite\Core\DatabaseAbstract->detectDirectives(NULL)
#1 ***/classes/XLite/Module/CDev/VAT/upgrade/5.3/2/post_rebuild.php(15): XLite\Core\DatabaseAbstract->loadFixturesFromYaml('/home/***...')
#2 ***/var/run/classes/XLite/Upgrade/Entry/AEntry.php(1127): XLite\Upgrade\Entry\AEntry->{closure}(NULL)
#3 ***/var/run/classes/XLite/Upgrade/Cell.php(1433): XLite\Upgrade\Entry\AEntry->runHelpers('post_rebuild')
#4 ***/Includes/Decorator/Plugin/Upgrade/PostRebuildActions/Main.php(40): XLite\Upgrade\Cell->runHelper(Object(XLite\Upgrade\Entry\Module\Marketplace), 'post_rebuild')
#5 ***/Includes/Decorator/Utils/PluginManager.php(62): Includes\Decorator\Plugin\Upgrade\PostRebuildActions\Main->executeHookHandler()
#6 ***/Includes/Decorator/Utils/CacheManager.php(1105): Includes\Decorator\Utils\PluginManager::invokeHook('step_thirteen')
#7 [internal function]: Includes\Decorator\Utils\CacheManager::executeStepHandler13()
#8 ***/Includes/Utils/Operator.php(213): call_user_func_array(Array, Array)
#9 ***/Includes/Decorator/Utils/CacheManager.php(826): Includes\Utils\Operator::executeWithCustomMaxExecTime('600', Array)
#10 ***/Includes/Decorator/Utils/CacheManager.php(845): Includes\Decorator\Utils\CacheManager::runStep(13)
#11 ***/Includes/Decorator/Utils/CacheManager.php(1188): Includes\Decorator\Utils\CacheManager::runStepConditionally(13)
#12 ***/top.inc.PHP53.php(90): Includes\Decorator\Utils\CacheManager::rebuildCache()
#13 ***/top.inc.php(26): require_once('/home/***...')
#14 ***/admin.php(16): require_once('/home/***...')
#15 {main}

[01-Dec-2016 03:10:15] Error (code: 0): Argument 1 passed to XLite\Core\DatabaseAbstract::detectDirectives() must be of the type array, null given, called in ***/var/run/classes/XLite/Core/DatabaseAbstract.php on line 744
Server API: cgi-fcgi;
Request method: GET;
URI: /admin.php?;
Backtrace: 
#0 ***/var/run/classes/XLite/Core/DatabaseAbstract.php(744): XLite\Core\DatabaseAbstract->detectDirectives(NULL)
#1 ***/classes/XLite/Module/CDev/VAT/upgrade/5.3/2/post_rebuild.php(15): XLite\Core\DatabaseAbstract->loadFixturesFromYaml('/home/***...')
#2 ***/var/run/classes/XLite/Upgrade/Entry/AEntry.php(1127): XLite\Upgrade\Entry\AEntry->{closure}(NULL)
#3 ***/var/run/classes/XLite/Upgrade/Cell.php(1433): XLite\Upgrade\Entry\AEntry->runHelpers('post_rebuild')
#4 ***/Includes/Decorator/Plugin/Upgrade/PostRebuildActions/Main.php(40): XLite\Upgrade\Cell->runHelper(Object(XLite\Upgrade\Entry\Module\Marketplace), 'post_rebuild')
#5 ***/Includes/Decorator/Utils/PluginManager.php(62): Includes\Decorator\Plugin\Upgrade\PostRebuildActions\Main->executeHookHandler()
#6 ***/Includes/Decorator/Utils/CacheManager.php(1105): Includes\Decorator\Utils\PluginManager::invokeHook('step_thirteen')
#7 [internal function]: Includes\Decorator\Utils\CacheManager::executeStepHandler13()
#8 ***/Includes/Utils/Operator.php(213): call_user_func_array(Array, Array)
#9 ***/Includes/Decorator/Utils/CacheManager.php(826): Includes\Utils\Operator::executeWithCustomMaxExecTime('600', Array)
#10 ***/Includes/Decorator/Utils/CacheManager.php(845): Includes\Decorator\Utils\CacheManager::runStep(13)
#11 ***/Includes/Decorator/Utils/CacheManager.php(1188): Includes\Decorator\Utils\CacheManager::runStepConditionally(13)
#12 ***/top.inc.PHP53.php(90): Includes\Decorator\Utils\CacheManager::rebuildCache()
#13 ***/top.inc.php(26): require_once('/home/***...')
#14 ***/admin.php(16): require_once('/home/***...')
#15 {main}

[01-Dec-2016 03:10:15] Error (code: 2): Cannot modify header information - headers already sent by (output started at ***/Includes/Utils/Operator.php:164) in file ***/error_handler.php : 26
Server API: cgi-fcgi;
Request method: GET;
URI: /admin.php?;
Backtrace: 
#0 Includes\ErrorHandler::logInfo()  called at [***/Includes/ErrorHandler.php:424] 
#1 Includes\ErrorHandler::handleCommonError()  
#2   called at [***/error_handler.php:26] 
#3   called at [***/Includes/ErrorHandler.php:355] 
#4 Includes\ErrorHandler::showErrorPage()  called at [***/Includes/ErrorHandler.php:437] 
#5 Includes\ErrorHandler::handleException()
This situation leaves both the Admin area and the Customer areas inaccessible. Even after a little surgery on /var/run etc (thanks to good previous guidance from @seyfin) and a subsequent re-deploy which normal allows an easy recovery to both, there is an error at step 13 again and still no access to either Adim or Customer areas. The second PHP error log is the same as the first. Same initial failure at the same line number etc

We can easy recover from backups etc and go back to a 5.3.1.6 dev store again no problem, but we are holding off from that, just in case XC can see a very quick fix that can be advised on here instead, having looked at the data above. Line 744! Come in. Your time is up! Thanks!
__________________
Dev Store & Live Store XC Business 5.4.1.35
Server; Ubuntu 22.04.2 LTS (HWE 6.2.0.26.26 Kernel)) / Plesk Obsidian
Nginx 1.20.4 / Apache 2.4.52 (Ubuntu Backported) / MariaDB 10.11.4 / PHP 7.4.33
Reply With Quote