Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Parser processing of static elements fails because of logic change in 2.2.9 #10211

@exside

Description

@exside

exside created Redmine issue ID 10211

In a quite painful bug searching activity I found out that static elements with a media source other than 0 (nothing) don't get processed right anymore. This is due the parser logic changes from Bug 10007 (http://bugs.modx.com/issues/10007 & opengeek@779ef05) that were released with 2.2.9.

I suddenly had wayfinder 2.3.3 not showing subnavs anymore after a 2.2.9 upgrade. I use ElementHelper to create modx objects/elements from static files. ElementHelper assigns a media source (default 1) to the created static elements.

I started to track it down like that:

  1. Installed older wayfinder 2.3.2, no changes
  2. Installed MODx 2.2.8 with wayfinder 2.3.3 and everything worked as expected, so the 2.2.9 release seemed to be the problem, but what. Went through the changelog and eventually found bug 10007, reverted all files to the last version and see, it works again. That new setProcessingElement() method from the modparser.class.php seems to be the problem, but I don't know what exactly...

How to reproduce:

  1. Install a copy of modx 2.2.9
  2. Install wayfinder 2.3.3
  3. create 4 chunks (normally through the manger + copy/paste) nav.main, nav.main.row, nav.sub, nav.sub.row,
  4. use these chunks to display your nav (be sure you have nested resources to generate subnavs), it should work
  5. then choose any chunk, open it in the manger and tick the "static" checkbox (but don't change the media source, so it's still on 0) -> it should still show the subnav
  6. then change the media source to something else than 0, eg 1 for the filesystem, now the subnavs are gone because magically the [[+wf.wrapper]] placeholder form the inner chunks get stripped from the output.

I only observed this with wayfinder till now, but I think this could also be an issue with other extras.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-corebugThe issue in the code or project, which should be addressed.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions