BUG: Order of Layouts in Templates reversed

Tested with Contentblocks 1.15.0 on a new MODX Instance.
Steps to reproduce the issue:

  • Create a CB Template
  • Add multiple Layouts to it
  • Go to a Ressource and use Template

Observed behaviour:
Layouts get inserted in reverse order

Might also be the case with earlier versions.

Hmm, I can’t reproduce this. It’s getting inserted correctly when I try on 1.15.

Can you export a minimal template that is doing this?

Sure, see attached:
cbTemplate_modx-revolution_2026-04-29@13-36-10.xml (722 Bytes)

We tested it on some more installations and we can reproduce it even on modx 2.x with cb 1.12. It only occurs if the template gets inserted into a non-empty ressource, if there is no other layout present, it works just fine.

Tested with Chrome and FF.

I don’t know what to say - I can’t reproduce this. I’ve tried on 2 more sites, one on 3.1 and one on 2.8 and it’s inserting in the right order in all cases with existing content or empty pages. Using Firefox.

There must be another factor interfering. Perhaps other plugins, browser extensions, custom input types?

Want to send me a login (support@modmore.com) for one of the sites you’re seeing this behavior on so I can check that out?

This happened when inserting a template at the top or in between existing layouts. Fixed in 1.15.1 (coming today/tomorrow).

1 Like