* create a "revision" view
* add some "historical data" fields (here: textfield and db-based-computedfield)

=> view does show title and revision creation date, but no fields data.

trying to debug i get this sql which cannot work:

SELECT 
  node_revision.vid AS vid, 
  node_revision.nid AS node_revision_nid, 
  node_revision.timestamp AS node_revision_timestamp, 
  node_revision.title AS node_revision_title, 
  
  'node' AS field_revision_field_paket_monat_node_entity_type, 
  'node' AS field_revision_field_title_node_entity_type 

FROM node_revision node_revision 
LEFT JOIN node node ON node_revision.nid = node.nid 
WHERE (( (node.status = :db_condition_placeholder_0) AND (node.type IN (:db_condition_placeholder_1)) )) 
ORDER BY node_revision_timestamp DESC LIMIT 10 OFFSET 0

do i miss something here, maybe a relation? (did not findt sth promising there)

btw: is devel the only way to show sql nowadays?

Comments

dawehner’s picture

Fieldapi fields are special here. The field data isn't loaded via the views sql query but via entity_load_multiple



  'node' AS field_revision_field_paket_monat_node_entity_type, 
  'node' AS field_revision_field_title_node_entity_type 
geek-merlin’s picture

hmm, so the sql may be right, the result still is wrong, as my field_title (right, not title, separate textfield) surely has data in it, which is not shown.

where to look for debugging?

geek-merlin’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new1.11 KB

tralala, nasty little typo in post_execute, L543 must be same condition as L558.
daring to set rtbc.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

Great . This patch makes totally sense. Commited.

bojanz’s picture

btw: is devel the only way to show sql nowadays?

No, you can make the query show in preview by checking an option in Advanced Settings.

dawehner’s picture

Some advertisement: drush views-dev set's up views with things like the sql in the preview or always expanded "advanced settings".

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.