Problem/Motivation
After upgrading to varbase 9.0.16, it looks like there are some issues with the column styles. It looks like the column classes are not getting added.
Steps to reproduce
- Create a new page with paragraphs enabled
- Add two uneven columns
- Add two wrappers
- Set column styles
- See error
Proposed resolution
- Fix by a revert for broken and deprecated twig templates on for loops
- Limit the
9.0.xbranch to Drupal~9.0only - ✅ Release varbase_bootstrap_paragraphs-9.0.16
- #3395943: Revamp the 9.1.x branch for Varbase Bootstrap Paragraphs to work with Drupal ~10.1.0 and custom needed changes for a smoother upgrade process
- ✅ Release varbase_bootstrap_paragraphs-9.1.0
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ✅ Code review from 1 Varbase core team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Update Release Notes and Update Helper on new feature change/addition
- ✅ Release varbase-9.0.17, varbase_bootstrap_paragraphs-9.0.16
Varbase update type
- ✅ No Update
- ➖ Optional Update
- ➖ Forced Update
- ➖ Forced Update if Unchanged
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | fix.loop_.bug_.drupal10.patch | 8.98 KB | jedgar1mx |
| #3 | fix.loop_.bug_.patch | 8.79 KB | jedgar1mx |
| paragraphs2.png | 104.88 KB | jedgar1mx | |
| paragraphs1.png | 8.11 KB | jedgar1mx |
Comments
Comment #2
jedgar1mx commentedComment #3
jedgar1mx commentedLooks like the issue is with the key - item loops. They were split into a `for` and `if` statements which cause some weird behaviors. Probably caused by some linting tool since this affected all twig templates.
Comment #4
jedgar1mx commentedI think this was caused by trying to automate Drupal 10 fixes for deprecated twig templates on for loops. I updated the patch to match the new syntax.
Comment #5
jedgar1mx commentedComment #6
rajab natshahThank you, Edgar, for reporting and patching.
Testing, and will have a commit and quick fix release for this issue.
Comment #9
rajab natshahComment #12
rajab natshahComment #13
rajab natshahComment #14
rajab natshahComment #15
rajab natshah✅ Released varbase_bootstrap_paragraphs-9.0.16
Comment #16
rajab natshah9.0.xbranch to Drupal~9.0onlyComment #17
stefan.kornI suppose patch from #4 should have been used as the base for the change, but instead patch from #3 was used.
The bottom line is that there was conditional filtering in the for loop which has been deprecated with Twig 3. Patch from #3 removed the conditional filtering and moved the if condition in the for loop, but this breaks the bootstrap because loop.first is not correct then. Instead with patch from #4 the conditional filtering is Twig 3 (and Twig 2.10) compatible as it uses twig filter.
So the current state of the module is:
9.0 is back to old conditional filtering with if in the for loop, which is only Twig 2 compatible
9.1 and 10 are not using conditional filtering anymore (putting the if inside the for loop) and thus breaking the functionality. So for 9.1 and 10 this should be changed to use the TWIG filter instead as proposed with patch from #4.
Comment #18
rajab natshahFixed the logic again with more testing in
#3387135: Fix null returns for Background colors with columns in Twig ~3
Then
✅ Released varbase_bootstrap_paragraphs-9.0.17
✅ Released varbase_bootstrap_paragraphs-9.1.1
✅ Released varbase_bootstrap_paragraphs-10.0.0-rc2
Comment #19
stefan.kornHm, at least for carousel this does not work as expected I suppose:
https://git.drupalcode.org/project/varbase_bootstrap_paragraphs/-/blob/9...
loop.first is not reached, therefore no item is active initially and the carousel does not show.
Comment #21
rajab natshah✅ Released varbase-9.0.17
Comment #22
rajab natshah