Hello bengtan,

currently CompositeLayouts can not display "node extra fields" in case you select in the Zones settings the Full node.
Suggested fix:
File composite.node.inc

          case 'full':
            if (_composite_nodes_recursion_check($node)) {
              drupal_set_message(t('You have created an infinite loop. One node is displaying a second node which in turn 
                                    displays the first node.'), 'error');
              $output =  node_view($node, TRUE, FALSE);
            }
            else {
              $output =  node_view($node, FALSE, FALSE);
            }
            break;

change to

          case 'full':
            if (_composite_nodes_recursion_check($node)) {
              drupal_set_message(t('You have created an infinite loop. One node is displaying a second node which in turn 
                                    displays the first node.'), 'error');
              // Allow modules to modify the fully-built node.
              node_invoke_nodeapi($node, 'view', 0, 1);
              $output =  node_view($node, TRUE, FALSE);
            }
            else {
              // Allow modules to modify the fully-built node.
              node_invoke_nodeapi($node, 'view', 0, 1);
              $output =  node_view($node, FALSE, FALSE);
            }
            break;

This here is a observation and recomendation but I can't call it a "feature request". People have reported this bug as issue from Gallery Assist (my module) in relation with CompositeLayout (nice module).

Please not misunderstand me.

How to reproduce the bug?:
You should not install my module to reproduce the error. Install better the example.module from Drupal. It is the same, the extra fields will be ignored from CompositedLayouts.

kind Regards
Juan Carlos

Comments

bengtan’s picture

Status: Active » Closed (works as designed)

Hi,

When Composite Layout calls node_view(), node_view() handles the displaying of all node fields, no matter whether those are defined by the node module or injected via nodeapi->view (eg. as CCK does). If you have fields which are somehow not showing, then I'd suggest you have an issue with themeing or permissions or something else.

Your patch is redundant. If you look at the source code of node_view() and node_build_content() at:

http://api.drupal.org/api/function/node_view/6
http://api.drupal.org/api/function/node_build_content/6

You can see that node_view() calls node_build_content() which invokes the nodeapi->view hook with:

$node = node_invoke($node, 'view', $teaser, $page);

so there is no reason for Composite Layout to invoke the nodeapi->view hook as well.

So, I think you have mistaken your diagnosis. However, if there is something I have missed in this explanation, please let me know.

Thank you.