News:

Looking for documentation? Take a look on our wiki

Main Menu

Cache bug

Started by doorknob, July 03, 2008, 20:34:06 PM

Previous topic - Next topic

doorknob

Running with Joomla caching switched on causes a number of problems. The most prominent is the duplication of products in the browse list. This affects all browse list styles except 'Flat Product List'. The cause of this problem is the use of the template class function fetch_cache(). This function caches the template file and when the same file is called many times on the same page, as is the case on browse pages, the cached value is recalled and every entry appears the same.

The cause of this is that the function vmTemplate->getCacheId() expects that the variables $modulename, $pagename, $product_id, $category_id, $manufacturer_id, $auth, $limitstart, $limit have been set up prior to the function being called but they have not. That means that every product get the same cache ID and so the cached version is reused for a different product.

A short-term workaround can be implemented in browse_layouttable.tpl.php and browse_notables.tpl.php by changing the call to fetch_cache() to fetch().

Note: 'Flat Product List' is not affected by this problem because it does not use a template file and therefore cannot be cached.

Tested on J1.5.3 with VM nightly update 2008/7/2.

Regards
Phil


guimplenchik

Strange thing..I thought this bug is fixed (#2227 https://dev.virtuemart.net/cb/issue/2227) , but I use J!1.0.15 + VM 1.1.2 with core cache enabled and this problem still exists..

Any suggestions?

Thanks

jenkinhill

Maybe fixed for J!1.5.x but not for J!1.0.x - I no longer have old versions of Joomla around to check this.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

jordank87

I tried this on joomla 1.5.7 and vm 1.1.2 and still have the "bug" meaning products are duplicated in the categories???


Yereverluvinunclebert

I am using 1.1.2 on my site with a theme and I am experiencing the same issue. Do you know when is this going to be fixed?

I have implemented the workaround so my site is OK for the moment but unfortunately I have a client who is not impressed by the speed of Joomla 1.5 and so I have to do a load of tuning to get the site working as quickly as it can.

Cacheing working as it should, on the products as displayed by a VM theme, is a necessity for me.

Yereverluvinunclebert
Yereverluvinunclebert - Maker of some steampunk widgets of distinction

archerwebsolutions

Quote from: doorknob on July 03, 2008, 20:34:06 PM
Running with Joomla caching switched on causes a number of problems. The most prominent is the duplication of products in the browse list. This affects all browse list styles except 'Flat Product List'. The cause of this problem is the use of the template class function fetch_cache(). This function caches the template file and when the same file is called many times on the same page, as is the case on browse pages, the cached value is recalled and every entry appears the same.

The cause of this is that the function vmTemplate->getCacheId() expects that the variables $modulename, $pagename, $product_id, $category_id, $manufacturer_id, $auth, $limitstart, $limit have been set up prior to the function being called but they have not. That means that every product get the same cache ID and so the cached version is reused for a different product.

A short-term workaround can be implemented in browse_layouttable.tpl.php and browse_notables.tpl.php by changing the call to fetch_cache() to fetch().

Note: 'Flat Product List' is not affected by this problem because it does not use a template file and therefore cannot be cached.

Tested on J1.5.3 with VM nightly update 2008/7/2.

Regards
Phil

These changes appear to be in my code, and yet when the cache is on, we still have a problem with the first items in the product list being duplicated. Any ideas?

aravot

I can not duplicate this on my test site, do you have a URL and your Joomla+VirtueMart settings.

dchaplinsky

Hi.

I've got the same issue with Joomla 1.5.11 & Virtuemart 1.1.3 stable on my website http://ink.su (now caching disabled, of course).

The reason was the third-party template for virtue, which I'm using. After switching to default template issue gone. I will make additional investigations and come with solution for ppl who using custom templates.

dchaplinsky

#9
Ah, you've just disabled caching for subitems in default template :)
grrr

Yereverluvinunclebert

VM shows multiple versions of the same product
==============================================

The cause of this is that the function vmTemplate->getCacheId() expects that
the variables $modulename, $pagename, $product_id, $category_id,
$manufacturer_id, $auth, $limitstart, $limit have been set up prior to the
function being called but they have not. That means that every product get
the same cache ID and so the cached version is reused for a different product.

A short-term workaround can be implemented in browse_layouttable.tpl.php
and browse_notables.tpl.php by changing the call to fetch_cache() to fetch().
Yereverluvinunclebert - Maker of some steampunk widgets of distinction

Luciffere

Gift based on total order
Web design, logo, branding, joomla, virtuemart, flash. Portofoliu web design: http://www.luciffere.ro/portofoliu.html