That error message in your logs looks VERY similar to this thread: PHP Fatal Error. You might want to give the fix from that thread a try.
That error message in your logs looks VERY similar to this thread: PHP Fatal Error. You might want to give the fix from that thread a try.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
URLs not being generated
First do a "repair" of the 'zen_db_cache' table using a tool such as phpmyadmin. This table being corrupted is most likely the cause of URLs not being generated on your pages.
The table 'zen_db_cache' is only used internally to cache SQL lookups by Zen Cart. You can safely "Truncate" this table after doing the repair. Additionally, you can disable Zen Cart SQL caching (not query cache) by using the following in your configure.php files: define('SQL_CACHE_METHOD', 'none'); if desired. I do use Zen Cart SQL caching and have not yet encountered this error under 1.51 *knocks on wood*.
Why does this matter? "Ultimate SEO URLs" will use Zen Cart SQL caching if enabled in 'configure.php'.
Shopping Cart
I think I've found the root cause for the product page redirecting to an invalid URL. Looks like in the past the built-in php parse_url and the Zen Cart uprid did not play well together. There was still some code to handle this from pre-2.200 releases. Try the following changes and let me know if they fix the problem for you.
In seo.url.php around line 410 change
toCode:case 'products_id': switch(true) { case ($page == FILENAME_PRODUCT_REVIEWS):
And around line 1454 changeCode:case 'products_id': // Make sure if uprid is passed it is converted to the correct pid $p2[1] = zen_get_prid($p2[1]); switch(true) { case ($page == FILENAME_PRODUCT_REVIEWS):
toCode:// damn zen cart attributes use illegal url characters if ($this->is_attribute_string($this->uri)) { $parsed_url = parse_url($this->uri); $this->uri_parsed = parse_url($parsed_url['scheme']); $this->uri_parsed['query'] = preg_replace('/products_id=([0-9]+)/', 'products_id=$1:' . $parsed_url['path'], $this->uri_parsed['query']); } else { $this->uri_parsed = parse_url($this->uri); }
Code:// damn zen cart attributes use illegal url characters if ($this->is_attribute_string($this->uri)) { $parsed_url = parse_url($this->uri); if(array_key_exists('scheme', $parsed_url) && zen_not_null($parsed_url['scheme'])) { $this->uri_parsed = parse_url($parsed_url['scheme']); } else { $this->uri_parsed = $parsed_url; } $this->uri_parsed['query'] = preg_replace('/products_id=([0-9]+):[^&]*/', 'products_id=$1', $this->uri_parsed['query']); } else { $this->uri_parsed = parse_url($this->uri); }
Last edited by lhungil; 8 Nov 2012 at 05:21 PM. Reason: clarification
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2
So....I don't know what to make of this, but if I change my cache method to "file" then the whole shopping cart thing doesn't have a problem anymore. I'm still having that bizarre business when I hover over a link, it displays the dynamic URL at the bottom of the browser, but once navigated to, the URL in the header bar is an ultimate SEO re-written URL.
in a nutshell using file-type cacheing does not put the UPRID at the end of the product link when browsing from the shopping cart.
Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2
Would anything in the ADMINFOLDER/includes/functions/general.php contribute to this issue?
I have one other plugin that touches that file and I think I also noticed that the general.php file that is used for ultimate SEO did not match the one that came with the v151 zencart install.
I had to do a file merge to make sure I was able to still use the other plugin (Stocks by attribute)
Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2
I still see the uprid added to the end with file caching turned on in my test environments (and on your site). From what I've read this is normal behavior for the shopping cart page.
Just because you are redirected to the URL does not mean the URLs are being re-written inside Zen Cart. I suspect something is not quite right with the installation of this module in your site. I'd especially double check the auto-loader file and the zen_href_link function changes.
I'm not sure what stock-by-attributes changes, but the changes made for this plugin to functions_general are to remove the main_page parameter and add an XSS fix. These changes on the admin side should not affect the catalog side (they are not used by the catalog side).
Last edited by lhungil; 8 Nov 2012 at 06:32 PM.
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker
Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2
I have completed the edits proposed and the shop appears to be functioning properly through the shopping cart :)
Thanks so much for your help and suggestions!
Live again! http://spritelygoods.com Rebuilt on ZC v 1.5.1 from 1.3.0.2
Yes, looks like your cart is now working properly. And special kudos to Ihungil for his patience and help on this support thread!
Steve
prommart.com
lhungil, First off thank you for helping me with my first issue (the PM you sent me helping me with my checkout pages)!
I have zen cart v1.5.1 and Ultimate SEO URL's, with the corresponding installation (v1.5.1). All is working fine except for one exception: it's a special characters in a category URL field.
I must not be thinking clearly. One of my clients has a category labeled as such: "CONTROL/ SHAPER". As you can see there is a forward slash here. Yeah I know it's bad to do this, but she wants it there if possible. So in my admin> config> SEO URL's I see a few fields that I think controls this:
1. Remove all non-alphanumeric characters? is set to true
2. Enter special character conversions. is set to: /=>-
First is this the way to convert this category issue? Second, I was confused as the the entry of #2 (above). You have this example: The formatMUST be in the form: char=>conv,char2=>conv2 which I think I am using properly. Any suggestions?
Bookmarks