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.
Comment | File | Size | Author |
---|---|---|---|
#21 | views-cck-bug.PNG | 10.75 KB | cesarsalazar |
Comments
Comment #1
DarrellDuane CreditAttribution: DarrellDuane commentedI noticed the same thing and am sticking with Views 2.6 until this is resolved.
Comment #2
dpatte CreditAttribution: dpatte commentedI 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.
Comment #3
dpatte CreditAttribution: dpatte commentedi have copied 2.6 on top of 2.7, did an update.php, and the select lists are now appearing correctly again.
Comment #4
dawehnerThen this is fixed
Comment #5
amariotti CreditAttribution: amariotti commented@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.
Comment #6
dawehnerLets move first to cck, because views does not have any specific code for cck.
Comment #7
markus_petrux CreditAttribution: markus_petrux commentedI think this is fixed in cck 6.x-2.6
For reference: #614292: CCK Reference fields based on views broken by recent change in views_plugin_style Views 2.7 (#502348)
Comment #8
dpatte CreditAttribution: dpatte commentedI 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.
Comment #9
BerkeleyJon CreditAttribution: BerkeleyJon commentedI 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.
Comment #10
dpatte CreditAttribution: dpatte commentedBerkeley - did you clear your caches?
Comment #11
merlinofchaos CreditAttribution: merlinofchaos commentedSince 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.
Comment #12
BerkeleyJon CreditAttribution: BerkeleyJon commentedSorry 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:
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!
Comment #13
DarrellDuane CreditAttribution: DarrellDuane commentedI 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.
Comment #14
gargoyle CreditAttribution: gargoyle commentedI 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
Comment #15
izmeez CreditAttribution: izmeez commentedsubscribe
Comment #16
gargoyle CreditAttribution: gargoyle commentedIf 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?
Comment #17
markus_petrux CreditAttribution: markus_petrux commentedPlease, see #7 above.
Have you tried with CCK 2.6?
Comment #18
gargoyle CreditAttribution: gargoyle commentedFixed for me in CCK 6.x-2.6 too :-)
Comment #19
DarrellDuane CreditAttribution: DarrellDuane commentedSo 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.
Comment #20
dawehnerThe problem was cck, not views, as far as i understand the issue.
Comment #21
cesarsalazar CreditAttribution: cesarsalazar commentedI 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
Comment #22
ti2m CreditAttribution: ti2m commentedGreat, 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.
Comment #23
BerkeleyJon CreditAttribution: BerkeleyJon commentedIt 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?
Comment #24
BerkeleyJon CreditAttribution: BerkeleyJon commentedComment #25
BerkeleyJon CreditAttribution: BerkeleyJon commentedPerhaps related to #593336: Views requires a theme include?
Comment #26
rcombes CreditAttribution: rcombes commentedI'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.
Comment #27
peterjlord CreditAttribution: peterjlord commentedI'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 ?
Comment #28
rcombes CreditAttribution: rcombes commentedI 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.
Comment #29
esmerel CreditAttribution: esmerel commentedNobody's reported this issue in the last couple of views versions, so I'm going to go ahead and close it.
Comment #30
mudd CreditAttribution: mudd commentedMay 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:
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.
Comment #31
merlinofchaos CreditAttribution: merlinofchaos commentedThis 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.
Comment #32
mudd CreditAttribution: mudd commentedI 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.
Comment #33
hansrossel CreditAttribution: hansrossel commentedIt'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.