Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Trying to add a exposed filter to a view.
When I get to the last step and click apply I get:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/ajax/config-item/media_default/media_browser_1/filter/field_related_release_target_id
StatusText: parsererror
ResponseText: Notice: Undefined index: identifier in is_identifier_unique() (line 2674 of /sites/all/modules/views/plugins/views_plugin_display.inc). =>
Any ideas?
Comment | File | Size | Author |
---|---|---|---|
#11 | views-undefined-index-identifier-1456836-11.patch | 600 bytes | gifad |
Comments
Comment #1
tsvenson CreditAttribution: tsvenson commentedHaven't seen anything like this when creating views using the File Entity and Media modules. Are you overriding a view Media comes with or creating a new? Which version of Media/File Entity do you use?
Comment #2
madeby CreditAttribution: madeby commentedI use latest DEV versions and is overwriting the view already their.
Comment #3
yurg CreditAttribution: yurg commentedGot same bug at http://s.com/index.php?q=admin/structure/views/ajax/config-item/front/pa...
Using 3 exposed filters in conjunction with Better Exposed Filter module and AJAX. Since initial thread is several months old it may be one of Views mysteries which will be not clearly reproduced and resolved. So, leaving record just for note.
Comment #4
gunwald CreditAttribution: gunwald commentedI have exactly the same problem.
Comment #5
dgastudio CreditAttribution: dgastudio commentedsame here
Comment #6
markdatter CreditAttribution: markdatter commentedI get the AJAX error when I am trying to save the filters in the Views administration interface.
- I am not using AJAX for the View
- I am not using Better Exposed Filters.
- I am using OpenLayers mapping and proximity filtering.
- I have 4 displays: OpenLayers Data Overlay, OpenLayers Map (2x), Table
Comment #7
Yaron Tal CreditAttribution: Yaron Tal commentedI got the same problem. What fixed it for me was adding an isset() to the is_identifier_unique() method.
I doubt this is a real fix though. I guess the problem is with the handler not defining a unique identifier.
For those having the same problem and in need of a suppression of the error (i guess it's kinda like that);
In is_identifier_unique() find this line:
and replace it with:
Since I don't think this is a bug in this function, but more likely something in the handlers I didn't make a patch of the above. I hope a views maintainer can shed a light on this?
For completeness, relevant modules:
Media-7.x-2.x - last git comit: 41028b10191dc1a9901bb21c163d4f61ddc96eb8
Views 7.x-3.7
Ctools 7.x-1.3
I got the error when adding a taxonomy exposed filter to the default media gallery view.
Comment #8
AnybodySame problem here, the issue is still active.
Comment #9
rahafrouz CreditAttribution: rahafrouz commentedhaving same problem here, a view with some exposed filters.
Comment #10
donquixote CreditAttribution: donquixote commentedSame problem here.
The "bad" handler in my case is a
views_handler_sort_date
sort handler.It has a $handler->options['expose'] with 'label' and 'order', but without an 'identifier'.
The backtrace:
14: views_plugin_display->is_identifier_unique()
13: views_handler_filter->expose_validate()
12: views_handler_filter->options_validate()
11: views_handler_filter_date->options_validate()
10: views_ui_config_item_form_validate()
9: form_execute_handlers()
8: _form_validate()
7: drupal_validate_form()
6: drupal_process_form()
5: drupal_build_form()
4: views_ajax_form_wrapper()
3: views_ui_ajax_form()
2: call_user_func_array()
1: menu_execute_active_handler()
0: main()
Comment #11
gifad CreditAttribution: gifad commentedSimple patch to fix the issue (based on #7).
Comment #12
interdruper CreditAttribution: interdruper commented#11 works, avoiding the annoying AJAX error.
Pretty sure that the error is just a side-effect, but this 'defensive' patch is not harmful at all.
Comment #13
DamienMcKennaThis seems safe.
Comment #15
DamienMcKennaCommitted. Thanks!