FYI - I got the following error when creating a user_reference field on a content type in D7.

Notice: Undefined index: args in _user_reference_view_settings_validate() (line 167 of path/to/sites/all/modules/references/user_reference/user_reference.module).

Comments

MrPhilbert’s picture

I get the same error but on line 159 of node_reference.module

yched’s picture

Could you try clearing your site caches ?
Those lines rely on the presence of default settings in the $field definition being created / edited, and the shape of those default settings just changed after #945004: [release blocker] Missing views-mode for picking userreference and nodereference. Clearing you caches should adjust this.

MrPhilbert’s picture

Sorry Yves,
Cleared the cache and it's still there.
Could it be that both of these are trying to reference an array that is not defined?

Would it be real difficult to separate the views part of references as its own module?

I know that the last sentence is a completely different request but it may solve the issue, especially for those that have no need for node or user references in views.

Just a thought.

MrPhilbert’s picture

StatusFileSize
new24.24 KB

It seems that this is all related to the views integration. I had to revert back to an older dev release from 2-25. (I'm using this while going through node one's page manager tutorials).
I've attached a zipped copy here for convenience until this issue is resolved should anyone need it.

This is a brilliant module Yves. I am looking forward to the final.
I will also create a D7 sandbox to test any subsequent dev releases

Philbert

TripX’s picture

same here.

Trunkhorn’s picture

Me too... sub

Notice: Undefined index: args in _node_reference_view_settings_validate() (line 161 of /var/www/website.com/sites/all/modules/references/node_reference/node_reference.module).

This is a new site and I haven't set up any views yet, even though I have all of views, ctools, and panels installed.

Cleared all caches and it still occurs anytime the reference field is edited on a content type.

dafeder’s picture

Same here.

dafeder’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

I think it's just some bad logic in the _node_reference_view_settings_validate() function. Try this patch.

yched’s picture

Status: Needs review » Fixed
StatusFileSize
new3.79 KB

Ah, finally got it - this happens when no there's no view with a 'References' display available.

Thanks @dafeder for the patch - I went for a different fix.
Committed the patch below.

yched’s picture

(+ fixed typo in changelog, and added credit)

dafeder’s picture

Worked for me!

rosemeria’s picture

Patch worked for me too! Thank you.

eft’s picture

OP here - worked for me too ! Thanks yched to fixing this.

Sunflowers11’s picture

Status: Fixed » Needs review

The patch fixed the issue for node references, but I am still getting the error for user references.

Status: Needs review » Needs work

The last submitted patch, undefined_index-1149600-9.patch, failed testing.

yched’s picture

Same fix has been applied to both node_ref and user_ref. Dare I ask you doublecheck ? ;-)

Sunflowers11’s picture

Status: Needs work » Fixed

Mea culpa, yched. First time I applied a patch in Drupal and it looks like I only got it half right. Thanks for pointing me in the right direction. Now that I have applied the patch correctly it works just fine.

yched’s picture

@Sunflowers11 : no problem ;-); Thks for the feedback !

Status: Fixed » Closed (fixed)

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

seanburlington’s picture

Version: 7.x-2.x-dev » 7.x-2.0-beta3
Status: Closed (fixed) » Needs work

Hi,
this bug still exists in the beta

The project page recommends the beta version, there is no way to tell if the dev is actually a preferred version (and I don't know what bugs might be in dev)

It's a lot harder to manage site updates on dev modules.

Is the dev branch stable enough to release a new beta?

(is it even stable enough for a stable release?)

Thanks

jeffschuler’s picture

Status: Needs work » Closed (fixed)

seanburlington: If you don't want to use the dev version, apply the patch in #9 to the 7.x-2.0-beta3: it applies cleanly (except for the CHANGELOG.txt change.)

This issue has been fixed. If you have a burning release cycle question I'd open a new issue.

Pocketpain’s picture

sub

joachim’s picture

As stated above the bug still exists in the current release, which is several months old.

Please could the maintainers make a new release with this fix in it? If the 7.x-2.x branch has a lot of unstable development code in it, then git will allow fixes like this one to be cherrypicked to a hotfix branch.

caponey’s picture

same error; would it be possible for someone to upload the patched files, for some of us who don't know how to patch a module? thanks!