Closed (fixed)
Project:
Similar Entries
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
30 Apr 2008 at 21:54 UTC
Updated:
22 May 2009 at 13:50 UTC
Anonymous users see the exact same content in the "similar entries" block no matter the node or node type. Authenticated users find content in the similar entries block change as they access various nodes.
Comments
Comment #1
bryansd commentedThis issue is observed when Drupal core's block cache is enabled and regardless of whether cache setting in similar entry module is enabled or disabled. Two possibilities might be:
With block-level caching now available in Drupal 6 is there an advantage to this module having its own caching function?
Comment #2
deekayen commentedI wasn't aware of the new core block cache. You're probably right that the custom one can be removed.
Comment #3
deekayen commentedI switched it to use BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE for HEAD in CVS:
http://drupal.org/node/95612
Whenever that updates, I'm interested in your feedback. Mark it reviewed and tested if you like it.
Comment #4
bryansd commentedAs of this hour, the link you provided hasn't yet updated. I downloaded from the cvs, but may wait to comment further until I'm able to pull the actual update you've linked to.
I ran into a problem where the cache setting in the block table never changed from the default ( 1 for BLOCK_CACHE_PER_ROLE ). So, I disabled the similar module, deleted the database entry for the similar block in the block table, and then enabled the module again. When I enabled the module the correct block cache setting was set (5 for BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE ) and the similar module worked as desired. Some question whether this specific issue is due to additional D5 to D6 changes not recognized in the similar module or an issue with hook_block in the D6 core: http://drupal.org/node/235673 .
Comment #5
deekayen commentedWhat do you think about me adding an upgrade hook to do exactly what you did, remove and re-create the block entry.
Comment #6
bryansd commentedDeekayen: I think an upgrade hook would be beneficial.
The nightly snapshot ( http://drupal.org/node/95612 ) of the HEAD never seemed to update, but what I got from the CVS looks good so far. I've kept the status the same as you're likely needing additional review of the code.
Comment #7
idflorin commentedI tried the nightly snapshot and as you can see on adsneeze, nodes get the same similar entries.
I'm ussing:
- drupal's block cache
-for Similar entries module : Cache: Disabled.
That should I do ? (and please don't say to disable drupal's block cache)
Comment #8
deekayen commented#7: please clarify - you're using nightly HEAD snapshot or 6.x-1.0? You mentioned snapshot, but marked 6.x-1.0. They use two different cache methods.
Comment #9
idflorin commentedI tried http://drupal.org/node/95612 and 6.x-1.0 official, but with no use. Finnaly I disable d6 block cache :(( and the similar module works perfect.
[I tried to hack into the similar.module with something like here http://drupal.org/node/277573#comment-905049, but no success, my php&drupal knowledge is limited]
Comment #10
parabiodox commentedComment #11
bsimon commentedI encountered the same problem - anon users all see the same block on every page (unless I disable block cache)
BryanSD's solution does fix this (see http://drupal.org/node/253299#comment-829088), but I wondering if there's a more recent fix for this that I've missed. Surely there must be an simpler way to get the module working? Is there a dev version with the cache problem patch already incorporated?
For anyone else who has trouble, this was my solution:
1 Get the updated similar.module from http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/similar/sim... and replace the existing file in sites/all/modules/similar...
2 In Admin/modules - Disable Similar Entries module
3 You need something like PHPmyAdmin. Look in your database, the 'blocks' table. Look down the column titled 'module' and find the row with 'similar' - almost certainly it will be the very last one. Delete the entire row (If unsure about this, backup your database first).
4 Re-enable Similar Entries module, then go to admin/blocks to configure the Similar block - it should now be working for anonymous users
Comment #12
jellicle commentedI encountered the same problem, and confirm that bsimon's fix in comment #11 does work (eliminating the conflict between the two caches). Can we get a new release of this module with the CVS code since it does fix a showstopper bug?
Comment #13
deekayen commentedRather than deleting the entire similar row in the blocks table, just switch the similar row cache value from 1 to 5. This will happen automatically through an update function included in the next version. Look for a new release probably later today.