Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-8124

Statistics cannot deal with spaces that have a dot (“.”) in their name

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5
    • Fix Version/s: None
    • Component/s: Statistics
    • Labels:
    • Environment:
      Linux amd64, websphere 7, datasource, remote Oracle Database 10g Enterprise Edition 64bit
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      In table DocumentStats, field “name” represents the name of a page or of a space.

      Let’s say we have a space named SPA.CE

      Its WebHome for example is correctly saved as name=’SPA\.CE.WebHome’ (note the “\” to escape the first dot)

      But we can have a record where name=’SPA.CE’ that represents the space and not a page

      Unfortunately, method getDocumentStatistics, when called with scope ALL_PAGES, performs a query “where name like ‘%.%’” and thus record where name=’SPA.CE’ is incorrectly returned in the result set. In the same way, when scope is ALL_SPACES, the query is “where name not like ‘%.%’” and that record is incorrectly skipped.

      Records in DocumentStats should be managed in a different way, maybe using the className field to determine the kind of object they represent (and not being based on the name format)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lcappello Luca Cappello
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: