You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have discovered an issue for my particular use case. I am using Dropzone to allow the attachment of files to comments, both replies and root comments.
However, when rendering to the DOM the same ID is used (as it's mapped to the field name). This therefore causes all Dropzones to fire when clicking on any of the Dropzones and forces all files added to only appear in the Dropzone that appears first in the HTML order.
I have a "fix" for this, which is to generate and add a unique hash to the ID, by adding a getUniqueID method to the FileAttachmentField class and then consume this within the templates. The fix has resolved my issue but I wonder whether you can advise if this a problem you'd accept a PR for or whether I've missed something; I'm pretty new to Silverstripe.
The text was updated successfully, but these errors were encountered:
I have discovered an issue for my particular use case. I am using Dropzone to allow the attachment of files to comments, both replies and root comments.
However, when rendering to the DOM the same ID is used (as it's mapped to the field name). This therefore causes all Dropzones to fire when clicking on any of the Dropzones and forces all files added to only appear in the Dropzone that appears first in the HTML order.
I have a "fix" for this, which is to generate and add a unique hash to the ID, by adding a
getUniqueID
method to theFileAttachmentField
class and then consume this within the templates. The fix has resolved my issue but I wonder whether you can advise if this a problem you'd accept a PR for or whether I've missed something; I'm pretty new to Silverstripe.The text was updated successfully, but these errors were encountered: