I've upgraded my site to 7.14 and now when I try and resave an existing node I get the error on a node reference field:
node reference field name: this post can't be referenced
and it won't let me save any changed to the node.
I can create new nodes fine.
I'm not sure if the error was due to the drupal upgrade or a different module, I'm using Chaos tools 7.x-1.0.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | error-on-saving-node-1599132-13.patch | 1009 bytes | zopa |
| #12 | error-on-saving-node-1599132-12.patch | 549 bytes | zopa |
| #4 | error_on_saving_node-1599132-4.patch | 772 bytes | wuinfo - bill wu |
Comments
Comment #1
esolano commentedI'm experiencing the same issue. It happens very randomly, and seems to go away once I clear the cache.. Any thoughts?
Comment #2
wuinfo - bill wu commented@LTech are you able to give a little bit more detail regarding this issue.
How the content type was setup and how the reference field was setup. I was trying to create a test content type and add a node reference field. Node was able to be updated without problem.
Comment #3
abrao commentedI have the same issue as well. My node reference field refers a (complex) view. If I disable views cache for the view that is being referenced the problem goes away and I can save the node.
Comment #4
wuinfo - bill wu commentedThis patch is for the caching problem.
Comment #5
abrao commentedThis patch does solve the caching problem. Thank you!
Any chances this would be included in the module soon?
Comment #6
wuinfo - bill wu commentedComment #7
Alex Andrascu commentedComment #8
Alex Andrascu commentedBill, can you please try resubmitting the patch to see if it goes through testing?
Thanks
Alex
Comment #9
somatics commentedI'm having this same issue. Like comment #1, it does appear to be intermittent, and I think the fix is clearing the cache.
However, clearing the cache too often can be a big problem on a big live site like ours, and the issue returns very quickly after clearing the cache (we can usually save the node reference on about 3 or 4 records before it starts reporting the post can't be referenced again)...so, needless to say, this issue is hard to ignore or work around.
Comment #10
jenlampton@somatics have you tried the patch in #4?
Comment #11
jenlamptonIt's working for me :)
Comment #12
zopa commentedI ran into this issue recently and needed a quick fix - ended up removing the restriction on the query to published nodes in a helper function. The security update to References added code that prevented saving on nodes with references to unpublished nodes by different authors.
Comment #14
zopa commentedComment #15
Anonymous (not verified) commentedPatch #14 works perfect. Using it on a site for years. Please commit.
Comment #16
guignonvI run into the same issue with "this post can't be referenced" however, in my personal case, the problem was different (and I didn't try the patch).
It appears that line 856 in node_reference/node_reference.module (node_reference_potential_references(...) function), if the field has no "limit" default, the default is set to 25 items. However, in my case, I had an unlimited number of references for a field and it turns out only the (random) first 25 references found were validated while the others were marked as "this post can't be referenced". So I had just to comment one line to have it working as expected:
There may not be a reason to default "limit" to 25 since if the "limit" key is not set, it does not mean it should use the default (25) but rather be unlimited. I doubt the patch #14 will be applied one day, but maybe also consider removing the default limit... :)