After upgrading our dev server Drupal core 7.39, one of our users noticed that she could not longer add new nodes to one of our Entityqueues.
To reproduce this issue, I fired up two simplytest.me environments, one with core 7.38 and one with 7.39. In both, I installed entityqueue 1.0, ctools 1.7, entity 1.6, and entityreference 1.1. In both, I created a few basic pages, then added a simple entityqueue for basic pages.
The autocomplete form in the 7.38 one worked fine. In drupal 7.39, the autocomplete did not work and the browser console threw up an error:
TypeError: undefined is not an object (evaluating '$input[0].form') autocomplete.js:17
Comment | File | Size | Author |
---|---|---|---|
#2 | 2554857.patch | 1012 bytes | amateescu |
entityqueue-d739.png | 293.88 KB | notmike |
Comments
Comment #2
amateescu CreditAttribution: amateescu as a volunteer commentedThis patch fixes it.
The bug is pretty serious so I'll release 7.x-1.1 shorly.
Comment #4
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedI added a note about this to the Drupal 7.39 release notes (https://www.drupal.org/drupal-7.39-release-notes).
I'm trying to decide if there should be a followup issue for core about this. As far as I can tell, the bug occurs because Entityqueue sets $element[''#attributes']['id'] to change the ID, but the new code in core assumes you'd set $element['#id']. I'm not sure if there is a specific reason Entityqueue needed to do the first, but in general my impression is that $element['#id'] is the "official" way to specify an ID so maybe no fixes to core are needed here.
Thanks for the quick fix :)
Comment #5
amateescu CreditAttribution: amateescu as a volunteer commentedI don't think there was any specific reason to go with a id selector instead of a class one, and I agree that we were "doing it wrong" so no core fix is needed.
Comment #7
wonder95 CreditAttribution: wonder95 commentedNot sure if I should add this to #2424179: Cannot add users to a user based entityqueue when bundle is specified or here, but I'm still having this issue. I first noticed it while we were still on 7.x-1.0, found this issue, updated to 7.x-1.1 (on core 7.43), but I still can't get the record to be added to the autocomplete field. I've debugged all the way through entityreference_autocomplete_callback_get_matches() and have verified that the user record is indeed found, but everything disappears after the call to drupal_json_output(). However, I'm also noticing that the ajax callback function (entityqueue_field_widget_ajax_callback()) is not getting called either, which would indicate why the value isn't being written back to the field
I'm still debugging, but I just wanted to see if anyone is still dealing with this issue even after the update.
Comment #8
quicksketchMoving this back to fixed, as the particular problem introduced in 7.39 appears to be fixed. @wonder95 if your issue is particular to referencing users, #2424179 is a good place to join in. If it affects any type of entity, perhaps a new issue would be best.