[email protected] Posted August 8, 2012 Share Posted August 8, 2012 I think Al has probably tried the update to 5.1.2.2 but i will check this many thanks Link to comment Share on other sites More sharing options...
Al Brookbanks Posted August 8, 2012 Share Posted August 8, 2012 @John - I totally understand why you are upset but it is not as absurd as you think. This issue does not affect most customers, it certainly doesn't affect my development store, my colleagues development stores or the demo store on this server which is however being upgraded to a pseudo Visual Audio retailer right now. For this reason we haven't just released this version irresponsibly. It is not a down grade it just has a smal piece of code causing a problem on your store. I was in the office until late last night trying to resolve it and not at 07:38 I am back onto this. @[email protected] - Yes indeed this issue affects 5.1.2.2, 5.1.2.1 and 5.1.2 for some customers only. This is how is made it into the production release. @bsmither - Thanks for your suggestions. I have actually done exactly the same thing. The rebuildLogos function is no no longer static and the class redeclarations have been replaced with function calls within "this" object. This is the current code: public function rebuildLogos() { if ($logos = $GLOBALS['db']->select('CubeCart_logo', false, array('status' => 1))) { foreach ($logos as $logo) { $skin = (!empty($logo['skin'])) ? $logo['skin'] : 'all'; $style = (!empty($logo['style'])) ? $logo['style'] : 'all'; $custom[$skin][$style] = $logo['filename']; } } else { $custom = null; } $skins = glob(CC_ROOT_DIR.CC_DS.'skins'.CC_DS.'*'.CC_DS.'config.xml'); /* Add logos for extra templates */ $extra_templates = array('emails', 'invoices'); if ($skins) { foreach ($skins as $skin) { $xml = new SimpleXMLElement(file_get_contents($skin)); if (isset($xml->styles)) { ## List substyles foreach ($xml->styles->style as $style) { $default[(string)$xml->info->name][(string)$style->directory] = ((string)$style->attributes()->images == 'true') ? true : false; } } else { ## Only one style here $default[(string)$xml->info->name] = true; } } } foreach ($default as $skin => $data) { if (is_array($data)) { ## Has substyles foreach ($data as $style => $value) { if (isset($custom['all'])) { $target = 'images/logos/'.$custom['all']['all']; } elseif(isset($custom[$skin]['all'])) { $target = 'images/logos/'.$custom[$skin]['all']; } elseif (isset($custom[$skin][$style])) { ## Use custom logo $target = 'images/logos/'.$custom[$skin][$style]; } else { ## Look for default logo $target = $this->_getLogoDefault($skin, $style); } $logo_config[$skin.$style] = $target; } } else { ## Basic skin with no substyles if (isset($custom['all'])) { $target = 'images/logos/'.$custom['all']['all']; } elseif (isset($custom[$skin])) { ## Use custom logo $target = 'images/logos/'.$custom[$skin]['all']; } else { ## Look for default logo $target = $this->_getLogoDefault($skin); } $logo_config[$skin] = $target; } } $GLOBALS['config']->set('logos', false, $logo_config); // Save skin logos (required now) foreach($extra_templates as $type) { if (isset($custom[$type])) { ## Use custom logo $target = 'images/logos/'.$custom[$type]['all']; } else { ## Look for default logo $target = $this->getLogo(); } $logo_config[$type] = $target; } $GLOBALS['config']->set('logos',false,$logo_config); // Save skin and extra templates } This has rightly resolved the issue on the database object but now has a different fatal error on "Call to undefined method Cache::_getLogoDefault()". Why PHP is trying to assign "$this" against a totally different class is incomprehensible to me!! However this code above also works fine on my development server (PHP 5.3.6) and on our production server (PHP 5.3.8). It could have some thing to do with the configuration of the stores logo so I am now investigating that. I am truly very sorry that you are experiencing this problem and am still investigating this as an urgent priority. RIght now I am upgradeing my dev server to PHP 5.3.14. Link to comment Share on other sites More sharing options...
Al Brookbanks Posted August 8, 2012 Share Posted August 8, 2012 I have upgraded the PHP version on my development environment to PHP 5.3.14 and I am still unable to reproduce this bug. Link to comment Share on other sites More sharing options...
bsmither Posted August 8, 2012 Share Posted August 8, 2012 Please determine as best you can what version of the operating system is being run, and if that operating system is 64-bit on a 64-bit CPU, or 32-bit. Please compare and contrast the results. Link to comment Share on other sites More sharing options...
Al Brookbanks Posted August 8, 2012 Share Posted August 8, 2012 Development Server: (64 Bit) Darwin Als-iMac-2.local 12.0.0 Darwin Kernel Version 12.0.0: Sun Jun 24 23:00:16 PDT 2012; root:xnu-2050.7.9~1/RELEASE_X86_64 x86_64 Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.6 Production Server: (32 Bit) Linux clover.cubecart.net 2.6.18-274.18.1.el5PAE #1 SMP Thu Feb 9 13:25:50 EST 2012 i686 i686 i386 GNU/Linux PHP 5.3.15 (Was 5.3.14 about 20 minutes ago and 5.3.8 about an hour ago) Apache/2.2.22 Link to comment Share on other sites More sharing options...
Al Brookbanks Posted August 8, 2012 Share Posted August 8, 2012 I think this issue may have something to do with Cache method. There are a few options and one store may use a different Caching method to another. Link to comment Share on other sites More sharing options...
Al Brookbanks Posted August 8, 2012 Share Posted August 8, 2012 OK the issue if with servers running APC Cache. Fix should be ready very soon. Link to comment Share on other sites More sharing options...
Al Brookbanks Posted August 8, 2012 Share Posted August 8, 2012 Ok so the problem was a call to the rebuildLogos function from a static method of the GUI class in the APC (and other) less used caching methods. Please upload the attached filed over the ones in your classes/cache folder to fix this issue. This fix removes the routine all together which is no longer needed at this stage of the script. It should save quite a bit of overhead too. cache_classes.zip Also replace the classes/gui.class.php file with the one below: gui.class.php Link to comment Share on other sites More sharing options...
[email protected] Posted August 8, 2012 Share Posted August 8, 2012 Our store is up and running better than ever now after Al hunted down the problem and fixed it. We had quite a few other buggy issues since v5 but this upgrade to the latest ver. has solved most of them it appears. Thanks to Al for his dogged persistence in helping us so promptly on this one! Link to comment Share on other sites More sharing options...
Al Brookbanks Posted August 8, 2012 Share Posted August 8, 2012 Thanks for your kind words. As releases go its been one of the more stressful ones. Sorry to all who have experienced problems. Link to comment Share on other sites More sharing options...
bsmither Posted August 8, 2012 Share Posted August 8, 2012 Will there be a 5.1.2.3 to download? Link to comment Share on other sites More sharing options...
Al Brookbanks Posted August 8, 2012 Share Posted August 8, 2012 Yeah coming shortly.. insanely busy today. Thanks for your patience. Link to comment Share on other sites More sharing options...
Dirty Butter Posted August 8, 2012 Share Posted August 8, 2012 THANK YOU!! Link to comment Share on other sites More sharing options...
Recommended Posts