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

updateviewcount.php does not take PathPrefix into account

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 4.0.6, 4.1.3
    • Fix Version/s: Customer request
    • Component/s: Cronjobs
    • Labels:
      None

      Description

      This is the part of the updateviewcount fixes that is still missing in svn. It solves the case where PathPrefix is used. updateviewcount fails to count URLs that are shortened by PathPrefix, since they obviously can't be found in the node tables.

      The pathprefix information is duplicated by this, you have to enter your pathprefixes in two places. It's like this because I can't reliably read the original pathprefix setting when it is set in another siteaccess than the current one. The only alternative I see is to recursively look for a node path string that matches each log entry not matching directly - horrible performance.

      1. updateviewcount.diff
        3 kB
        (inactive) Gunnstein Lye
      2. updateviewcount.php-15045.patch
        4 kB
        Xavier Serna
      3. updateviewcount.php-15045-stable-4.5.patch
        1 kB
        (inactive) Gunnstein Lye

        Activity

        Hide
        (inactive) Gunnstein Lye added a comment -

        Fixed in
        trunk (4.3.0alpha1) rev. 24347
        stable/4.2 (4.2.1) rev. 24348
        stable/4.1 (4.1.5) rev. 24349

        Show
        (inactive) Gunnstein Lye added a comment - Fixed in trunk (4.3.0alpha1) rev. 24347 stable/4.2 (4.2.1) rev. 24348 stable/4.1 (4.1.5) rev. 24349
        Hide
        Xavier Serna added a comment -

        with this fix, the log entries are found ok and added to the pathArray, but then when checking each pathArray item, the paths are not found because pathprefix is not used. A similar loop between pathprefixes should be added at this time.
        And, also, this check for empty firstElement ( if ( $firstElement != "" ) ) mades hits at home ( / ) to be ignored.

        (all this is present in 4.3.0 version of updateviewcount.php)

        Show
        Xavier Serna added a comment - with this fix, the log entries are found ok and added to the pathArray, but then when checking each pathArray item, the paths are not found because pathprefix is not used. A similar loop between pathprefixes should be added at this time. And, also, this check for empty firstElement ( if ( $firstElement != "" ) ) mades hits at home ( / ) to be ignored. (all this is present in 4.3.0 version of updateviewcount.php)
        Hide
        Xavier Serna added a comment -

        In reply to comment #048712
        You can find attached my patch for a 4.1.4 version of updateviewcount.php file, including patch from issue #13516 and fix for / hits, always when using pathprefixesupdateviewcount.php-15045.patch

        Show
        Xavier Serna added a comment - In reply to comment #048712 You can find attached my patch for a 4.1.4 version of updateviewcount.php file, including patch from issue #13516 and fix for / hits, always when using pathprefixes updateviewcount.php-15045.patch
        Hide
        (inactive) Gunnstein Lye added a comment - - edited

        Reopened due to feedback from Xavier Serna. Thanks for the patch!

        Show
        (inactive) Gunnstein Lye added a comment - - edited Reopened due to feedback from Xavier Serna. Thanks for the patch!
        Hide
        (inactive) Gunnstein Lye added a comment -

        In reply to comment #048714
        I have tested and updated Xavier's patch to 4.5, see attachment. I'm handing the issue over to core for verification.updateviewcount.php-15045-stable-4.5.patch

        Show
        (inactive) Gunnstein Lye added a comment - In reply to comment #048714 I have tested and updated Xavier's patch to 4.5, see attachment. I'm handing the issue over to core for verification. updateviewcount.php-15045-stable-4.5.patch
        Show
        Patrick Allaert added a comment - Fixed in: eZ Publish 4.5: https://github.com/ezsystems/ezpublish/commit/2be637ce891a61cbf154ed22366017f628916fb4 eZ Publish 4.4: https://github.com/ezsystems/ezpublish/commit/58e01e266f6e00a7a3ffb6db271961f600344d24 eZ Publish 4.3: https://github.com/ezsystems/ezpublish/commit/9268177c44d7c5fdb6c4a7f7d740e7362c3d7cba
        Hide
        Geir Arne Waaler added a comment -

        This issue is fixed. I move it to status Closed.

        Geir Arne Waaler
        eZ Documentation

        Show
        Geir Arne Waaler added a comment - This issue is fixed. I move it to status Closed. Geir Arne Waaler eZ Documentation

          People

          • Assignee:
            Patrick Allaert
            Reporter:
            (inactive) Gunnstein Lye
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: