The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 19 posts ] 
Author Message
PostPosted: Tue May 22, 2012 6:00 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon May 21, 2012 6:01 pm
Posts: 4
Hello,

I'm running into a problem in Joomla 2.5.4 where the same content is being returned for two pages that are of the same Menu Item
Type, but use different categories when caching is enabled.

How to Reproduce:

1) Create a menu item called Home that is of Menu Item Type
"Articles >> Featured Articles".

2) Set the category for menu item Home to a category called Home.

3) Create a menu item called Contacts that is of Menu Item Type
"Articles >> Featured Articles".

4) Set the category for menu item Contacts to a category called Contacts.

5) Enable the Cache via the Global Configuration -> System page.
The problem occurs with both Progressive and Conservative
caching.

6) Visit the Home page and then the Contacts page. The Contacts
page will display the same information as the Home page instead
of displaying information related to its category.

I'm not familar with the Joomla code, but I did trace the code down to JCacheControllerView in libraries/joomla/cache/controller/view.php. The cache id being generated for both the Home and Contacts page are the same.
Modifying _makeId() slightly to include the current URL will work, but it might break something else.

Am I doing something wrong or did I hit a problem with how Joomla 2.5.4 caches views? Thanks for your help.

--- view.php.orig 2012-03-22 08:47:52.000000000 -0500
+++ view.php 2012-05-21 23:15:54.000000000 -0500
@@ -132,6 +137,6 @@
*/
protected function _makeId(&$view, $method)
{
- return md5(serialize(array(JCache::makeId(), get_class($view), $method)));
+ return md5(serialize(array(JCache::makeId(), get_class($view), $method, JURI::current())));
}
}


Top
 Profile  
 
PostPosted: Tue Oct 02, 2012 8:40 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Oct 02, 2012 8:36 pm
Posts: 1
I have found this same issue, reproduced as above. Both / either turning on Cache in Global Config or the Plugin creates this issue with Featured Articles. The Featured articles from one tab's set of categories are carried over to other tabs. Any luck with resolving this?


Top
 Profile  
 
PostPosted: Wed Oct 03, 2012 1:34 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon May 21, 2012 6:01 pm
Posts: 4
It looks more like a bug to me. I haven't figured out where I should report the problem on the Joomla site. The problem is that the makdeId function is not using the URI to create a unique identifier for the cached page. Modifying libraries/joomla/cache/controller/view.php does work.


Top
 Profile  
 
PostPosted: Sat Oct 06, 2012 2:51 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Fri Oct 13, 2006 8:24 am
Posts: 272
Have you tried clearing the Joomla cache?

'Site' -> 'Maintenance' -> 'Clear Cache' and 'Purge Expired Cache'.

See if that helps.

_________________
Sean Clement -- Dean Marshall Consultancy Ltd
http://www.webdevelopmentconsultancy.com/
We CAN de-hack your Joomla powered website in less than 24 hours GUARANTEED!
http://www.webdevelopmentconsultancy.com/security-tools/dmc-firewall.html


Top
 Profile  
 
PostPosted: Sat Oct 06, 2012 4:48 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon May 21, 2012 6:01 pm
Posts: 4
Yep, I had tried clearing the cache and that didn't help. The problem is that the unique name constructed for the cached file is not unique. I added the URL to the md5 call so that the correct cached file is returned.

Do you know where can I report this problem?


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 4:40 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
Hi, I have this same problem.

Have you been able to report this? Could you provide some more information on how you were able to fix this??

Thanks

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 5:12 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
I can confirm that your fix works and I have since added a report here...

http://joomlacode.org/gf/project/joomla ... m_id=29686

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Thu Nov 15, 2012 2:48 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon May 21, 2012 6:01 pm
Posts: 4
Thanks for submitting the bug report. I wasn't sure where it should be submitted.


Top
 Profile  
 
PostPosted: Sat Nov 17, 2012 2:36 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
The Bug has been confirmed and a patch added to correctly resolve it.

http://joomlacode.org/gf/project/joomla ... m_id=29686

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Thu Jan 17, 2013 11:01 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jan 09, 2012 11:56 am
Posts: 9
in the link says :closed
Really solved in 2.5.8 ¿?

I've this version and the problem is not solved yet

at least for my site

any one can confirm it?


Top
 Profile  
 
PostPosted: Thu Jan 17, 2013 12:02 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Fri Jan 27, 2012 9:16 am
Posts: 102
hi
i know cache in joomla most be static
Code:
static protected function _makeId () // step on

_________________
Majid-Mit
my knowledge is know to not know
http://freeclup.com/index.php/en/


Top
 Profile  
 
PostPosted: Thu Jan 17, 2013 12:23 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jan 09, 2012 11:56 am
Posts: 9
hi

do you mean "conservative" ?


Top
 Profile  
 
PostPosted: Thu Jan 17, 2013 1:48 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jan 09, 2012 11:56 am
Posts: 9
using "conservative" cache the problem is in the format (colums, etc.) not in the category...


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 6:56 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
IF you apply the patch the problem is resolved - but its not resolved in 2.5.8 yet- it should be resolved in 2.5.9

jaume_teixido wrote:
in the link says :closed
Really solved in 2.5.8 ¿?

I've this version and the problem is not solved yet

at least for my site

any one can confirm it?

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Fri Jan 18, 2013 7:45 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jan 09, 2012 11:56 am
Posts: 9
Thanks!!!!


Top
 Profile  
 
PostPosted: Wed Apr 10, 2013 3:39 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jan 09, 2012 11:56 am
Posts: 9
Not solved yet in 2.5.9 ???


Top
 Profile  
 
PostPosted: Thu Apr 11, 2013 3:30 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
Yes it was not resolved on my 2.5.9 yet as well.

It seems that they found another bug related to this

http://joomlacode.org/gf/project/joomla ... m_id=29250

and that this is now the correct patch to add

http://joomlacode.org/gf/download/track ... ennis.diff

All you need to do is:

Edit: /components/com_content/controller.php

Change line 66:

Code:
'showall'=>'INT', 'return'=>'BASE64', 'filter'=>'STRING', 'filter_order'=>'CMD', 'filter_order_Dir'=>'CMD', 'filter-search'=>'STRING', 'print'=>'BOOLEAN', 'lang'=>'CMD');


To This:

Code:
'showall'=>'INT', 'return'=>'BASE64', 'filter'=>'STRING', 'filter_order'=>'CMD', 'filter_order_Dir'=>'CMD', 'filter-search'=>'STRING', 'print'=>'BOOLEAN', 'lang'=>'CMD', 'Itemid'=>'INT');

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
PostPosted: Mon Apr 15, 2013 6:36 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Jan 09, 2012 11:56 am
Posts: 9
thanks!!!


Top
 Profile  
 
PostPosted: Mon Apr 15, 2013 9:22 am 
Joomla! Intern
Joomla! Intern

Joined: Tue Jun 28, 2011 6:29 am
Posts: 50
No Problem!

_________________
Kiteplans.infoThe daily life of a System Admin
► CentOS Virtualmin ► Joomla Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 



Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group