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

Module content does not return moduleResult array

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 3.10.0alpha1
    • Fix Version/s: 3.10.0beta1
    • Labels:
      None
    • Environment:

      Operating System: N/A
      PHP Version: N/A
      Database and version: N/A
      Browser (and version): N/A

      Description

      Content View Cache does not return an array as expected in index.php

      From: index.php (Around line, 989)

      if ( !is_array( $moduleResult ) )

      { eZDebug::writeError( 'Module did not return proper result: ' . $module->attribute( 'name' ), 'index.php' ); $moduleResult = array(); $moduleResult['content'] = false; }

      From: kernel/content/view.php (Around line, 210)

      else

      { $cacheFileArray = array( 'cache_dir' => false, 'cache_path' => false ); $args = compact( $localVars ); $data = eZNodeviewfunctions::contentViewGenerate( false, $args ); // the false parameter will disable generation of the 'binarydata' entry return $data['content']; // Return the $Result array // return $data; // Should instead return the $Result array instead of the above line. }

      }

      // Looking for some view-cache code?
      // Try the eZNodeviewfunctions class for enlightenment.
      ?>

      • Related Diff between the latest addition to the file kernel/content/view.php,
        http://pubsvn.ez.no/viewcvs/trunk/kernel/content/view.php?root=nextgen&rev=19175&sortby=date&r2=19175&r1=18411
        Steps to reproduce

        1. Create a folder
        2. Create a restricted section
        3. Assign restricted section to folder
        4. Add exclusion of restricted section to anonymous role content read policy
        5. Clear all cache
        7 Enable all debug output and disable all cache (specifically ViewCache)
        6. Load url of folder in public site as anonymous user
        7. Notice the login form is not included in $module_result.content output in pagelayout.tpl and the following debug output errors ...

      Error: error/view.php Aug 09 2007 01:03:15

      Error ocurred using URI: /About/Messages/Folder

      Warning: Insufficient permissions Aug 09 2007 01:03:15

      Function required:
      Module : content
      Function : read
      ClassID : 1
      MainNodeID : 276
      Policies that didn't match:
      PolicyID : p_369
      Limitation : Section
      Required : 1, 2, 3, 4, 5, 6,
      PolicyID : p_374
      Limitation : Class
      Required : 29, 30, 31, 32, 33, 40,

      Timing: Aug 09 2007 01:11:57

      Module end 'content'

      Error: index.php Aug 09 2007 01:11:57

      Module did not return proper result: content

      Timing: Aug 09 2007 01:11:57

      End

        Activity

        Hide
        ezrobot added a comment -

        This issue has been automatically closed due to the lack of activity over a long period of time. It is very likely that it is obsolete, but if you think it is still valid, do not hesitate to reopen it and mention why.

        Show
        ezrobot added a comment - This issue has been automatically closed due to the lack of activity over a long period of time. It is very likely that it is obsolete, but if you think it is still valid, do not hesitate to reopen it and mention why.
        Hide
        Bjørn Reiten added a comment -

        Tested and works fine.

        Show
        Bjørn Reiten added a comment - Tested and works fine.
        Hide
        Sergiy Pushchin added a comment -

        Fixed in 3.10beta1 ( trunk rev. 19668 )

        Show
        Sergiy Pushchin added a comment - Fixed in 3.10beta1 ( trunk rev. 19668 )
        Hide
        Ole Marius Smestad added a comment -

        Thanks for your report, we will look into this, and I have added it to the roadmap.

        Show
        Ole Marius Smestad added a comment - Thanks for your report, we will look into this, and I have added it to the roadmap.
        Hide
        Brookins Consulting added a comment -

        1. While the previously submitted patch solved the issue incorrectly, the problem remains in the latest svn trunk (3.10) sources.

        2. The problem appears to be focused around a problem where 'Access Denied' permission errors which occurs while trying to access content displays the first time correctly yet, while that result is cached it is not stored in cache as a serialized array. So when you access the content a second time and the cached response is used instead it only returns the content, not in an array.

        3. We are not certain but it seems to be caused by the cache system's storage of the error response content incorrectly for 'Access Denied' errors.

        4. We still see this as an outstanding 3.10 cache related problem

        Show
        Brookins Consulting added a comment - 1. While the previously submitted patch solved the issue incorrectly, the problem remains in the latest svn trunk (3.10) sources. 2. The problem appears to be focused around a problem where 'Access Denied' permission errors which occurs while trying to access content displays the first time correctly yet, while that result is cached it is not stored in cache as a serialized array. So when you access the content a second time and the cached response is used instead it only returns the content, not in an array. 3. We are not certain but it seems to be caused by the cache system's storage of the error response content incorrectly for 'Access Denied' errors. 4. We still see this as an outstanding 3.10 cache related problem
        Hide
        Brookins Consulting added a comment -

        Apologies,

        The above patch file does not resolve the issue properly, kernel.content.view.php.nocache.return.result.array.patch

        As it creates other secondary issues for content view results which are not restricted by section, role, policy restrictions.

        Show
        Brookins Consulting added a comment - Apologies, The above patch file does not resolve the issue properly, kernel.content.view.php.nocache.return.result.array.patch As it creates other secondary issues for content view results which are not restricted by section, role, policy restrictions.
        Hide
        Brookins Consulting added a comment -

        Attached is simple patch which provides changes to the content module's 'view' view which resolves this issue.

        Patched against svn rev 19645 and tested with 3.10alpha1

        Respectfully,
        Brookins Consultingkernel.content.view.php.nocache.return.result.array.patch

        Show
        Brookins Consulting added a comment - Attached is simple patch which provides changes to the content module's 'view' view which resolves this issue. Patched against svn rev 19645 and tested with 3.10alpha1 Respectfully, Brookins Consulting kernel.content.view.php.nocache.return.result.array.patch

          People

          • Assignee:
            Sergiy Pushchin
            Reporter:
            Brookins Consulting
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: