Problem/Motivation
When using this module in Drupal 10, Javascript errors are thrown on a node creation page:
Uncaught ReferenceError: Popper is not defined
at acquia-dam-expired-assets.js?rrty4k:42:28Proposed resolution
The Popper.js library was deprecated as of Drupal 9.5 and removed from Drupal 10. As per the change record, Floating UI is recommended but a migration is required.
Remaining tasks
Update acquia_dam.expired_assets to use Floating UI instead of Popper
Issue fork acquia_dam-3349130
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3349130-ignore-popper-if-missing
changes, plain diff MR !10
- 3349130-javascript-error-in
changes, plain diff MR !9
Comments
Comment #2
mandclu commentedNOTE: As a stopgap, importing Popper from an external source can also work, as was done in this Webform commit.
Comment #4
rajeshreeputraComment #5
rajeshreeputraThere is another error while using Acquia DAM with Site Studio.
unexpected alert open: {Alert text : An error occurred while attempting to process /media-library?source=core&media_library_opener_id=media_library.opener.cohesion&media_library_allowed_types%5B0%5D=image&media_library_selected_type=image&media_library_remaining=1&hash=3QAwKMPIPLTV_agyGNBNd4K3KGsqfUVHZCAAk4JmawQ&_wrapper_format=drupal_ajax&complete_allowed_list%5B0%5D=image&complete_allowed_list%5B1%5D=acquia_dam_image_asset&ajax_form=1&views_display_id=widget&_wrapper_format=drupal_ajax: ajax.$form.ajaxSubmit is not a function}Comment #7
rajeshreeputraMeanwhile the migration work getting completed, created patch to provide PopperJS as part of module. With MR !9 this is working.
@mandclu could you please apply the patch and verify if it works for you.
Comment #8
mglamanSetting to NR, didn't see MR.
Comment #9
mglamanI don't really want to embed Popper.js and fork the code. I'd rather find ways to avoid calling Popper if it is not set, removing the tooltips.
Comment #11
mglamanWe only use Popper.js for the media overview page. Otherwise the CKE5 tooltips are used. This simply removes the tooltip on D10 for the media overview page.
Comment #12
mglamanI need to sort this out, https://git.drupalcode.org/project/acquia_dam/-/merge_requests/10/diffs?... fixes D10 failures. But now there a bunch of random failures on D9.
Comment #13
mglamanOkay, the scope of the MR is back to just fixing JavaScript code for Popper.
Comment #15
mglamanThanks, everyone! Merged.