Greetings,
I'm stumped by a broken Wayfinder menu when on a symlink.
I'm getting inconsistent behavior from Wayfinder and/or UltimateParent that seems to relate to page caching. Depending on if the linked-to resource or the symlink is the first to be cached, the resulting menu can break.. See bottom of the post for reference & technical details.
SITE SETUP
In a nutshell, I have symlink resources -- and some "regular" resources in their own "special audiences" part of the tree -- so content editors can cherry-pick site content for particular visitor audiences on a neat and clean menu. For the sample tree below, I want visitors to resources #9,10,11, 12 & 13 to see a menu of those documents when on any of those documents.
PROBLEM
If the first save to the page cache is for the symlink (vs. to its actual source resource, for example symlink ID 11, which links to ID 3), all works well and the symlink shows the correct Wayfinder output for its "special audience" section.
If, however, from a clean cache, a resource that is linked to by a symlink (using the same example, resource ID 3) is the first to be written to cache, the Wayfinder menu shown for the symlink resource (ID 11) shows resources #3, 4 and 5.
If one of the actual non-symlink resources (for example, ID 10 or 12) is selected, the menu is correct in all cases.
- Clearing cache (manually and via manager) and trying again shows this to be repeatable
- Setting the symlink resource to non-cached stops the problem, but obviously comes with a performance penalty
- All combinations of cached / uncached calls to Wayfinder and UltimateParent fail to prevent the problem
- Changing Wayfinder cacheResults setting does not alter the behavior
- I looked through the changelog for Revo 2.2.1-pl, and don't see anything that applies
- No user groups / permissions / resource groups, etc. have been assigned at all on this install
Any ideas out there? I'm stumped.
Second question -- if the "real" resource is cached and its symlink(s) aren't is there a real performance penalty? Maybe that is an acceptable solution if no substantial performance hit.
BACKGROUND
Wayfinder Call
[[Wayfinder? &startId=`[[UltimateParent? &topLevel=`3`]]` &displayStart=`1` &startItemTpl=`wayfinderNavSecondaryStartItemTpl` &rowTpl=`wayfinderRowTpl`]]
wayfinderNavSecondaryStartItemTpl
<h1>[[+wf.linktext:htmlent]]</h1>[[+wf.wrapper]]
wayfinderRowTpl
<li[[+wf.id]][[+wf.classes]]><a href="[[+wf.link]]" title="[[+wf.title:htmlent]]" [[+wf.attributes]]>[[+wf.linktext:htmlent]]</a>[[+wf.wrapper]]</li>
Resource Tree (D "regular resource document", S symlink. Digits = resource ID)
Web Root
|--Home (D: 1)
|--ParentA (D: 2)
|--ChildA (D: 3)
|--ChildB (D: 4)
|--ChildC (D: 5)
|--ParentB (D: 6)
|--ChildA (D: 7)
|--Special Audience Collections (D: eight)
|--Special AudienceA (D: 9)
|--AudienceA Doc1 (D: 10)
|--AudienceA Symlink1 (S: 11, linked to D3)
|--AudienceA Doc2 (D: 12)
|--AudienceA Symlink2 (S: 13, linked to D5)
|--Special AudienceB (D: 14)
|--AudienceB Doc1 (D: 15)
etc.
Server: Apache 2.2.22
OS: linux 2.6.32-20120131.55.1.bh6.x86_64
DB: MySQL: 5.1.61-community-log
MODX:
Revolution 2.2.0-pl2 (advanced) - core outside of document_root
Friendly-URL enabled (and working)
Related packages installed:
Wayfinder 2.3.3-pl
UltimateParent 2.0-pl
[ed. note: clareoconsulting last edited this post 14 years, 5 months ago.]