Using the same two configurable actions that work fine on a view with exposed filters, when I use a contextual filter I'm missing the form on one of my actions. The broken action is generating a select list in buildConfigurationForm(), the working one is just presenting a textfield.

I'll keep digging but there was nothing obvious in the error log (right after clearing caches):

Error: Call to a member function getRouteByName() on null in Drupal\views\ViewExecutable->getUrl() (line 1955 of /home/presswire2/drupal8/web/core/modules/views/src/ViewExecutable.php)

CommentFileSizeAuthor
#3 vbo_test.tar_.gz2.24 KBskitten
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

skitten created an issue. See original summary.

Graber’s picture

Thanks for reporting, please provide steps to reproduce, ideally upload file with your action code.

Do you have the latest version (https://www.drupal.org/commitlog/commit/91958/6396370225be7c94caf129b72f...)?

skitten’s picture

FileSize
2.24 KB

I didn't have latest (grr composer one day I will understand you) but I do now.

I made a simple module (attached) with two configurable actions, one with a text field, one with a select.

Then on a fresh Drupal install I create two nodes and a view. The view has two pages, both with VBO and the two actions, but one has a contextual filter on the node id. I only get the error when the contextual filter actually has a value (and it works the first time, but if I then choose the other action it fails). The site is here if you want to see:

Regular view (works): http://scratch.presswire.com/test
Contextual filter no value (works): http://scratch.presswire.com/test2
Contextual filter with value (doesn't work): http://scratch.presswire.com/test2/1

Graber’s picture

Reproduced. It must be a views issue, time to do some debugging.

Graber’s picture

It's a core views issue, just created it: https://www.drupal.org/node/2880275.

Untill this is fixed, you can use newly added feature of action configuration on a new page (VBO field settings on view admin page -> "Configuration form on new page (configurable actions)" checkbox) or apply temporary fix to ViewsExecutable.php (not recommended though)

joelpittet’s picture

Project: » Views Bulk Operations (VBO)
Version: » 8.x-1.x-dev
Component: Code » Core
Assigned: Unassigned » graber-2
Parent issue: » #1823572: Port Views Bulk Operations to Drupal 8

Moving to views_bulk_operations queue

Graber’s picture

Assigned: graber-2 » Graber
Graber’s picture

Status: Active » Postponed

Blocked by a core Views issue #2880275.

  • Graber committed 479ea4d on 8.x-1.x
    Implemented action configuration form validation, forced configuration...
Graber’s picture

Issue summary: View changes

Removed backtrace.

Graber’s picture

Title: Problems using a contextual filter » Problems with AJAX configuration form when using a contextual filter
Graber’s picture

Assigned: Graber » Unassigned
Graber’s picture

At the moment configuration forms always open on a new page, where the problem doesn't occur. We can reenable AJAX configuration when the source core issue is fixed.

Graber’s picture

Removing parent port issue as it's no longer relevant. Added reference core issue as related.