Fork me on GitHub

pnRender caching ruins menutree javascript/css on home page if start module is NONE  Bottom

  • When using menutree 2.2 on Zikula 1.2.2 (suckertreevert), setting pnRender caching to true does strange things to the pagevars.

    To reproduce: Install and activate menutree module.
    Add menutree block, select suckertree vertical and place in block that shows on homepage
    Admin Panel --> General settings-->Start module = NONE (static page)
    Set pnRender cache to active

    The first load of the homepage is perfect. The second strips off all CSS and JS. Clearing the pnRender cache makes it load correctly one time, then its corrupted again.

    What's interesting, is this is only on the home.htm. master.htm doesn't have the same issues.

    An interesting thing - if the home.html template has the added, then the javascript will load but not the CSS for the menu to style correctly.

    If the is added AND the start module is set to something like news, the javascript AND CSS load correctly, even with caching enabled.

    Sounds like the caching mechanism is short cutting loading CSS and JS for blocks if no main content is generated.

    Ideas on how to fix? I guess I could create a dummy module just for the front page, but that's a hack.

    NCM
    UHE/Switchbit
  • For now, I just select NEWS as the start module, and remove from the home.htm template. I will probably whip up a blank/faux start module that just loads nothing to ease CPU/DB use.
  • Same bug. Hope solved the problem, posted ticket:
    http://code.zikula.org/bianor/ticket/56
    In the ticked you can find the solution - move section with:
    PageUtil::addVar('stylesheet', $varsmenutree_stylesheet?);
    above:
    if ($pnRender->is_cached($varsmenutree_tpl?)) {

    Hope module developers to include in next version.



    Edited by nikp on Feb 08, 2011 - 07:17 AM.
  • It might be good to also log the ticket in the Core, since from zk1.3 menutree is included int he Core.
    Good that you have found a solution already icon_smile

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • Yes, it is good menutree is part of the core in Zikula 1.3. Yes, checked he code and the bug is there... so posted ticked in the core:
    http://code.zikula.org/core/ticket/2821
  • I see the same behaviour with Memberslist. The first load is ok, with the second load, menutree gets corrupted. Clearing the pnRender cache allows just another load of Memberslist, then it gets corrupted again. This happens even without setting pnRender caching to true, and even without setting its compile check to true



    Edited by thilowitt on Feb 10, 2011 - 09:08 PM.

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