Prevent this module from breaking VBO functionality

Created on 19 July 2022, over 2 years ago
Updated 16 January 2024, 10 months ago

Problem/Motivation

After installing this module I can no longer use Views Bulk Operations to adjust field values because this module tried to run getEntity on the ConfigureAction form state and that method doesn't exist.

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\views_bulk_operations\Form\ConfigureAction::getEntity() in unique_field_ajax_validate_unique() (line 558 of modules/contrib/unique_field_ajax/unique_field_ajax.module).

unique_field_ajax_validate_unique()
call_user_func_array() (Line: 282)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 238)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118)
Drupal\Core\Form\FormValidator->validateForm() (Line: 588)
Drupal\Core\Form\FormBuilder->processForm() (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Enable this module for any field, and submit a Views Bulk Operations action, regardless of whether you are operating on a field that this module is configured to deal with or not.

Proposed resolution

I suppose we could either check to be sure that we are altering the right form, or just check to see if the method exists before trying to run it. I'll submit a pull request for latter solution.

Remaining tasks

Stop

unique_field_ajax_validate_unique()

from trying to run the getEntity method when it doesn't exist

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Closed: outdated

Version

2.1

Component

Code

Created by

🇯🇵Japan ultrabob Japan

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.71.5 2024