U4-6687 - Can't add multiple instances of a macro in RTE in 7.2.6 without ruining RTE formatting

Created by Geoff Polzin 09 Jun 2015, 02:33:50 Updated by Shannon Deminick 16 Jul 2015, 10:58:36

What did you do? I've created a partial view macro that accepts a few parameters which is set to be insertable by the RTE. This macro is designed to be repeatable... IE I should be able to add as many of them to a page as I want, (with different parameters of course)

What did you expect to happen? I expected each of the macros to be rendered individually within the RTE in the position that I've inserted them. And for this to also be reflected on the frontend.

What actually happened? Inserting the macros is fine, until "Save and Publish" is clicked. Each of the individual macros that I inserted collapses into one. Any content in the RTE disappears from view. Viewing the source code, the entire content in the RTE is wrapped in the

tag rather than each individual macro having it's own tags.

-Result of which is: content in the RTE can no longer be edited. -Individual macro properties cannot be edited -Content cannot be previewed within RTE

I believe this is a new problem with 7.2.6 as I was not witnessing this problem with my macros in 7.2.5

Attached is a screenshot of the resultant code that is rendered to the RTE. (I had originally inserted a macro, a few paragraphs of text and then another macro. But upon save & publish, the first macro's tags have wrapped around the entire content block)

1 Attachments


Thomas Rankin 09 Jun 2015, 19:11:10

I've got a minor tweak to the 7.2.6 release that will fix this issue. Working on making a pull request now.

Shannon Deminick 16 Jul 2015, 10:58:11

Had to re-fix this in rev: 9e2ab8507fdf313fd6e1f0fc3247f06c1f05b62f Unfortunately a bug was caused by this commit: 4ec66bc8686ba62d584e6f85e3421b9379d0bfec to fix the position of the macroAlias tag. I've added a unit test in the latest fix

Priority: Major

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.6

Due in version: 7.2.8


Story Points: