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

default settings file (content.ini) misses setting

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Low Low
    • Customer request
    • 4.0.1rc1
    • Misc
    • None

    Description

      content.ini[VersionView].DefaultPreviewDesign is missing and is not documented in the default file

      it is used here:
      (4.0.1 release svn)\kernel\content\versionview.php:

      line 245:

      $contentINI = eZINI::instance( 'content.ini' );
      if ( !$siteAccess )
      {
          if ( $contentINI->hasVariable( 'VersionView', 'DefaultPreviewDesign' ) )
          {
              $siteAccess = $contentINI->variable( 'VersionView', 'DefaultPreviewDesign' );
          }
          else
          {
              $siteAccess = eZTemplateDesignResource::designSetting( 'site' );
          }
      }
      

      the setting seem to be deprecated though:
      http://ez.no/doc/ez_publish/technical_manual/4_0/reference/configuration_files/content_ini/versionview/defaultpreviewdesign
      "Sets the default preview design for eZ Publish releases prior to 3.6."

      but this is not clear from the content.ini setting:

      [VersionView]
      # OBSOLETE: Use AvailableSiteDesignList instead
      # Specify all available site designs
      # AvailableSiteDesigns=standard;user;admin;demo
      # OBSOLETE: A list of designs the site can use
      AvailableSiteDesignList[]
      AvailableSiteDesignList[]=admin
      AvailableSiteDesignList[]=base##!
      

      perhaps the setting should be added, for only to be commented out, and marked as OBSOLETE/DEPRECATED.
      the setting AvailableSiteDesignList is also DEPRECATED:
      http://ez.no/doc/ez_publish/technical_manual/4_0/reference/configuration_files/content_ini/versionview/availablesitedesignlist
      "DEPRECATED (Sets the sitedesigns that are used by the complete site.)".

      but AvailableSiteDesignList is also in use, here:
      (4.0.1 release svn)\kernel\layout\ezlayoutcollection.php
      line 51:

          function fetchSitedesignList()
          {
              //include_once( 'lib/ezutils/classes/ezini.php' );
              $contentINI = eZINI::instance( 'content.ini' );
              if ( $contentINI->hasVariable( 'VersionView', 'AvailableSiteDesigns' ) )
              {
                  $sitedesignList = $contentINI->variableArray( 'VersionView', 'AvailableSiteDesigns' );
              }
              else if ( $contentINI->hasVariable( 'VersionView', 'AvailableSiteDesignList' ) )
              {
                  $sitedesignList = $contentINI->variable( 'VersionView', 'AvailableSiteDesignList' );
              }
              if ( !$sitedesignList )
                  return array( 'error' => array( 'error_type' => 'kernel',
                                                  'error_code' => eZError::KERNEL_NOT_FOUND ) );
              return array( 'result' => $sitedesignList );
          }
      

      I assume the settings are used in the code for BC purposes.
      this issue can be resolved by documenting the "DefaultPreviewDesign" setting in content.ini, and make it clear that it is deprecated.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: