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.
I have added the flag bookmark and have it configured to use the AJAX link type. Each time I click the link, the ajax works to add/remove the link from bookmarks, but it also inserts and extra div each time, so, multiple clicks nests the link deeper and deeper within divs. See the attached screenshot of browser inspector.
Comment | File | Size | Author |
---|---|---|---|
flag-extra-divs.png | 198.53 KB | nrackleff |
Comments
Comment #2
nrackleff CreditAttribution: nrackleff at ThinkShout commentedComment #3
maticb CreditAttribution: maticb commentedI cannot reproduce this, can you add more details about your setup? Could it be the "theme debug" that you're using, as seen on your screenshot?
Comment #4
nrackleff CreditAttribution: nrackleff commentedThat is a good question. I will turn debug off and let you know what I find out.
Comment #5
socketwench CreditAttribution: socketwench at TEN7 commentedAny progress with the theme debug, @nrackleff? I seem to remember the debug template adds a div....
Comment #6
nrackleff CreditAttribution: nrackleff commentedI got sidetracked today and didn’t have time to check. I will try again tomorrow.
Comment #7
socketwench CreditAttribution: socketwench at TEN7 commentedCould this be related to #736066: ajax.js insert command sometimes wraps content in a div, potentially producing invalid HTML and other bugs
Comment #8
KarimBou CreditAttribution: KarimBou as a volunteer commentedIt seems this isn't due to the flag module by itself, empty div are added (wrapped) for any ajax query such as search filters for instance.
Comment #9
idebr CreditAttribution: idebr at iO commentedThis was fixed in Drupal Core, see #736066: ajax.js insert command sometimes wraps content in a div, potentially producing invalid HTML and other bugs