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
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- craigh responded to »Using PageUtil::addVar() to load script code« 03:29 PM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
pnRender caching ruins menutree javascript/css on home page if start module is NONE
-
- Rank: Helper
- Registered: Sep 16, 2004
- Last visit: Oct 21, 2009
- Posts: 731
-
- Rank: Helper
- Registered: Sep 16, 2004
- Last visit: Oct 21, 2009
- Posts: 731
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. -
- Rank: Developer
- Registered: Nov 23, 2002
- Last visit: Jul 26, 2004
- Posts: 17
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. -
- Rank: Developer
- Registered: Aug 23, 2003
- Last visit: May 31, 2010
- Posts: 1428
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
--
campertoday.nl, Module development, Dutch Zikula Community -
- Rank: Developer
- Registered: Nov 23, 2002
- Last visit: Jul 26, 2004
- Posts: 17
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 -
- Rank: Freshman
- Registered: Dec 31, 1969
- Last visit: Apr 13, 2010
- Posts: 62
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.
- Moderated by:
- Support
