I d'not know why this happens
But I only views shows the first two fileds

attach 2 images

Comments

Letharion’s picture

Status: Active » Postponed (maintainer needs more info)

Please read the guidelines.

drupa11y’s picture

Status: Postponed (maintainer needs more info) » Active

Had a similar problem, after installing latest dev all the fields are empty or not displayed.
Changing back to version from 2010.11.26 and everything is fine again.

israel dahan’s picture

So it does issue?
If possible please also link version
I'm sorry for opening the issue, just I'm new here.
Slowly I will learn

dawehner’s picture

juves’s picture

duplicate or not, I have the same problem

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

There is still no bug report here.

juves’s picture

Component: page displays » fieldapi data
Assigned: israel dahan » Unassigned
Priority: Normal » Major
StatusFileSize
new8.36 KB
new14.76 KB
new5.6 KB

1. Create View
2. Add Page Display
3. Add custom fields
4. Only first field has content

There is no bug with build-in fields, only with custom fields

drcho’s picture

StatusFileSize
new33.45 KB
new5.85 KB

Same problem here.
See the very simpler view structure in my attachment. Only the title an field_image is displayed in this example. the output of the bodytext is empty (see Screenshot in attachment).

aspilicious’s picture

Try again with latest drupal version (head! and not rc1) and latest view dev code...

drcho’s picture

i just installed the actual dev version of views and the dev version of drupal7. Still the same problem :-( Or what do you mean with 'head'?

bojanz’s picture

Status: Active » Postponed (maintainer needs more info)

head == latest drupal dev. So you did right.

Will try to reproduce this tonight.

EDIT: Spent the evening on other things, need to sleep now. Tomorrow is a new day, though.

drcho’s picture

thank you. i tried to understand the views module but it's too complex for me. perhaps you can find the solution it in the views_handler_field_field.inc (render function?)...

drcho’s picture

why is the status postponed? which information do you need anymore?

dawehner’s picture

Status: Postponed (maintainer needs more info) » Active

Noone updated the status in the meantime.

drcho’s picture

Status: Postponed (maintainer needs more info) » Active

ok. i'd like to help searching for the error but don't know where. any suggestions?

bojanz’s picture

views_handler_field_field.inc
prerender() gets the data, render() displays it.
The data is either not provided, or not displayed (doesn't come out of render).
See which one it is.

drcho’s picture

The problem isn't caused by views but by drupal core.

I tried to find the bug: pre_render() and render() work fine. Render returns empty field content for the 2nd field+ because of the field module of the drupal core.
The drupal core function field_language in modules/field/field.multilingual.inc returns the false language. don't know how to solve this :(

bradezone’s picture

Subscribing, as I think this is the problem I'm having. I've tried to create image galleries using Views in D7, and none of them have worked because the images simply don't show up. BUT the correct number of entries are shown (as I'm also displaying Title while trying to debug this problem), so I think the Views query is almost right but not quite.

My content type is called "Image Gallery" and I add one custom field called "photo" which can have unlimited entries. When I view the built-in page, things look fine and I can adjust the image sizes using "manage displays" so I know the problem must be with Views. Within Views I am merely filtering by this content type, then for Fields I am showing Node:Title and Fields:field_photo - I am formatting the field merely to output the original image (also tried the various imagecache formats). The query returns the correct number of entries because the Title appears multiple times, but no images show up. I looked at the query then at my DB, and while I know next to nothing about the inner workings of Views, I think it is because Views never consults the "file_managed" table even though that's where the URL's are for the uploaded files.

Here is the query in Views:

SELECT node.title AS node_title, node.nid AS nid, field_data_field_photo.entity_id AS field_data_field_photo_entity_id, field_data_field_photo.etid AS field_data_field_photo_etid, field_data_field_photo.delta AS field_data_field_photo_delta, field_data_field_photo.language AS field_data_field_photo_language, field_data_field_photo.field_photo_fid AS field_data_field_photo_field_photo_fid, field_data_field_photo.field_photo_alt AS field_data_field_photo_field_photo_alt, field_data_field_photo.field_photo_title AS field_data_field_photo_field_photo_title, field_data_field_photo.revision_id AS field_data_field_photo_revision_id, field_data_field_photo.bundle AS field_data_field_photo_bundle
FROM 
{node} node
LEFT JOIN {field_data_field_photo} field_data_field_photo ON node.nid = field_data_field_photo.entity_id AND (field_data_field_photo.etid = :views_join_condition_0 AND field_data_field_photo.deleted = :views_join_condition_1)
WHERE (( (node.type IN  ('image_gallery')) AND (node.status = '1') ))
LIMIT 12 OFFSET 0

Here's a similar query in one of my D6 sites:

SELECT node.nid AS nid,
   node_data_field_gallery_image.field_gallery_image_fid AS node_data_field_gallery_image_field_gallery_image_fid,
   node_data_field_gallery_image.field_gallery_image_list AS node_data_field_gallery_image_field_gallery_image_list,
   node_data_field_gallery_image.field_gallery_image_data AS node_data_field_gallery_image_field_gallery_image_data,
   node_data_field_gallery_image.delta AS node_data_field_gallery_image_delta,
   node.type AS node_type,
   node.vid AS node_vid
 FROM node node 
 LEFT JOIN content_field_gallery_image node_data_field_gallery_image ON node.vid = node_data_field_gallery_image.vid
 WHERE (node.status <> 0) AND (node.type in ('imagegallery'))

Compared to a D6 image gallery I created before, this query is pretty similar except for the bracketed terms {node} and {field_data_field_photo} which are only in the D7 query (and cause it to be invalid when entering it directly on the DB). Also the :views_join_condition thingies are new in D7...

bojanz’s picture

@drcho
Please open a drupal core issue with all the information you have, and link it here.
We can then close this views issue, and continue fixing it in the core issue...

drcho’s picture

all right, here is the core issue: http://drupal.org/node/992542 hope it can be solved soon

bojanz’s picture

Category: bug » support
Status: Active » Fixed

@bradezone
Your support request needs an issue of it's own. Maybe you're just missing a Relationship?

@drcho
We'll see.

Closing this issue.

plach’s picture

Title: d'ont see more 2 fields » Incomplete parameter passed to field_view_field()
Category: support » bug
Priority: Major » Critical
Status: Fixed » Active

Coming from #992542: field module: field_view_field returns an empty field to the views module. This is a Views issue:

The problem is in views_handler_field_field.inc, line 240: field_view_field() expects to have a full entity as parameter (or at least a data structure holding all the fields to be displayed, e.g. a row). The current code causes the static caches to be incomplete and so no language is found for every field besides the first (for every different language).

The $entity object needs to be prepared so that it holds all the fields belonging to the entity to be displayed. This should be feasible somehow by looping on the result set.

If this is not possible the only viable alternative is clearing field_language() static cache for each field, but this won't be good for performance.

plach’s picture

Issue tags: +translatable fields

tagging

plach’s picture

Status: Active » Closed (duplicate)

Ok, it seems this is being addressed in #987478: Field language is not properly handled.