Fix JS errors on Drupal 10.x

Created on 22 August 2023, over 1 year ago
Updated 28 February 2024, 10 months ago

Paragraph toggle has stopped working after upgrading to Drupal Core 10.1.

Uncaught TypeError: $(...).once is not a function

Attached a patch incorporating changes suggested in https://www.drupal.org/node/3158256

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇱🇻Latvia arturs.v

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

Comments & Activities

  • Issue created by @arturs.v
  • 🇮🇳India noorulshameera

    I will review this

  • 🇮🇳India noorulshameera

    Verified that the patch works fine.
    Steps to reproduce:

    1. Install and enable the module
    2. Edit a piece of content with Paragraphs
    3. Un-check the "Published" button on one of your Paragraphs
    4. Save and view the node
    5. we should see a button that says "Toggle visibility of unpublished items" in the lower right corner of the page. but it is not visible due to jQuery once issue.

    After applying the patch able to see the toggle visibility button.Added screenshot for before and after applying patch.

  • Assigned to koppie
  • Status changed to Fixed 11 months ago
  • 🇺🇸United States koppie

    Thanks for the patch, and thanks for testing!

    Development version: 8.x-1.x-dev updated 14 Feb 2024 at 02:45 UTC

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

Production build 0.71.5 2024