Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13841

Template override mechanism does not work with information collectors

    XMLWordPrintable

Details

    Description

      As reported by Alexander Block:

      If one defines an override rule in the override.ini for an attribute that is used as an information collector, the override rule does never match. Example entry:

      [ezstring_newstring]
      Source=content/datatype/collect/ezstring.tpl
      MatchFile=collect/newstring.tpl
      Subdir=templates
      Match[class_identifier]=some_class

      The reason for it is located in eZObjectForwarder::templateNodeTransformation() where one can find the following piece of code
      foreach ( $rootMatches as $rootMatch )
      {

      ...
      if ( $resourceNodes === false )
      return false;
      ...
      }

      Here, the $rootMatches are taken from the 'matches' defined in kernel/common/eztemplateautoload.php:

      ...

      'attribute_view_gui' => array( 'template_root' => array( 'type' => 'multi_match',
      'attributes' => array( 'is_information_collector' ),
      'matches' => array( array( false,
      'content/datatype/view' ),
      array( true,
      'content/datatype/collect' ) ) ),

      ...

      If there is no override rule for the first match ('content/datatype/view'), the second match will never be investigated due to the if statement described above.

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            cyberwolf cyberwolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: