ScrollToElementCommand AJAX Error

Created on 9 August 2022, almost 2 years ago
Updated 13 May 2024, about 2 months ago

Getting this error after using Paragraphs Features in a fresh install / vanilla environment:

"
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /redacted_path/edit?ajax_form=1&_wrapper_format=drupal_ajax
StatusText: OK
ResponseText: TypeError: Drupal\paragraphs_features\Ajax\ScrollToElementCommand::__construct(): Argument #1 ($elementSelector) must be of type string, null given, called in /redacted_path/modules/contrib/paragraphs_features/src/ParagraphsFeatures.php on line 101 in Drupal\paragraphs_features\Ajax\ScrollToElementCommand->__construct() (line 36 of /redacted_path/docroot/modules/contrib/paragraphs_features/src/Ajax/ScrollToElementCommand.php)."

Symptoms:
When I try to add another component, nothing happens and the above error appears in the console.

Hack Fix?
Commenting out line 101 in /modules/contrib/paragraphs_features/src/ParagraphsFeatures.php allows me to complete my work successfully without console errors.

Line 101 in ParagraphsFeatures.php
$response->addCommand(new ScrollToElementCommand($element[$element['#max_delta']]['#attributes']['data-drupal-selector'], $element['#attributes']['data-drupal-selector']));

🐛 Bug report
Status

Needs review

Version

1.16

Component

Code

Created by

🇺🇸United States xandermar Milton, Delaware

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.

Production build 0.69.0 2024