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

Fatal error when overriding eZSiteAccess

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Customer request
    • 4.4.0, 4.5.0alpha, 4.5.0beta1, 4.5.0beta2
    • Misc
    • None
    • ezp 4.4

    Description

      When overriding eZSiteAccess you get a fatal error when you try to add/edit/see policies with limitations (particularly siteaccess limitation), the admin area exits with a Fatal error warning that a class of the kernel can't be re-declared.

      The problem is that "kernel/role/edit.php" and "kernel/role/policyedit.php" use include_once("kernel/classes/ezsiteaccess.php"), and this file is also in the class autoloads array.

      It isn't necessarily a bug that you can't override all kernel files, but I see it as a bug that there is nothing to stop you from overriding this file, and no warning when you do so. This should be improved, either by ensuring the override works, or by disabling it completely, or by establishing a list of files that are overrideable and show warnings/errors when other files are overridden.

      Steps to reproduce

      Steps to reproduce:

      • Copy the class eZSiteAccess (kernel/classes/ezsiteaccess.php) to the classes folder of some extension in order to implement a kernel class override.
      • Activate the kernel override feature. Add or edit the conf.ini file, like so:
        <?php
        define( 'EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE', true );
        ?>
      • Regenerate the autoloads array and the kernel override autoloads array.
      • Try to see/edit/add a policy with a siteaccess limitation.

      Attachments

        Activity

          People

            jv@ez.no jv@ez.no
            gl gl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: