I setup a 3 column layout of the stream with Post block.
When adding an image to the post it's uploaded and displayed (but not post it) and then remove the image again, you can't select another image. The document browser window does not pop up anymore.

Thanks!

CommentFileSizeAuthor
2020-05-07_17-53-43.png15.71 KBTaco Potze

Comments

Taco Potze created an issue. See original summary.

collinm’s picture

Noticed this issue too when testing image upload functionality. So far this issue also applies to all the other image upload fields I tested, for example the "Banner image" field on the profile edit page.

kingdutch’s picture

What I've been able to find out so far is that for some reason the HTML::getUniqueId is invoked which adds a random string behind the IDs in the AJAX response. This seems to cause the replacement in the form to be incorrect.

There's also a <div style=""></div> wrapper added to the replaced content. This breaks the layout styling and the selectors in the post-widget.js script.

As part of #3171502: The SVG icon on the remove image from post button is decorative and should not be visible for screenreaders a workaround for the script will be implemented which at least restores the functionality. However, the changed IDs and blank wrapper still cause replacement to fail leading to layout issues.

I've been unable to trace back where this regression was introduced so it's difficult to pinpoint a cause. I suspect that something now calls Drupal\Component\Utility\Html::setAjax for the file upload where it previously didn't do this. This causes the described problematic ID behaviour in getUniqueId on line 175 and 176.

kingdutch’s picture

Status: Active » Needs review
kingdutch’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.