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 a twig template for showing a flag.
Display link as field: yes
AJAX link: yes
This template is (only) made of an anchor tag.
When the flag is not set, everything is fine... the template shows only <a ...>...</a>
But when I flag it, an extra div is added around my template (I don't like it as I would like to have an inline layout)
I don't know if this is linked, but I found this issue: https://www.drupal.org/node/736066
Comment | File | Size | Author |
---|---|---|---|
#4 | core-ajax-wrap-736066-191.patch | 4.88 KB | DiDebru |
Comments
Comment #2
DuneBLI confirm that the added div is coming from the Ajax request as after refreshing my page, the div disappears.
Comment #3
DiDebruI will test that patch in https://www.drupal.org/node/736066 tomorrow and report back if it fixes the issue.
Comment #4
DiDebruThe whole patch will not work but I pick out the relevant part and tadaa it worked.
But I'm not sure where to put it so I just put it in here :)
Comment #5
c.nish2k3 CreditAttribution: c.nish2k3 as a volunteer commentedThis issue has nothing to do with Flag module and needs to be fixed in the core (ajax.js). This is being worked on ticket #736066 and no action required here. I guess this can be closed on account of #736066
Comment #6
socketwench CreditAttribution: socketwench at TEN7 commented#736066: ajax.js insert command sometimes wraps content in a div, potentially producing invalid HTML and other bugs
Comment #7
socketwench CreditAttribution: socketwench at TEN7 commentedYeah, it looks like that's the case. :-(