The catalog block does not expand to reveal sub-categories for anonymous users. It remains completely collapsed throughout hte entire user experience.

I disabled block caching and that fixed it ***BUT*** along with the cart block for anonymous users issue this means that I now have to disable Drupal block caching *AND* Drupal full site caching to get UberCart to work properly??!!

This is very bad.

Comments

Island Usurper’s picture

Priority:Critical» Normal
Status:Active» Needs review
StatusFileSize
new416 bytes

Well, the Catalog block isn't designed to work with block caching.

But that's actually a really easy fix. It's designed to look different on each page, so that's what the cache setting should be. Theoretically, it can also be different because of the user's role, but block caching is disabled in the presence of content access modules.

Island Usurper’s picture

StatusFileSize
new393 bytes

Bah. This patch.

jasonabc’s picture

Hey Lyle - thanks for the speedy patch to this issue. I installed on UC 2.2 and tested it out as an anonymous user. It works great.

thanks again

Jason

jasonabc’s picture

Status:Needs review» Active

do I need to change the status to something other than "active" in order to get this into the next release?

TR’s picture

Status:Active» Needs review

@jasonbc: Yes, you need to reproduce the problem, apply the patch, confirm the patch solves the problem without causing any other problems, then post to describe what you've done and change the status to RBTC.

jasonabc’s picture

Status:Needs review» Reviewed & tested by the community

ok well as I said above - I installed on UC 2.2 and tested it out as an anonymous user. It works great. No problems were encountered and the catalog block now expands properly for anonymous users (requires Block Caching set to "disabled").

cheers

Jason

TR’s picture

Status:Reviewed & tested by the community» Fixed

Committed. Thanks.

Island Usurper’s picture

Wait, did you test it with block caching enabled? That's what this patch is supposed to fix.

jasonabc’s picture

Status:Fixed» Needs review

Hi Lyle - before I applied your patch I was getting inconsistent expand/collapse results with Block Caching disabled. When I applied the patch - the Catalog block started behaving properly (so thought the patch was good to go).

The patch does not work if Block Caching is enabled (i.e. the block remains completely collapsed for anonymous users throughout the entire store experience)

thanks

Jason

Grant Petersen’s picture

Good morning,
I'd been puzzled by this behaviour too and tried the mentioned patch so I can confirm this:
With the patch (654648_catalog_cache.patch 393 bytes) applied to uc_catalog.module and Block Caching enabled, the Catalog block is always collapsed for anonymous users. Disable Block Caching and it expands/collapses correctly.

I'm leaving Block Caching disabled for now.

Thanks - Grant.

jasonabc’s picture

@ Grant Petersen - confirmed. This is happening for me also. Am leaving Block Caching disabled for now but would be great to get a patch for this so the catalog block works properly.

Island Usurper’s picture

Try saving the block administration form again, or disabling and enabling the catalog block. All of the block info data is stored in the {blocks} table, so it might need to be refreshed from the code before the changes will take effect.

TR’s picture

Definitely have to go to the admin/build/block form and save it in order for this new setting to take effect. I guess this update should be forced in uc_catalog_update_N()

Grant Petersen’s picture

Thank you Island Usurper, I have just tried your suggestion and included a blow by blow in case it helps.

Login as an admin.
Go to Administer | Site Building | Blocks
Click [Save Blocks] - (no changes made to the block layout at all)
Got "The block settings have been updated." Message.

Log out. (block cache still disabled)
Catalog expands and collapses.

Log in.
Go to Administer | Site configuration |Performance
and check Block cache: enabled and save.

Log out.
Catalog won't expand.

Login.
Go to Administer | Site Building | Blocks
Set Catalog region to <none> and save blocks.
Set Catalog region to [Right Sidebar Top] and save blocks. (my theme has Right Sidebar Top and Right Sidebar Bottom)

Logout.
Catalog won't expand.

Login.
Go to Administer | Site configuration | Performance
Hit Clear cached Data.

Logout.
Catalog Block won't expand.
Check and make sure uc_catalog.module is patched (copy and paste lines starting at 403):

   case 'list':
      $blocks[0]['info'] = variable_get('uc_catalog_name', t('Catalog'));
      $blocks[0]['cache'] = BLOCK_CACHE_PER_PAGE;
      return $blocks;

Login.
Change the title of the catalog block and save it.

Logout.
Catalog Block won't expand.

Login
Catalog expands and collapses.
Disable Block Caching

Logout.
Catalog expands and collapses.

I must be missing something.
Drupal ver 6.15
ubercart-6.x-2.2

jasonawant’s picture

Version:6.x-2.2» 6.x-2.4
Status:Needs review» Active

Hi,

I see this patch is included in the 6.x-2.4 version, but the catalog menu block continues to not function properly with block caching enabled.

Does anyone have any helpful troubleshooting tips?

Thanks, jwant.

TR’s picture

Status:Active» Postponed (maintainer needs more info)

@jwant: Please describe *exactly* what you mean when you say it does "not function properly", and supply enough information for someone to reproduce your problem. Is this for anonymous users? Authenticated users? Both? What are your page caching settings? Etc.

ntrepid8’s picture

Version:6.x-2.4» 6.x-2.6
Component:Code» Cart/checkout

I also have this problem. I had to disable all caching to get the cart block to expand for anonymous users.

longwave’s picture

Status:Postponed (maintainer needs more info)» Closed (cannot reproduce)

Cannot reproduce this on latest 6.x. Catalog block functions correctly for anonymous users with all combinations of page and block caching.

@ntrepid8: you say "cart block", this issue is about the catalog block - please open a new issue if you have a different problem.

xl_cheese’s picture

Version:6.x-2.6» 6.x-2.11
Issue summary:View changes
Status:Closed (cannot reproduce)» Active

I have always had this behavior. I'm now at ubercart 2.11 and still can only get the cart to expand and show products if both page and block caching is off. When I enable caching the cart block will not expand.

I get the same issue when also using Ajax cart.

longwave’s picture

Status:Active» Closed (cannot reproduce)

@xl_cheese: you say "cart block", this issue is about the catalog block, which is a separate issue that has long since been fixed - please open a new issue if you have a different problem.

xl_cheese’s picture

Snap! I'm sorry.