Closed (fixed)
Project:
Panopoly
Version:
7.x-1.x-dev
Component:
Widgets
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Apr 2015 at 02:24 UTC
Updated:
16 Apr 2015 at 19:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dsnopekI agree, it would be better to not show anything before an item is selected. However, I'm not exactly sure how to do this in Views (which is how the widget is implemented).
We can't just make the 'Piece of content' filter required because we only use that in the settings form - on saving we clear out that filter and set the 'Nid' filter. So, setting to required makes the settings form work how we want, but breaks actual rendering. :-/
We'll probably have to do it with custom code. Lemme see what our options are...
Comment #2
dsnopekHere's a patch that works in my testing! Please let me know what you think.
Comment #3
dsnopekHrm. So, this patch is fixing this issue! But I'm noticing that there's lots of PHP notices if you save a "Content item" without a "Piece of content" set at all. We should probably make the 'title' filter required on the settings form (but not in the View for the reasons mentioned above) to prevent users from saving such widgets.
I tried setting
$exposed['filter-title']['title']['#required'] = TRUEinpanopoly_widgets_form_views_content_views_panes_content_type_edit_form_alter()but it had no effect. :-/Comment #4
dsnopekOk, it turns out that did make it required, but just didn't show the required marker! This new patch makes title required and shows the marker to make things clear to the user.
Comment #5
dsnopekThis passes all the tests! I'm just going to commit. :-)
Comment #7
dsnopekEr, I meant to upload this patch back in #4...