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:28

Proposed 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

Command icon 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:

Comments

mandclu created an issue. See original summary.

mandclu’s picture

NOTE: As a stopgap, importing Popper from an external source can also work, as was done in this Webform commit.

Rajeshreeputra made their first commit to this issue’s fork.

rajeshreeputra’s picture

Title: Javascript error in Drupal 10 » Javascript error in Drupal 10 - migrate poperjs to FloatingUI
Priority: Normal » Critical
rajeshreeputra’s picture

There 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}

rajeshreeputra’s picture

Meanwhile 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.

mglaman’s picture

Assigned: Unassigned » mglaman
Status: Active » Needs review

Setting to NR, didn't see MR.

mglaman’s picture

Status: Needs review » Needs work

I 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.

mglaman’s picture

Status: Needs work » Needs review

We 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.

mglaman’s picture

Status: Needs review » Needs work

I 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.

mglaman’s picture

Assigned: mglaman » Unassigned
Status: Needs work » Needs review

Okay, the scope of the MR is back to just fixing JavaScript code for Popper.

  • mglaman authored 4e560619 on 1.0.x
    Issue #3349130 by Rajeshreeputra, mglaman: Javascript error in Drupal 10...
mglaman’s picture

Status: Needs review » Fixed

Thanks, everyone! Merged.

Status: Fixed » Closed (fixed)

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