Details

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

      N/A

      Description

      This bugreport contains two issues that I just discovered when using updateviewcount.php on a new site.

      1) The path_identification_string in ezcontentobject_tree is all lower case. If you use nice URL names like "News/Top-Stories", the path_identification_string is "news/top_stories", and hence will not match and make view counting not work.

      2) If you have a slightly more complex site prefix than simply "http://siteurl/siteaccess". In example:

      SitePrefix[]
      SitePrefix[]=~knut/ezpublish/sites/example.com/index.php/example_site

      in logfile.ini.append.php the updateviewcount.php will not match the access log entries.

      See attached patch against trunk that fixed the problems for me and makes updateviewcount.php to work again.

        Issue Links

          Activity

          Hide
          Knut Urdalen added a comment -
          Show
          Knut Urdalen added a comment - correcting_path_identification_string_in_updateviewcount.patch A patch that fixes this problem
          Hide
          (inactive) Gunnstein Lye added a comment - - edited

          Part 1) is fixed in separate issue: #012842: updateviewcount.php uses path_identification_string instead of url_alias
          http://issues.ez.no/12842

          Show
          (inactive) Gunnstein Lye added a comment - - edited Part 1) is fixed in separate issue: #012842: updateviewcount.php uses path_identification_string instead of url_alias http://issues.ez.no/12842
          Hide
          (inactive) Gunnstein Lye added a comment - - edited

          The attached file fixes part 2) of the reported issue. It contains patches for current svn, from 3.9 up to 4.1 and trunk. There are two fixes:

          1. Replaced wrong use of split() with explode(). This is not needed on trunk, as this is fixed there.

          2. Escaped the url prefix with preg_quote. This is required everywhere, including trunk.

          NB: Part 2 of this fix introduces a backwards compatibility break. The current code allows you to have regular expressions in your SitePrefix. This is not documented and probably not intended by the original author. The fix escapes the prefix with preg_quote, which means that the regexp "feature" is lost. This must be documented as a BC break.updateviewcount-patches-20090401.zip

          Show
          (inactive) Gunnstein Lye added a comment - - edited The attached file fixes part 2) of the reported issue. It contains patches for current svn, from 3.9 up to 4.1 and trunk. There are two fixes: 1. Replaced wrong use of split() with explode(). This is not needed on trunk, as this is fixed there. 2. Escaped the url prefix with preg_quote. This is required everywhere, including trunk. NB: Part 2 of this fix introduces a backwards compatibility break. The current code allows you to have regular expressions in your SitePrefix. This is not documented and probably not intended by the original author. The fix escapes the prefix with preg_quote, which means that the regexp "feature" is lost. This must be documented as a BC break. updateviewcount-patches-20090401.zip
          Hide
          (inactive) Gunnstein Lye added a comment -

          Fixed in
          trunk rev. 23473
          stable/4.1 rev. 23474
          stable/4.0 rev. 23475

          Show
          (inactive) Gunnstein Lye added a comment - Fixed in trunk rev. 23473 stable/4.1 rev. 23474 stable/4.0 rev. 23475
          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: