Having a bit of an issue here... I have some CCK fields that I'd like to display in a table View, however, they don't show up while other fields like Node: Type, do show up. I made sure that I'm not "hiding" those cck fields and have found that any $data variable is filled with the correct cck field data. I'm having trouble figuring out where exactly the cck field data gets added to the view in code... whether that is in the content_views.inc or not. In content_views_field_handler_ungroup(), the $data variable has the cck data I want... but not sure what happens to it from there.

Any help would be great. Drupal 5.3.

CommentFileSizeAuthor
#12 New Picture.jpg19.64 KBpokadan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

KarenS’s picture

When you edit the view, are the fields there or is the field name missing? We've had sporatic reports that some fields are not showing up on Views field and argument lists. I haven't been able to replicate the problem, so can't find a fix.

What field types are missing? What CCK modules do you have installed?

BradM’s picture

I just noticed this on the weekend. I have one field that isn't showing up in views -- there's nothing special about it, it holds image data (eg. picture.jpg) but is a simple text field.

pcorbett’s picture

The field names are not missing when I edit the view, everything looks fine in that respect. I am using only the "text" cck field in my view. I have the following modules installed for cck: links, cck_address, zipcode, imagefield, and filefield.

I can somewhat track down the data, which views seems to be storing, but it just doesn't make it from $data to the screen. Let me know of which functions I should be looking at to help you and me figure this out... it gets a bit confusing trying to track down where the information is being passed to/from at time.

Again, normal fields like "node: type" are displayed but any cck field, including the only one I use in this particular view (text) do not appear when the view is, well, viewed.

Thanks for your prompt reply!

pcorbett’s picture

Also, turning off all CCK modules except for "text" does not change what is happening. Unless uninstalling these extra modules is needed, I'd say that this appears to be something to do with core CCK and not due to interference from any contrib module. I'll keep trying to narrow this issue down on my own too.

pcorbett’s picture

This only applies to List and Table formats for both Page and Block forms of this view. Teaser list, for example will show everything fine.

pcorbett’s picture

Does this issue help anyone else out with the current issue we're dealing with here? http://drupal.org/node/199700

I tried setting my "display fields" to something other than "default" but that didn't change anything for me.

pcorbett’s picture

I found MY issue. I'm using SQL Server 2000, and, unfortunately:

Note: In Windows, the DBLIB from Microsoft is used. Functions that return a column name are based on the dbcolname() function in DBLIB. DBLIB was developed for SQL Server 6.x where the max identifier length is 30. For this reason, the maximum column length is 30 characters. On platforms where FreeTDS is used (Linux), this is not a problem.

This interferes with setting up the $items array in several of the CCK and views functions, causing a mismatch and therefore the data is never displayed because it is looking for the full column name rather than the truncated version that is brought in using the db_fetch_object function.

I doubt this is the issue others are having here, but maybe in the past this is why it was happening for some others.

iant’s picture

I'm also having problems with getting CCK fields to show up in a new table view. The Label shows but not the content. The Content is a field on a nodeprofile content, other fields show up fine but not the extra ones I've added regardless of it I have text or number types of field. I cannot work out why this is occurring. using Drupal 5.9 on Linux hosting with mysql. Any suggestions ?

iant’s picture

Does anyone know if this issue has been fixed in views2. i.e. D6 ? I would have moved to D6 but the modules I need for the rest my sites functionality haven't been updated for D6 or don't exist for D6.

apaderno’s picture

Title: CCK Fields not showing up in View » CCK fields are not showing up in Views

There is an analog report for Drupal 6 (#363668: CCK fields are not showing up in Views), so I guess the problem is also present in that version of Drupal.

iant’s picture

I've downloaded and installed D6 can can confirm that CCK/Content_profile field are blank in views 2 for D6 as per the comment above about the D6 issue.

Personally because a number of the key modules I need to use (inactive user and role signup) don't exist (and may never exist) for D6 I am really keen for a D5 solution to this issue.

It's not clear if this a CCK issue or a Views issue but they don't seem to want to play together.

Anyone got any ideas ?

IanT

pokadan’s picture

FileSize
19.64 KB

pgsql problem?

Could this happen for those who use pgsql as their back-end?

For example if I run a query generated by views 2.3 on my pgsql database:

SELECT node.nid AS nid,
node.title AS node_title,
node_data_field_category_description.field_category_description_value AS node_data_field_category_description_field_category_description_value,
node_data_field_category_description.field_category_description_format AS node_data_field_category_description_field_category_description_format,
node.type AS node_type,
node.vid AS node_vid
FROM node node
LEFT JOIN content_type_categoryinfo node_data_field_category_description ON node.vid = node_data_field_category_description.vid
WHERE node.type in ('categoryinfo')
ORDER BY node_title ASC

I get what is attached as an image.

Notice that 2 column names for the resultset are the same(because of some sort of truncation).
Could it be that the code that runs in views does not know which one to pick?

pokadan’s picture

For those who run pgsql and have some cck fields not showing up in views should check this thread
http://drupal.org/node/371711

iant’s picture

OK I read somewhere on here (I've lost the link just now) that if you disable and then "uninstall" CCK and views and then re-install them - putting CCK on first that it solves the issue - I've done this on a D5 install and it seems to solve my problem - for a while.

It appears to depend what I fields have in the table view. If I add "usernode: last access time" to the list then my field "Text: my field" stops showing content. it doesn't seem to matter what order I list the fields in the view.

My hosting platform is as follows
Apache version 2.2.11 (Unix)
PHP version 5.2.8
MySQL version 4.1.22-standard

Any ideas ?

delmarr’s picture

I've tried the disable, re-enable method as well to no avail.
The content will not show up as fields, only node view.

anyone have a solution for this? I have a table waiting to be styled and the columns are getting lonely.

markfullmer’s picture

I had this issue of CCK fields not showing up in either Views or argument lists. The problem had to do with adding an action (redirect to a page) upon the user creating a new post. For whatever reason, this inhibited the saving of the content fields I'd added. Once I turned off the action (go to admin/build/trigger/node) the problem disappeared.

Hope that helps someone!

KarenS’s picture

Status: Active » Closed (won't fix)

Closing old issues. None of us is using the D5 version any more, so hard to provide any support. Sorry.

SeanA’s picture

Sometimes this can be caused by long field identifiers. Can be worked around by making the "machine-readable name" for CCK fields shorter. See #571548: Identifiers longer than 63 characters are truncated, causing Views to break on Postgres