If no defaults are defined for an entity bundle, when outputting the Panelizer Status filter the following errors can show>

Fatal error: Unsupported operand types in panelizer_handler_filter_panelizer_status.inc on line 31

Warning: natcasesort() expects parameter 1 to be array, null given in panelizer_handler_filter_panelizer_status->get_value_options() (line 27 of panelizer_handler_filter_panelizer_status.inc).

CommentFileSizeAuthor
#1 panelizer-n2242643-1.patch951 bytesDamienMcKenna
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
951 bytes

The $options array needed to be defined before the foreach() loop, for scenarios when the entity bundle is not Panelized.

kepford’s picture

Status: Needs review » Needs work

Creating a view with a filter on type now results in the following message "No valid values found on filter: Fieldable pane: Panelizer status.".

kepford’s picture

If the table `panelizer_defaults` is empty and you select a type of filter you will get ""No valid values found on filter: Fieldable pane: Panelizer status." Maybe the filter should not be offered if the fieldable panel pane is no panelized?

DamienMcKenna’s picture

Ok, I guess we'll need to have a follow-on issue to handle "What to do if there are no defaults."

kepford’s picture

I see the issue when there are values in the table as well. I'm not familiar enough with views_filter_handlers() to explain why yet.