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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3202623-2.patch | 4.14 KB | mollux |
| #2 | 3202623-2-fail.patch | 4.27 KB | mollux |
Comments
Comment #2
mollux commentedSee the attached patches to reproduce the issue, and to fix it
Comment #4
swentel commentedAwesome! 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.