When chossing 'unlimited' number of widgets the "Add another item" button is not working. This is due to the inflexible id transfer of the widget hooks and the js file.

CommentFileSizeAuthor
#3 nodereference_explorer-get_item-added.patch1.44 KBAnonymous (not verified)
#2 nodereference_explorer-get_item-added.patch2.74 KBAnonymous (not verified)

Comments

andribas’s picture

I've got

warning: Illegal offset type in /var/www/drupal.uralpress.ru/sites/all/modules/nodereference_explorer/includes/nodereference_explorer.views.class.inc on line 53.

the same case - unlimited number. (Not required field)

Although, item appeared.

Anonymous’s picture

Status: Active » Needs work
StatusFileSize
new2.74 KB

This is going to be a complex problem to solve, but the initial error (described by andribas in #1) is that get_item is getting an array but assumes it is a scalar. This patch fixes the function to take an array or a scalar.

Anonymous’s picture

That patch was more than I needed to give. It contained also the previous patches I've submitted today. Here's the patch for this issue by itself.

dags88’s picture

subscribe

gnindl’s picture

Version: 6.x-1.1-beta1 » 6.x-1.1-beta2

The version 1.1-beta2 offers basic support for this. Playing around (adding and removing) is still under development.

gnindl’s picture

Version: 6.x-1.1-beta2 » 6.x-1.x-dev
Assigned: Unassigned » gnindl
Status: Needs work » Fixed

In 1.1-beta2 a JavaScript behavior populated JS Drupal settings that created all buttons and their actions. When processing "add another item" setting values were assigned multiple times, i. e. transforming setting value from objects to arrays => JS s.url error.

The buttons are now prerendered server-side and JavaScript wrapper getSettings() function cares about this multiple assignment.

gnindl’s picture

Status: Fixed » Needs review

Check out the current development snapshot for testing.

gnindl’s picture

Version: 6.x-1.x-dev » 6.x-1.1-beta3
Status: Needs review » Fixed

Works for nodereference explorer widget, not for link field type (reengineer in next releases)

Status: Fixed » Closed (fixed)

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