Hello all,
I'm testing some plugins to update from CMSimple_XH 1.5.7 to 1.6 (my PHP version is 5.4.23).
The first serious problem is that Wellrad 1.2 has again problems with the system of purchase: in 1.5.7 everything works correctly, but in the new version the button that links to the shopping cart returns a white window or sometimes the message "error 404 - resource not found ". At this point, any connection to the pages of the site back to the white screen until you erase the browser cache.
I think I understand, reading old posts, which could be an issue regarding the use of words or syntax not anymore allowed.
I hope someone has a solution.
Thanks in advance
Wellrad and CMSimple_XH 1.6
Wellrad and CMSimple_XH 1.6
Last edited by milkodb on Tue Feb 18, 2014 6:48 pm, edited 3 times in total.
Milko
Re: Wellrad and CMSimple_XH 1.6
Yes. That problem is caused by a bug in CMSimple_XH 1.6 that was introduced with r1139. The solution is to exchange the order of two statements in cmsimple/cms.php, line 605ff. Currently it's:milkodb wrote:I hope someone has a solution.
Code: Select all
/**
* The CRSF protection object.
*
* @global object $_XH_csrfProtection
*/
$_XH_csrfProtection = new XH_CSRFProtection();
/*
* Include required_classes of all plugins.
*/
foreach (XH_plugins() as $plugin) {
pluginFiles($plugin);
if (is_readable($pth['file']['plugin_classes'])) {
include_once $pth['file']['plugin_classes'];
}
}
Code: Select all
/*
* Include required_classes of all plugins.
*/
foreach (XH_plugins() as $plugin) {
pluginFiles($plugin);
if (is_readable($pth['file']['plugin_classes'])) {
include_once $pth['file']['plugin_classes'];
}
}
/**
* The CRSF protection object.
*
* @global object $_XH_csrfProtection
*/
$_XH_csrfProtection = new XH_CSRFProtection();
PS: JFTR: The problem is caused by starting the session before the required_classes of plugins have been loaded.
Last edited by cmb on Sat Jan 11, 2014 1:35 pm, edited 2 times in total.
Reason: added PS
Reason: added PS
Christoph M. Becker – Plugins for CMSimple_XH
Re: Wellrad and CMSimple_XH 1.6
Thanks a lot Cmb,
I was trying to find the bug inside Wellard code... and it would have been a long night
Bye
I was trying to find the bug inside Wellard code... and it would have been a long night
Bye
Milko
Re: Wellrad and CMSimple_XH 1.6
It is often helpful to activate debug mode. In this case it reported:milkodb wrote:I was trying to find the bug inside Wellard code... and it would have been a long night
The mentioned line accessed an object in the $_SESSION variable, from what it could be concluded that the session handling was not correct. Then it was sufficient to output the state of the $_SESSION variable (var_dump($_SESSION)) in several places to track down the bug.Fatal error: WRS_Frontend_Controller::collectCartItems(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "WRS_Order" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in C:\xampp\htdocs\xh1.6\plugins\wellrad\classes\app\wrs_frontend_controller.php on line 138
Christoph M. Becker – Plugins for CMSimple_XH