Project

General

Profile

Actions

Bug #7174

open

Nested [cb:else] and [cb:elseif] do not work properly

Added by krileon almost 6 years ago. Updated 6 months ago.

Status:
Assigned
Priority:
Normal
Assignee:
Target version:
Start date:
30 May 2018
Due date:
% Done:

0%

Estimated time:

Description

If you've a nested [cb:if] and it has an [cb:else] in addition to its parent [cb:if] then the parent [cb:else] will never be used since the nested [cb:else] is matched first by the regexp. A fix maybe to handle nested [cb:if] conditions before handling [cb:else] and [cb:elseif]. Example to test this as follows.

[cb:if name="FAKE_1"]
This won't display.
[cb:if name="FAKE_2"]
This won't display.
[cb:else]
This will display, but shouldn't.
[cb:else]
[/cb:if]
[cb:else]
This won't display, but should.
[/cb:else]
[/cb:if]

https://www.joomlapolis.com/forum/153-professional-member-support/239205-cb-if-with-progress-field#304917

Actions

Also available in: Atom PDF