Download & Extend

Stumbled onto a random issue users are unlikely to reproduce

Project:Node Reference URL Widget
Version:6.x-1.6
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Basically, if you goto node/add/content-type/addAnythingHere/1234 the node reference field disappears and it is unlikely, especially without a bad link, that users will navigate to the node creation page like this. But just thought I would note it anyway as I discovered it by accident via typo.

And I noticed someone already made an issue dedicated to how awesome this module is, which I didn't want to dig that issue back up so I'll go ahead and repeat it here.. this is an awesome module, did exactly what i needed ;)

Comments

#1

This isn't really a bug, it's just the way that the module works. It should use the fallback behavior if it can't find a valid node. Obviously "addAnythingHere" isn't a valid NID, so it should use the fallback behavior. It's impossible for Node Reference URL Widget to know which item in the URL represents the NID if you're constructing your own URLs.

#2

ah i see what you're saying. i haven't looked at the code but couldn't the arg()'s be count()ed or something along those lines and assume the last item is always nid? i would say its not really anything worth fixing though at any rate cause yeah if someone ends up there like that its their booboo and i suppose preventing submissions of this type might be as easy as making the field required.

#3

Category:bug report» support request
Status:active» closed (fixed)

You can read the README.txt file to construct your own URLs to populate the Node Reference fields if needed. Node Reference URL Widget already supports an alternate syntax if you'd like more control over your URLs.

nobody click here