Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 4.4.0, 4.5.0alpha, 4.5.0beta1, 4.5.0beta2
    • Fix Version/s: Customer request
    • Component/s: Misc
    • Labels:
      None
    • Environment:

      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.

        Activity

        Show
        Jérôme Vieilledent added a comment - Fixed in master ( https://github.com/ezsystems/ezpublish/compare/98f0959...eee7c96 )
        Hide
        Geir Arne Waaler added a comment -

        The issue is fixed so I move it from Code Review to Closed.

        Geir Arne Waaler
        eZ Documentation

        Show
        Geir Arne Waaler added a comment - The issue is fixed so I move it from Code Review to Closed. Geir Arne Waaler eZ Documentation

          People

          • Assignee:
            Jérôme Vieilledent
            Reporter:
            (inactive) Gunnstein Lye
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: