Found the following Fatal error on one of the view pages (which I've opened accidentally):

URL: /admin/structure/views/ajax/rearrange/tracker
but it happens on any view (whether enabled or disabled).

Error:

Fatal error: Call to a member function defaultable_sections() on a non-object in docroot/sites/all/modules/contrib/views/includes/admin.inc on line 3392

Backtrace: menu_execute_active_handler/call_user_func_array/views_ui_ajax_form/views_ajax_form_wrapper/drupal_build_form/drupal_retrieve_form(views_ui_rearrange_form)/views_ui_rearrange_form/

Affected code:

  if ($display->handler->defaultable_sections($types[$type]['plural'])) {

Display is NULL.

$display = &null

I think the page should return some error page instead. On the other hand, the page: /admin/structure/views/ajax/rearrange works.

I've come to that URL accidentally after JSON dump at /admin/structure/views/ajax/rearrange/foo/panel_pane_events_1/sort, then by removing last two words in order to go back from the error page.

Comments

kenorb created an issue. See original summary.

renatog’s picture

Category: Bug report » Support request
Status: Active » Fixed

Hello Rafal, how are you?

Thank you for reporting this

I was trying here but it didn't happen anymore. I was debugging the code to see if we can insert some validation but it wasn't necessary because this object was defined here

https://git.drupalcode.org/project/views/-/blob/7.x-3.x/includes/admin.i...

And after that is used $display->handler->defaultable_sections($id) and this variable is return a valid object with the correct function

My recommendation is to update to this version 7.x-3.24 that I tested, run update.php, clear all caches and try again. It'll solve the problem. But anyway, if has this error or any other please feel free to let us know ok?! Thank you so much Rafal

Status: Fixed » Closed (fixed)

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