Fork me on GitHub

pnRender cache and menu blocks  Bottom

  • We have menu blocks that show up when a user logs in (managed by group permissions).

    A problem occurs if pnRender caching and no force compile settings are on.

    The first block in the position (say left) renders fine, but subsequent menu blocks ALL inherit the same content.

    I'm guessing the cache check in the block rendering code is not using the block ID correctly, so all menu blocks are all rendered as if they are the same.

    Anyone else seen this behavior?

    To duplicate:

    Set up a regular menu block with a few links

    Set up another menu block with a few different links.

    Set pnRender to CACHE and not force compilation.

    Menu 1 renders fine.
    Menu 2 title renders fine
    Menu 2 links are the same as Menu 1.

    RC3 (SVN as of Feb. 28th)

    NCM
    SwitchBit / UHEweb

    EDIT - hmm...NOT seeing this on one copy of an RC3 site, and am on another that went from RC2 - > RC3 via SVN update. Im' goingto look into this further.



    edited by: uheweb, Feb 29, 2008 - 01:17 PM
  • EDIT - see last comment above, I'm going to try it on a clean install, and an upgraded .764 to RC3. Ignore below until I report back icon_smile

    Looks like the issue is in menu.php of /system/Blocks/pnblocks

    The pnRender instance references Blocks, and pnUserGetVar('uid') - Line 58 of Blocks_menublock_display

    So, several instances of the same menu block would only create one cache - the first menu block.

    This is why the title is ok, but the content is duplicated in subsequent blocks.

    Perhaps a blockid or blocktitle should be added to the cache id to avoid this.

    NCM
    SwitchBit / UHEweb

    Let me know if you'd like me to post this as a bug in the tracker.



    edited by: uheweb, Feb 29, 2008 - 01:19 PM
  • I confirm this problem. With PnRender activated and two or more menu blocks, the links are the same as first menu block.
  • This bug is now fixed in SVN for both the menu and extmenu blocks.

    -Mark

    --
    Visit My homepage and Zikula themes.

This list is based on users active over the last 60 minutes.