Uploaded image for project: 'User Directory'
  1. User Directory
  2. UD-57

Cannot create a virtual page hierarchy if one value return only digits

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.0
    • 2.0.0
    • None

      I set the root page with a classification metadata that will return "94100" for a given content, and then I got the following stacktrace when trying to display the virtual pages in the sitemap tool.
      If I refresh the sitemap tool, I cannot get any page

      Relevant stacktrace:

      Caused by: java.lang.IllegalArgumentException: 94100 doest not match the expected regular expression : ^([0-9-_]*)[a-z].*$
          at org.ametys.cms.FilterNameHelper.filterName(FilterNameHelper.java:56)
          at org.ametys.plugins.userdirectory.UserDirectoryPageHandler.getTransformedClassificationMetadataValue(UserDirectoryPageHandler.java:282)
          at org.ametys.plugins.userdirectory.UserDirectoryPageHandler.lambda$_initializeCaches$2(UserDirectoryPageHandler.java:335)
          at org.ametys.plugins.userdirectory.UserDirectoryPageHandler$$Lambda$139/1079941432.apply(Unknown Source)
          at java.util.stream.Collectors.lambda$toMap$164(Collectors.java:1321)
          at java.util.stream.Collectors$$Lambda$40/328931831.accept(Unknown Source)
          at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
          at java.util.Iterator.forEachRemaining(Iterator.java:116)
          at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
          at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)
          at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)
          at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
          at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
          at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
          at org.ametys.plugins.userdirectory.UserDirectoryPageHandler._initializeCaches(UserDirectoryPageHandler.java:333)
          at org.ametys.plugins.userdirectory.UserDirectoryPageHandler.getTransitionalPagesName(UserDirectoryPageHandler.java:299)
          at org.ametys.plugins.userdirectory.page.VirtualUserDirectoryPageFactory.getChildren(VirtualUserDirectoryPageFactory.java:100)
          at org.ametys.plugins.repository.AmetysObjectResolver.resolveVirtualChildren(AmetysObjectResolver.java:554)
          at org.ametys.plugins.repository.jcr.TraversableAmetysObjectHelper.getChildren(TraversableAmetysObjectHelper.java:226)
          at org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObjectFactory.getChildren(DefaultTraversableAmetysObjectFactory.java:63)
          at org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject.getChildren(DefaultTraversableAmetysObject.java:74)
          at org.ametys.web.repository.page.jcr.DefaultPage.getChildrenPages(DefaultPage.java:555)
          at org.ametys.web.repository.page.jcr.DefaultPage.getChildrenPages(DefaultPage.java:548)
          at org.ametys.web.repository.page.SitemapDAO.getPageProperties(SitemapDAO.java:202)
          at org.ametys.web.cocoon.SitemapAction.pagescontainer2json(SitemapAction.java:168)
          at org.ametys.web.cocoon.SitemapAction.act(SitemapAction.java:89)
      

            sprieul Simon Prieul (Inactive)
            trizzi Thibaut Rizzi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: