I just upgraded from 6.x-2.12 to latest 3.x-dev and i noticed that my cck noderef fields that were using a View to limit which nodes were referenceable no longer work (as in they now list nothing).

I switched the field to simple use all nodes of a given type and this works fine. I took a quick look at the View and it seems to preview correctly. i resumbitted both the view and the field and no luck.

Comments

dawehner’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Component: Miscellaneous » nodereference.module

Move to cck. This seems to be a problem with the nodereference module.

haggins’s picture

I've got the problem that I can't save nodes with a required nodereference field with a views 3 view. The nodereference field lists the nodes correctly. However, I get a "The field field_noderef is required." error.

Is nodereference incompatible to views 3?

szantog’s picture

Yes, it seems incompatible. I try to fix it, but the view objects are too hard for me..

thommyboy’s picture

+1 for original post
actually i found a solution that might help solving the problem- if you include the NID into the view's fields (can be hidden) everything works fine.
only one more thing that was posted before- only 10 items are displayed. this can be solved by including

function MYCUSTOMMODULE_views_query_alter(&$view, &$query) {
if($view->name == 'MYVIEWSNAME') {
$view->set_items_per_page(0);
}
}

laken’s picture

I just got bit by this too. In my case, the site was running a really old version of CCK (6.x-2.5), along with Views 6.x-2.8, and recent updates to views had broken this feature. CCK 6.x-2.6 supposedly fixed it. I just updated to latest CCK (6.x-2.9) and it started working immediately.

pippal’s picture

+1

I have just upgraded from 2.9 where this feature was working to views 3 and cck 3.x-dev and I now only get 1 result. Including the NID increases it to 10. I set number of values shown in views UI to 1000 and 'Display all values' neither had effect.

thommyboys solution works for me.

loze’s picture

Yes the solution in #4 works. There must be a NID column in your fields.
Thank you, this saved me a big headache.

loze’s picture

Status: Active » Closed (works as designed)