I’ve recently updated to MODx Revolution 2.1.2-pl (traditional) from MODx Revolution 2.0.7-pl (traditional) and a number of the output filters have stopped working.
The best way for me to explain is show some examples to demonstrate what works and what doesn’t.
Hopefully someone can at least reproduce this issue and at best help me fix it
I have a chunk called siteHeader, which has a load of html for building the html site header contents. The following code should produce a title output with a piece of text, prefixed with a page number if appropriate and default back to the pagetitle if there is no longtitle.
<title>[[!getGet? &getName=`page`]][[+titleOverride:default=`[[*longtitle]]`]][[!If? &subject=`[[*longtitle]]` &operator=`isempty` &then=`[[*pagetitle]]` ]]</title>
It actually returns blank. If I go onto a second page of pagination I get the following output:
When it should be outputting :
<title>Page 2 - Page Long Title Content</title>
After finding this I started playing around. The pagetitle can be displayed fine in place of the longtitle without an issue, like so:
<title>[[!getGet? &getName=`page`]][[+titleOverride:default=`[[*pagetitle]]`]]</title>
The real thing that’s curious is that I can get the longtitle to appear if I put the following code in:
<title>[[!getGet? &getName=`page`]][[+titleOverride:default=`[[*pagetitle]]`]][[!If? &subject=`[[*longtitle]]` &operator=`isempty` &then=`[[*pagetitle]]` ]]</title>
<!--[[*longtitle]]-->
By outputting the longtitle in a comment after (it even work before) the outputting of the same placeholder in the title html, it works.
Can anyone offer any advice on this?
Thanks in advance.
David.
Here’s all the relevant details from the ’System Info’:
- MODx version: MODx Revolution 2.1.2-pl (traditional)
- Server OS: CentOS release 5.6 (Final)
- PHP version:5.3.6
- MySQL Server version: 5.1.57
- MySQL Client API version: 5.1.57
- pdo_mysql installed: yes
- no opcode caching