Javascript error in Drupal 10 - migrate poperjs to FloatingUI

Created on 20 March 2023, over 1 year ago
Updated 1 May 2023, about 1 year ago

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

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇨🇦Canada mandclu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue created by @mandclu
  • 🇨🇦Canada mandclu

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

  • First commit to issue fork.
  • 🇮🇳India Rajeshreeputra Pune

    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 opened merge request.
  • 🇮🇳India Rajeshreeputra Pune

    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.

  • Assigned to mglaman
  • Status changed to Needs review about 1 year ago
  • 🇺🇸United States mglaman WI, USA

    Setting to NR, didn't see MR.

  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States mglaman WI, USA

    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 opened merge request.
  • Status changed to Needs review about 1 year ago
  • 🇺🇸United States mglaman WI, USA

    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.

  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States mglaman WI, USA

    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.

  • 🇺🇸United States mglaman WI, USA

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

  • Issue was unassigned.
  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024