Closed (fixed)
Project:
Open Social
Version:
8.x-8.2
Component:
Front-End
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 May 2020 at 15:56 UTC
Updated:
22 Oct 2020 at 12:29 UTC
Jump to comment: Most recent
Comments
Comment #2
collinm commentedNoticed 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.
Comment #3
kingdutchWhat I've been able to find out so far is that for some reason the
HTML::getUniqueIdis 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 thepost-widget.jsscript.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::setAjaxfor the file upload where it previously didn't do this. This causes the described problematic ID behaviour ingetUniqueIdon line 175 and 176.Comment #4
kingdutchA fix for this is included in https://github.com/goalgorilla/open_social/pull/2012
Comment #5
kingdutch