Problem/Motivation

The logic to determine the section number is flawed for section 3 and up, as it adds up to the previous calculated section number instead of using the position in the loop.
But when a section has no config, the loop has an early return before the calculation of the section number, messing up this and all next sections.

The attached patch contains a fix that always calculates the section number based on the position in the loop.

Steps to reproduce

I created a test to make this more visible.
To visually see the issues, comment out the assertions and check the browsertest output.

Proposed resolution

The attached patch contains a fix for the section number calculation + extends the multiple sections test to cover this issue.

Remaining tasks

none

User interface changes

none

API changes

none

Data model changes

none

CommentFileSizeAuthor
#2 3202623-2.patch4.14 KBmollux
#2 3202623-2-fail.patch4.27 KBmollux

Comments

mollux created an issue. See original summary.

mollux’s picture

StatusFileSize
new4.27 KB
new4.14 KB

See the attached patches to reproduce the issue, and to fix it

  • swentel committed 513d61f on 8.x-1.x authored by mollux
    Issue #3202623 by mollux: Empty section lock settings for section 3 and...
swentel’s picture

Status: Active » Fixed

Awesome! It took me a while to figure this out manually, but I now finally have a setup again for testing this module, so thanks for that too ;)

Committed and pushed, new release coming up.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.