Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-15430

New robots allow property missing from existing documents in client projects throws NPE

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 15.2.2
    • 15.3.0
    • None
    • None
    • Orion
    • Orion.Cycle3.Cooldown
    • Small

    Description

      In client projects with existing Robots documents the robotstxt:allow property won't be present until those documents are edited or updated with a groovy script.

      This throws an NPE in org.onehippo.forge.robotstxt.annotated.Section line 45

      return Arrays.asList(allows); because allows is null for existing documents.

      This can be replaced with something likeĀ 

      return allows != null ? Arrays.asList(allows) : Arrays.asList();

      Reproduced with clean archetype on v15.2.2 - see screenshot attached

      Attachments

        Issue Links

          Activity

            People

              jhoffman Jeroen Hoffman
              LKaramoulas Lef Karamoulas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: