D6 - Views - I don't see Content Fields when trying to add fields to a new view.

GreenSpiderDesign - July 8, 2009 - 20:28

These are the only fields available to me. What am I doing wrong?

Global: Custom text
Provide custom text or link.
Node: Body
The actual, full data in the body field; this may not be valid data on all node types.
Node: Delete link
Provide a simple link to delete the node.
Node: Edit link
Provide a simple link to edit the node.
Node: Has new content
Show a marker if the node has new or updated content.
Node: Link
Provide a simple link to the node.
Node: Moderated
Whether or not the node is moderated.
Node: Nid
The node ID of the node.
Node: Post date
The date the node was posted.
Node: Promoted to front page
Whether or not the node is promoted to the front page.
Node: Published
Whether or not the node is published.
Node: Sticky
Whether or not the node is sticky.
Node: Teaser
The stored teaser field. This may not be valid or useful data on all node types.
Node: Title
The title of the node.
Node: Type
The type of a node (for example, "blog entry", "forum post", "story", etc).
Node: Updated date
The date the node was last updated.
Node revision: Created date
The date the node revision was created.
Node revision: Delete link
Provide a simple link to delete the node revision.
Node revision: Log message
The log message entered when the revision was created.
Node revision: Revert link
Provide a simple link to revert to the revision.
Node revision: Title
The title of the node.
Node revision: Vid
The revision ID of the node revision.
User: Active
Whether a user is active or blocked.
User: Created date
The date the user was created.
User: Delete link
Provide a simple link to delete the user.
User: E-mail
Email address for a given user. This field is normally not shown to users, so be cautious when using it.
User: Edit link
Provide a simple link to edit the user.
User: Last access
The user's last access date.
User: Last login
The user's last login date.
User: Name
The user or author name.
User: Picture
The user's picture, if allowed.
User: Roles
Roles that a user belongs to.
User: Signature
The user's signature.
User: Uid
The user ID

CCK

Poieo - July 8, 2009 - 20:45

Do you have CCK installed and enabled?

CCK

GreenSpiderDesign - July 8, 2009 - 21:34

Yes I do.

CCK
Enabled Name Version Description
Enabled Name Version Description
Content 6.x-2.2 Allows administrators to define new content types.
Required by: Content Copy (enabled), Content Permissions (enabled), Fieldgroup (enabled), FileField (enabled), ImageField (enabled), Node Reference (enabled), Number (enabled), Option Widgets (enabled), Text (enabled), User Reference (enabled), FileField Meta (enabled)
Content Copy 6.x-2.4 Enables ability to import/export field definitions.
Depends on: Content (enabled)
Content Permissions 6.x-2.4 Set field-level permissions for CCK fields.
Depends on: Content (enabled)
Content Templates 6.x-1.0 Create templates to customize output of teaser and body content.
Fieldgroup 6.x-2.4 Create display groups for CCK fields.
Depends on: Content (enabled)
FileField 6.x-3.0 Defines a file field type.
Depends on: Content (enabled)
Required by: FileField Meta (enabled), ImageField (enabled)
FileField Meta 6.x-3.0 Add metadata gathering and storage to FileField.
Depends on: FileField (enabled), getID3() (enabled), Content (enabled)
ImageField 6.x-3.0-rc1 Defines an image field type.
Depends on: Content (enabled), FileField (enabled)
Node Reference 6.x-2.4 Defines a field type for referencing one node from another.
Depends on: Content (enabled), Text (enabled), Option Widgets (enabled)
Number 6.x-2.4 Defines numeric field types.
Depends on: Content (enabled)
Option Widgets 6.x-2.4 Defines selection, check box and radio button widgets for text and numeric fields.
Depends on: Content (enabled)
Required by: Node Reference (enabled), User Reference (enabled)
Text 6.x-2.4 Defines simple text field types.
Depends on: Content (enabled)
Required by: Node Reference (enabled), User Reference (enabled)
User Reference 6.x-2.4 Defines a field type for referencing a user from a node.
Depends on: Content (enabled), Text (enabled), Option Widgets (enabled)

View Type

Poieo - July 8, 2009 - 23:22

What type of view is it? Node, User, etc...

Could you post an export of what you have so far?

Same Problem

puya - July 9, 2009 - 01:06

I have the same problem. I am on a view with type of USER and when I try to add a CONTENT field from CONTENT PROFILE (the content field that is associated with the profile of the users) I can't access them? are there any work around to that?

(more details)
I am basically trying to create a list of all users on my site which is no problem, BUT their Photo is being stored as a CONTENT PROFILE with an IMAGE UPLOAD field. Now I cannot access this field in views (looks like because it is a USER type view, I can't access any CONTENT stuff whatsoever).

(Also if you'd like to know why I am storing the profile image as a CONTENT PROFILE field vs. the built in PICTURE in the USER PROFILE)
It is because when I use the built in user profile picture, and I try to read it in a view, I have access to it but the IMAGECAHCE PRESETS don't show up, so I get a very large file and I can't display it correctly.

now I have tried to go about creating this list two different ways and none of them work.. I would really really appreciate your help..

thanks

Image API GD2

GreenSpiderDesign - July 9, 2009 - 05:10

Puya - I believe if you enable this module - Image API GD2 - your issue with using the user profile image. This is the module that helps with the sizing of images set in ImageCache. I had a similar issue that this resolved.

Also - I don't know what View Type would expose the content fields - I've tried them all to no avail.

Permissions?

mcfilms - July 9, 2009 - 01:09

Do you have permission to view and edit that content?

(Note this was a reply to the OP, but it might be helpful for the post above too.)

Permissions

GreenSpiderDesign - July 9, 2009 - 05:02

Well - if I'm logged in as Admin shouldn't I have access? I went ahead and gave authenticated user permission to everything - still the content fields don't show up.

Type of View

GreenSpiderDesign - July 9, 2009 - 05:00

It is a Node View - is that why I only see Node and User fields? I would export it only I don't have the foggiest idea of how to do so.

Why this is SO incredibly frustrating to me...

GreenSpiderDesign - July 9, 2009 - 10:24

The reason this is so incredibly frustrating to me is that I am incredibly dedicated to the Drupal framework and yet it is increasingly a mystery to me. I consider myself a fairly intelligent person (IQ=183) and yet something as simple as implementing a photo gallery has taken me over six weeks (though admittedly NOT on a full-time basis) to try to get up and running. Every single implementation I have attempted has ended in some STUPID roadblock similar to this - where there is seemingly NO logical explanation why a solution that worked for others will NOT work for me. I have followed Jeff's video tutorial on the subject - wouldn't work for me - I have tried the Menalto solution - wouldn't work for me - I have tried pairing back to the simplest of solutions - STILL won't work.

"do you have permissions?" - check
"have you installed cck?" - check
"is the grass growing outside your window - under the tree - with the moon shining brightly upon it?" - check

Were Drupal Steve McNair and I Sahel Sazemi we would all need to worry that Drupal and I would be the subject of an autopsy investigation in short order! :0

Anyone else have any suggestions?

Frustrated in Austin, Texas...

a fairly intelligent person (IQ=183)

m13 - July 9, 2009 - 10:31

well actually 100% you do something completely wrong.

If you are chosing "user" you will not be able to access content. This makes sense. Please clarify what exactly you are trying to do with your views. Why do you base the whole view on the user?

click on

m13 - July 9, 2009 - 10:32

"export" and paste the results here

(sorry just noticed that you already mentioned it is a node view)

Export

GreenSpiderDesign - July 9, 2009 - 10:41

Is this what you want to see?

/**
* Implementation of hook_views_default_views().
*/
function foo_views_default_views() {
/*
* View 'portrait_gallery'
*/
$view = new view;
$view->name = 'portrait_gallery';
$view->description = 'Portrait Gallery';
$view->tag = 'portraits';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'image' => 'image',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('title', 'Gallery');
$handler->override_option('items_per_page', 16);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'grid');
$handler->override_option('row_plugin', 'node');
$views[$view->name] = $view;

return $views;
}

yes, this is the export

m13 - July 9, 2009 - 11:09

why grid?

and why node?

you need "unformatted" and "fields" so that you chose the fields you need to display.

another thing: why set the pager to 1? do you have multiple pagers?

God, I have no idea what you are trying to do but I am sure that it shouldn't take you 6 weeks to do it.
Please explain from the beginning

is it possible

m13 - July 9, 2009 - 11:10

that you don't see the fields because you set "node" as a parameter?

it cant be that easy can it?

"node" as a parameter?

GreenSpiderDesign - July 9, 2009 - 13:38

Where did I set that? I didn't do it intentionally if I did and I don't see where there is such a setting. Are you talking about Row Style being set to Node? If that is the case then no - that's not it - as I said I'm not stupid - there is some random dumb thing here that is not working properly even though I've followed to the letter the instructions in the tutorial. I have even tried starting the entire site again from scratch.

But I didn't want to get this detailed in what I have done as I didn't want to influence the feedback I might get from people.

Formatted/Grid

GreenSpiderDesign - July 9, 2009 - 13:33

I did have it set to fields but when I did that and didn't select any fields I had no images showing up whatsoever. I forgot to change it back to fields when I did the export.

I didn't realize that I need to set the format to unformatted rather than grid as the tutorial I was using told me to set it to grid.

I'm simply creating a very basic photographer's site - we have four images on the home page (http://kmorrisonimages.thespidercms.com) that we want to link to an associated gallery page. VERY simple design, yet I have run into a road block with each of the methods I've attempted to implement.

I got Menalto to work great as a stand alone, but could not get Drupal to see it properly. There are TOO many variables with that scenario to attempt to troubleshoot here, so I'll just focus on this for now.

I followed the instructions here to no avail - everything works fine up to the point where I'm supposed to add the Content Field for Image: http://jamestombs.co.uk/2009-03-18/create-a-simple-image-gallery-in-drup...

In terms of the pager - again - I just followed the instructions on the tutuorial -

"Set the title to Gallery. For Style set to Grid then chose 4 columns and set Alignment to Horizontal.

For Use pager set to Full pager. Then for Items per page, set to a multiple of 4, I am going to use 16 to give us a 4×4 grid of images. If you wish, you can set Use AJAX to Yes to stop the whole page being loaded on the pager."

I may have changed the items per page at some point in trying to troubleshoot this - can't recall at this point.

Thanks for your assistance on this - this is what I do love about the Drupal community!

Site Access

Poieo - July 9, 2009 - 13:46

I know this is a slight 'risk' for you, but if you want to set up a user account with the appropriate permissions and send me the user name and password via a private message, I'd be willing to look through your site and see what's going on. It sounds like we're just missing something silly. CCK and Views work VERY well together, and what you're trying to do should not be an issue...

Access

GreenSpiderDesign - July 9, 2009 - 14:37

Actually I don't mind that at all - I just went to add a ftp user and noticed something - I remembered the other day that I had an issue on another poject where for some reason when the cck module was copied to the server the modules directory didn't get copied - I just checked this here and it was missing here too.

I'm copying it there now and will report the impact results momentarily.

No Luck There

GreenSpiderDesign - July 9, 2009 - 14:46

I even cleared the Views Cache and the Site Cache - still no content fields showing.

WRONG Iteration Link

GreenSpiderDesign - July 9, 2009 - 15:12

Sorry - this was the iteration I'm currently working with - http://kmorrison.thespidercms.com - for anyone who cares...

End Result

GreenSpiderDesign - July 9, 2009 - 16:54

So it looks like the problem was in module versions. Dave had me download the latest versions of CCK, Views, ImageField and FileField and run PHP Update and now the content fields show!

Moral of this story - START WITH FRESH MODULE DOWNLOADS EVERY TIME! It will definitely save you time, headaches, and money!

Thanks Dave!!

 
 

Drupal is a registered trademark of Dries Buytaert.