Hello, I want to report something about my weird problems and discoveries with the new MODX 3 when using output-filters. Maybe someone has the same problems or hints?
It might have been a combination of things but now it works (solved, but not satisfactory).
I like MODX and think it is a very good CMF which is developed and maintained by many volunteers. This costs a lot of free hours. Thanks!
Due to the community and github I have a fresh MODX 3.0.1 install running without error logs. The annoying thing is that it runs smoothly with 2.8.x without these “bugs” like in 3.0.1 and I some things cannot understand, e.g. square brackets: sometimes I have to double bracket (mosquito method) a query to make it work (see below).
I use MODX 2 for some private and community pages since this version exists and have always kept it up to date. I’ve never had so many problems switching to a higher version as I have with the new version 3.0.x, therefore I keep my current 2.8.4 versions.
Now version 3.0.1 is out and I have installed it on a new apache server with PHP 8.1.11 and only a few snippets installed. Many snippets are here from the community, github or self created, which all run without problems on MODX 2.8.4. Yes, I am aware that there are problems with such major updates, also because of new PHP 8.1.
Especially I like the output-filters from MODX (one of my killer feature) which I use in many chunks, even nested output filters with chunks and snippets run almost without problems under 2.8.4, unfortunately this is not usable with 3.0.1.
I have found many links about this matter or similar and one is very promising (last link):
- Output modifier issue in Modx 3.0.1-pl - #11 by dev_willis (Output modifier issue in Modx 3.0.1-pl)
- Notempty Output Filter cuts off value if it includes snippet properties · Issue #16186 · modxcms/revolution · GitHub (Notempty Output Filter cuts off value if it includes snippet)
- wrong parse when having a semi-column with a setting variables in output filter 'then' or 'else' · Issue #16044 · modxcms/revolution · GitHub (wrong parse when having a semi-column…)
- Revert and break nested output filters by JoshuaLuckers · Pull Request #16254 · modxcms/revolution · GitHub (Revert and break nested output filters)
- Migx php 8.0 nested getimage calls, is it a bug? - #12 by servingpixels (Migx php 8.0 nested getimage calls, is it a bug?)
- Revert and break nested output filters by JoshuaLuckers · Pull Request #16254 · modxcms/revolution · GitHub
The last link fix works after changing the line 56 in modInputFilter.php (hope this will be included in MODX 3.0.2) and something like this works again:
[[*tvGalleryPath:notempty=`<div class="photos gallery">[[$webPhotos? &tvPfad=`[[*tvGalleryPath]]`]]</div>`]]
… except for instance:
which works in 2.8.4, but 3.0.1 is simply rendered as text and not parsed.
Today I set the 2 chunks to uncashed and it works:
TV with notempty filter and chunk (mosquito method):
similar, but this works without mosquito method:
[[*tvGaleriePfad:notempty=`<div class="photos gallery">[[$webPhotos? &tvPfad=`[[*tvGaleriePfad]]`]]
All this is crazy for me and as mentioned above, this could be a combination of several factors, which I have never had with MODX 2.
- MODX 3.0.1 installation on Linux Server (Ubuntu)
- PHP: 8.1.11
- mySQL: 8.0.30
- Server API: FPM/FastCGI
- new site with this
btw, the new homepage with MODX 3.0.1: bitburg-masholder.de
Best greetings from Bitburg (Germany)