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

CommentFileSizeAuthor
#2 2554857.patch1012 bytesamateescu
entityqueue-d739.png293.88 KBnotmike
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

notmike created an issue. See original summary.

amateescu’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Fixed
FileSize
1012 bytes

This patch fixes it.

The bug is pretty serious so I'll release 7.x-1.1 shorly.

  • amateescu committed 64be7cc on 7.x-1.x
    Issue #2554857 by amateescu, notmike: Add item autocomplete not working...
David_Rothstein’s picture

I 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 :)

amateescu’s picture

I 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.

Status: Fixed » Closed (fixed)

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

wonder95’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

Not 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.

quicksketch’s picture

Status: Active » Fixed

Moving 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.

Status: Fixed » Closed (fixed)

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