Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Not all P items are being process.
This issue stood out with the new filter option and the last image not being processed, but debugging within media_wysiwyg_filter_paragraph_fix() showed that this too had the issued.
Root cause is the modification of the DOMNodeList during the iteration of the list items.
Proposed resolution
Store the DOMNodes during the iteration and remove afterwards.
Remaining tasks
More testing ;)
User interface changes
None
Comments
Comment #2
Alan D. CreditAttribution: Alan D. commentedComment #3
Alan D. CreditAttribution: Alan D. commentedComment #5
Alan D. CreditAttribution: Alan D. commentedSorry, with the coding std issues resolved.
Comment #6
Alan D. CreditAttribution: Alan D. commentedduh, the do {} while(); too. Yuk, personally prefer the expanded version...
Comment #7
joseph.olstadwow @Alan D , nice work!
I will put this in 7.x-3.x dev
Comment #9
joseph.olstadfixed in 7.x-3.x-dev
Comment #10
joseph.olstadsetting to needs review for 7.x-2.x-dev
Comment #11
joseph.olstadComment #13
joseph.olstadThis was just merged into 7.x-2.x and is included in release 7.x-2.6
Comment #14
joseph.olstad