CCK Fields in a View display only on admin pages, not on normal node/pages.
| Project: | Content Construction Kit (CCK) |
| Version: | 6.x-2.4 |
| Component: | General |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Hi,
I have two drupal sites:
Site 1- Works as an uploading platform for a library. Users upload files and fill in a bunch of CCK fields (author, Year, Pages, Format, etc...). I created a view (called library-view) with exposed filters on this site to search those uploaded files.
Site 2- Has the library-view from Site 1 embedded.
Everything works beautifully, I used "db_set_active" and "views_embed_view". I put it all in a block with PHP input format enabled so I can put it anywhere I want.
The code for the block looks like this, remember this block is in Site 2:
<?php
//Don't forget to enable the new database connection see for a good explanation on doing it http://drupal.org/node/18429
db_set_active('site1database');
print views_embed_view('viewname', $display_id = 'default');
//This way the rest of the site works fine
db_set_active('default');
?>However, the views displays full (author, Year, Pages, Format, etc...) in admin pages (eg path: admin/*) , and only displays the title and body of the nodes on regular pages.
I am logged in as admin en both places, guess that rules out permissions.
Anyhelp or hint is very welcome, I am running out of places to look.
Thanks

#1
#2
Maybe the problem comes from the fact that CCK Views integration handlers use CCK APIs to check data related to fields, and this comes from cached data. Maybe this cached CCK data is ok when the view in executed in admin pages, but not on regular pages? Maybe there's something in your logs about failed queries or something similar?
One possible way to track this is using the devel module to find out which queries are being executed in the page.
#3