core 6.14
cck 6.x-2.5
view 6.x-2.7

I just updated to views 2.7 from 2.6 and notice in one of my content type's cck node reference fields, the select list is now empty. The select list uses the advanced method of using a view to fill the list.

The view i have been using to generate the list is a default view, and it is unformatted. This was working correctly until the upgrade.

When I go to the views preview, the list still looks good, but the text no longer appears when I edit or create content that contains the CCK field that uses this list. Strangely enough i seem to get enough rows, but there is no data data showing in those rows of the select list.

I have been poking around and it seems that a rollback to views 2.6 may be a solution for me.

CommentFileSizeAuthor
#21 views-cck-bug.PNG10.75 KBcesarsalazar
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DarrellDuane’s picture

I noticed the same thing and am sticking with Views 2.6 until this is resolved.

dpatte’s picture

I notice now that the html generated for options of the select widget for the pages, contains spaces instead of the actual characters to be displayed. For each option the pattern of spaces is identical, almost as if they are empty column headers.

dpatte’s picture

i have copied 2.6 on top of 2.7, did an update.php, and the select lists are now appearing correctly again.

dawehner’s picture

Status: Active » Fixed

Then this is fixed

amariotti’s picture

Priority: Normal » Critical
Status: Fixed » Active

@dereine - On the contrary, I don't think that an issue is considered to be fixed when the user has to roll back to the previous version. This should stay open and be addressed, because obviously there has been a change in 2.7 that is breaking this function.

dawehner’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 6.x-2.7 » 6.x-2.x-dev
Component: Views Data » Views Integration
Priority: Critical » Normal

Lets move first to cck, because views does not have any specific code for cck.

markus_petrux’s picture

Project: Content Construction Kit (CCK) » Views (for Drupal 7)
Version: 6.x-2.x-dev » 6.x-2.7
Component: Views Integration » Views Data
Priority: Normal » Critical
dpatte’s picture

I can confirm that the problem is also fixed for me if i also include the latest cck 2.6, Thanks for fixing it so quickly.

BerkeleyJon’s picture

I have just upgraded to both Views 2.7 & CCK 2.6, and *am* seeing this problem. It appears that CCK 2.6 did not fix the problem for me.

dpatte’s picture

Berkeley - did you clear your caches?

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

Since this fix has worked for some, and only one person is reporting a failure, I think we need more information on the failure. It may be something different.

BerkeleyJon’s picture

Sorry for the delayed response. Yes, I cleared the caches multiple times.

I've just tried the upgrade again on a test site (CCK 2.5 => CCK 2.6 and Views 2.6 => 2.7), and got a very weird behavior:

After running update.php, the *first* time I went to the "Create Content" page, the Nodereference field rendered perfectly. The *second* time (or after hitting "reload"), I got the invisible values!

Just to test, I returned to update.php and forced it to run only the Views update again (update 6007).

Again, after re-running the update script, the *first* time I load the "Create Content" page, it's right, and the *second* time (and thereafter), the values are invisible. And I can guarantee there's nothing happening in between page loads, since I'm the only one on this server.

Just for clarity, the dropdown isn't empty; it has all of the correct options, and the options have the right values in the HTML - it's only the display text that's missing. For example, the HTML looks like this:

<select name="field_course_special_topics_par[nid][nid]" class="form-select" id="edit-field-course-special-topics-par-nid-nid" >
<option value="" selected="selected">- None -</option>
<option value="570"> </option>
<option value="567"> </option>
<option value="568"> </option>
<option value="569"> </option>
</select>

And again, for clarity, this only happens on Nodereference fields that use a view to select the node; ordinary nodereference fields are fine.

PS - It turns out that it fixes it (for the the first hit) by running update.php even with *no* updates selected!

DarrellDuane’s picture

I can confirm that I continue to see this problem even with CCK 6.x-2.6 and multiple cache clearings and update.php executions.
I havne't seen the fix come from re-running update.php yet but I have only tried it once.

gargoyle’s picture

I can confirm that I am seeing the same problem. I have had a scan through the code, but I am not familiar enough with views/cck to pinpoint it.

Oh, I am on Views 6.x-2.7 and CCK 6.x-2.5

izmeez’s picture

subscribe

gargoyle’s picture

If I am getting this on CCK 6.x-2.5, can we narrow it down to some change in Views that is sending different data back to CCK?

markus_petrux’s picture

Please, see #7 above.

Have you tried with CCK 2.6?

gargoyle’s picture

Fixed for me in CCK 6.x-2.6 too :-)

DarrellDuane’s picture

So this seems to be working for me now that I've upgraded to Views 6.x-2.8. Can anyone else confirm or deny that it is working for them when they upgrade to the latest views release ? It would be good to know if this is a stable fix in 2.8.

dawehner’s picture

The problem was cck, not views, as far as i understand the issue.

cesarsalazar’s picture

FileSize
10.75 KB

I upgraded to views 2.8 and cck 2.6 and it's not working for me. The radios has the correct nid values, but the title is not being displayed.

It was working fine with views 2.6

ti2m’s picture

Great, spend the last two hours with debugging before getting the idea of updating to the lastest views dev. Had the problem with cck 2.6 dev and views 2.8. as said, latest views dev fixes the issue for me.

BerkeleyJon’s picture

It seems that this is a theme-related problem, which would explain why most people aren't seeing it. In particular, I've been having the problem with our own custom theme, but it went away when I switched to another theme (Garland).

In particular, the problem was solved for me when I deleted the template file "views-view-field.tpl.php" from my custom theme -- even though the file in my theme was identical to the file modules/views/theme/views-view-field.tpl.php!

Perhaps the views data aren't being correctly passed to the theme's template files, but are being correctly passed to the module's template files? I'm afraid I don't know much about how this happens. Can anybody else help out?

BerkeleyJon’s picture

Status: Postponed (maintainer needs more info) » Active
BerkeleyJon’s picture

Priority: Critical » Normal
rcombes’s picture

I'm seeing this problem recently with Views 2.8 and CCK 2.6. The view used for the node reference is a simple list showing the node id and the node title. The node id shows up in the node reference select list but the title doesn't.

peterjlord’s picture

Version: 6.x-2.7 » 6.x-2.8

I'm having this problem with Views 2.8 and CCK 2.6. Same as #26. Just to add more complexity to this I've got 2 node reference fields as a simple hierarchy Area -> Region. The area node reference is using a simple view and is fine. The region node reference is using a view and has missing titles. I even cloned the working view and changed the node type in the view to be the region content type still empty titles. Changing the node reference from a view to a content type and titles display fine.

Where's the best place to look to find out where this problem is ?

rcombes’s picture

I tested the node reference on different themes and found it was just my customized theme that was causing the titles not to show in the node reference select list.

I then reverted to the earliest version of the customized theme and the node reference select list went back to working. I was able to figure out that the file views-view-field.tpl.php which I had copied from the sites/all/modules/views/theme folder for future modification was causing the problem. By taking it out and flushing caches, the node reference select list went back to working without a problem.

Here's the weird thing though. The version of views-view-field.tpl.php I had in my customized theme folder was an exact unmodified copy of the views-view-field.tpl.php in the sites/all/modules/views/theme folder. So it shouldn't have caused any problems.

Anyway, it works now.

esmerel’s picture

Status: Active » Closed (fixed)

Nobody's reported this issue in the last couple of views versions, so I'm going to go ahead and close it.

mudd’s picture

Status: Closed (fixed) » Active

May I reopen this bug...?

I'm upgrading a site from Drupal 6.x-1.3 to 6.x-2.2 and ran into what I think might be this issue. I can't say whether the fault is with views or cck or both (or neither, or drupal, etc). maybe just an incompatibility.

I first upped drupal, then cck, then views, and then noticed that node references calling a view to build a list stopped working. I backed all the way out to my starting point, and experimented with advancing some of these one version at a time. What I eventually found is that with no other changes, as soon as I upgrade Views from 6.x-2.3 to 6.x-2.4 my view/cck-field breaks. This is with no other updates, and with update.php and cache cleared. I also tried various upgrade levels to drupal and CCK to see if compatibility re-emerges, but no joy.

I even tried using the default garland theme, and Views 6.x-3.x-dev as mentioned (results in a single radio button with no title and no recognition of being selected -- so still broken), and again latest CCK 6.x-2.9 and drupal 6.x-2.2 (brings title, but still only a single match and no select affect)

Drupal 6.x-1.3
CCK 6.x-2.2
Views 6.x-2.4 (works with 2.3, but not with 2.4)

Process:
When creating a new node (say content type is called "book"), the user must select a project. When setting up the node-reference field (named "parent project") I use 'Advanced - Nodes that can be referenced (View)' and specify a view "authors_projects" (described below)

This results in a select field that shows all of the projects that the book node may be attached to; it builds a select-list of all the project nodes owned by the user creating the new book.

View "authors_projects":
Filters - Node: Type = project
Auguments - User: Uid
Default argument type is PHP code:

if (arg(0) == 'node' && arg(2) == 'edit') {
  $node = node_load(arg(1)); 
  $author = user_load(array('uid'=>$node->uid));
  profile_load_profile($author);
  $authorid = $author->uid;
  return $authorid;
} else {
  global $user;
  $userid = $user->uid;
  return $userid;
}
* the top part is just so that administrators can edit the book (shows author's projects rather than admin's)

So, would people please comment on whether they think this is or isn't related to this thread. If you think not, then suggestions or pointers would be much appreciated, since I'm stuck at Views 6.x-2.3 until solved.

merlinofchaos’s picture

Status: Active » Closed (won't fix)

This really seems like it's probably an issue for CCK and the nodereferences, not Views. It's very specific to nodereference. Possibly some update requires nodereference to update data that's not updating? It's pretty hard to tell externally, but it's also a feature of CCK. I don't have any way to debug it for you.

mudd’s picture

I got through it :)
I found that if I edit the argument and Update / Save, then the non-display view (described in #30) works again! Upgrading from 2.3 to 2.4 and then updating the argument results in the blob having a bit more data. This extra data is stuffed in after 'validate_argument_php' at approx column 2011 and before 's:6:\"fields\";'
s:27:\"validate_user_argument_type\";s:3:\"uid\";s:19:\"validate_user_roles\";a:6:{i:2;i:0;i:8;i:0;i:7;i:0;i:5;i:0;i:4;i:0;i:6;i:0;}s:27:\"validate_argument_transform\";i:0;s:28:\"validate_user_restrict_roles\";i:0;
Upgrading to 2.12 then required the same update of argument/view.

hansrossel’s picture

Title: View 2.6->2.7 Nodereference using view to select node - broken » Nodereference using view to select node - broken
Version: 6.x-2.8 » 6.x-2.16

It's definitely a theme issue because calling drupal_rebuild_theme_registry() on node/add or node/edit solves the issue, but is of course because of performance not a good solution.
I'm using now an alternative node reference module http://drupal.org/project/limited_nodereference which also solves the issue.