Closed (fixed)
Project:
Node Reference URL Widget
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 May 2011 at 09:43 UTC
Updated:
29 May 2011 at 02:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
yched commentedreferences-7.x.2.0-beta2 is out (I fixed a small bug just after tagging beta1, so we release straight to beta2)
Comment #2
quicksketchThanks for the heads-up yched. Yeah we shouldn't have been calling it to begin with, so that's what we get for using a private function.
Comment #3
yched commentedThen again, I guess you had little other choices. There's currently no official API func to figure out if a node is in the scope of a noderef field :-(.
Apart from breaking APIs further, I guess we could promote _node_reference_potential_references() to the outside facing API.
Comment #4
jerdavisHere's a patch
Comment #5
quicksketchHm, this is going to be ugly. @yched has there been a final release of this change yet? Promoting it to a public function or at least changing its name would make upgrading easier for users if we could do an if function_exists() check and use differently named functions.
Comment #6
yched commented@quicksketch : I did not make that change yet without hearing from you first.
references-beta2 only contains the new signature for _node_reference_potential_references().
If we want to go that way, I can issue a new beta3 shortly that contains a new, non-underscored node_reference_potential_references(), and the old one as a temporary BC measure (which would go away at some point - for instance in the final release).
On the nodereference_url side, I guess you could add a function_exists() check in the current dev, and state that your next release requires references-beta3 ?
Comment #7
andrebonfanti commentedsubscribe to follow
coming from #1147592: Fatal error: Unsupported operand types
Comment #8
paulandrewmarchand@yahoo.com commentedWhat do I have to change and where If I want to do this manually?
THX
Comment #9
quicksketchI'd prefer that References project just made the change to remove the underscore and left Node Reference URL Widget to include the function_exists() hack/BC functionality. But if you're okay with including the old function signature in place, I'd be happy to take that route too, but I think just making the function public would get people off of calling this "private" function anyway and that would be a good thing.
Comment #10
erik commentedI'm experiencing this 500 internal server error as well when trying to edit a node which is referencing another node...
The error log is throwing a: PHP Fatal error: Unsupported operand types in /Users/erik/Projects/erik.butff.nl/sites/all/modules/references/node_reference/node_reference.module on line 702
Comment #11
rfay#4 solves the problem for me.
Comment #12
erik commentedThank you, tried it and it works for me too!
Comment #13
paulandrewmarchand@yahoo.com commentedSorry I am kind of new to Drupal. Can anyone tell me how to run this patch on Godaddy?
Comment #14
yched commented@quicksketch : committed #1154998: Promote _node_reference_potential_references() to the "official" API and rolled references-7.x-2.0-beta3 (http://drupal.org/node/1155924)
Comment #15
jon pughRerolled based on the new function name, no prefix, relative.
Comment #16
quicksketchThanks yched! Here's my backward-compatible patch until References module gets a final release. This makes it so users don't have to be plagued by API differences during the transition. If it looks okay I'll commit and put out a new release right away. Thanks guys!
Comment #17
yched commentedNitpick : 'match' is only used if matching against 'string' is passed, useless if matching against a list of 'nids'
Powered by Dreditor.
Comment #18
quicksketchCool, I've committed this patch, thanks yched.
Comment #19
yched commented@quicksketch : did you commit this ? It doesn't seem to appear in the commit logs ;-)
Comment #20
quicksketchI'm not sure what's up with Git, the "Shortlog" doesn't include any of my recent commits:
http://drupalcode.org/project/nodereference_url.git
But the change is definitely in there in the 7.x-1.x branch:
http://drupalcode.org/project/nodereference_url.git/shortlog/refs/heads/...
I've made the 1.11 release and it will be packaged up shortly.