Is anyone else running into this issue? When I enable the Views Fieldsets module, and then try to edit the default Drupal core "Taxonomy term" view, I receive the following error at /admin/structure/views/view/taxonomy_term.

The website encountered an unexpected error. Please try again later.
Error: Call to a member function has() on null in Drupal\views_ui\ViewEditForm->form() (line 200 of core/modules/views_ui/src/ViewEditForm.php).

This also happens to the default "Frontpage" view. If I then uninstall the Views Fieldsets module, I am able to access the "Taxonomy term" and "Frontpage" views once again.

Comments

BD3 created an issue. See original summary.

BD3’s picture

Title: Cannot Edit Taxonomy Term view (Error: Call to a member function has() on null) » Cannot Edit Some Default Views (Error: Call to a member function has() on null)
Issue summary: View changes
rudiedirkx’s picture

I can't reproduce this. How are you editing the view? Does it matter, or does every save fatal error?

I think this is related to this issue, which I cannot reproduce either.

It's probably the custom

$view->build($display_id);

calls that seem to be insufficient or invalid, but I don't know why it breaks, because it all works for me, and I wouldn't know how else to validly build a view...

Which versions of Drupal and Views do you have?

Christopher Riley’s picture

I also ran into the same issue. As soon as I uninstalled views_fieldsets everything is working again. I am using 3.x-dev of this module and Views with 8.3.1.

Suggestions are appreciated.

k.elizabeth’s picture

I also am running into this same issue/error with the Views Fieldsets module enabled. The issue goes away when I disable the module. I am using the 8.x-3.0 version of the module.

Like BDE, I cannot edit default views. Trying to edit immediately produces the following in my error log:
PHP Fatal error: Call to a member function has() on null in core/modules/views_ui/src/ViewEditForm.php on line 200

joaocsilva’s picture

This happened to me when I remove the /node page programmatically with

protected function alterRoutes(RouteCollection $collection)
{
  // Remove /node page route.
  $collection->remove('view.frontpage.page_1');
}

See more here http://svenssonjohn.se/quick-tip-remove-node-page-in-drupal-8/sonjohn.se...

rudiedirkx’s picture

Sorry guys. Patches are welcome, but they have to come from you. I'm out of Drupal.

ibuildit’s picture

Try:

1: Move the views_fieldsets module dir somewhere else.
2: Open the view you had problem with.
3: Save it.
4: Move back view_fieldsets module dir.

Worked for me, I can now use the views as I please.

LaurensV’s picture

I am getting this error:

Error: Call to a member function addRelationship() on null in Drupal\views\Plugin\views\relationship\RelationshipPluginBase->query()

on a custom view with multiple relations when I try to save rearranging the fields.. view is working, but I can't rearrange the fields to be inside the fieldset (because of the error on trying to save rearranging the fields). Even after deleting the fieldset field, I still can't rearrange the fields. I have to complete disable the module and to get rid of the error on rearranging my view. Love to see a fix for this module.

EDIT: I am also getting this notice:

Notice: Undefined property: Drupal\views\Plugin\views\relationship\Standard::$query in Drupal\views\Plugin\views\relationship\RelationshipPluginBase->query()

fox mulder’s picture

#8 worked for me too. Thank you ibuildit!

Christopher Riley’s picture

#8 works however its a kludge of a fix. Is anyone looking into a more permanent solution?

rudiedirkx’s picture

Yes, anyone? Anyone responsible who'd like (co)-maintainer powers?

hamrant’s picture

Status: Active » Needs review
StatusFileSize
new1.57 KB

I have the same problem in default display in views not related to Views fieldsets module.

For some reason inside $ui_view was removed displayHandlers in views_fieldsets_views_ui_display_tab_alter...

lex0r’s picture

Status: Needs review » Reviewed & tested by the community
rudiedirkx’s picture

I'd love to commit #13 to finish this, but I need another verification. I don't Drupal anymore, so it's not me.

hamrant’s picture

thanks @rudiedirkx

Antviolence’s picture

I can confirm that the #13 patch is working.

  • rudiedirkx committed f361230 on 8.x-3.x authored by hamrant
    Issue #2870731 by hamrant: Cannot Edit Some Default Views (Error: Call...
rudiedirkx’s picture

Status: Reviewed & tested by the community » Fixed

Voila. Thanks everyone! New release should be up soon.

Status: Fixed » Closed (fixed)

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