Uploaded image for project: 'Google Sitemap (closed)'
  1. Google Sitemap (closed)
  2. MGNLGS-112

Attempting to access a SiteMap fails with Exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.3.3
    • 2.3.1, 2.3.2
    • Magnolia CE/EE 5.4.3
    • Basel 29
    • 5

      Attempting to render/access a SiteMap fails with RenderException caused by

      info.magnolia.config.registry.Registry$NoSuchDefinitionException: GoogleSiteMap
      	info.magnolia.config.registry.AbstractRegistry.getProvider(AbstractRegistry.java:123)
      	info.magnolia.rendering.template.registry.TemplateDefinitionRegistry.getTemplateDefinition(TemplateDefinitionRegistry.java:105)
      ...
      	info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:94)
      
      To reproduce

      Go to https://demoauthor.magnolia-cms.com (or a local bundle), create a sitemap and try to access it.

      Source of the problem

      When creating or updating a sitemap, the id of the template gets set incorrectly, so no TemplateDefinition is found for it in the template registry.

      The app comes with a custom field definition TemplateStaticFieldDefinition that sets the value to google-sitemap:pages/siteMapsConfiguration for (property-) name mgnl:template. A custom converter (see TemplateStaticFieldFactory) used to set the presentation value to the template title and the model value to the template id. Due to changes in UI – source has yet to be determined – the presentation value ends up in the item (see SaveSiteMapAction).

      Possible solutions

      Due to the field being hidden (setVisible(false) call in field itself) we've found the folloing option. Side note: (Broken template definitions are not validated.)

      1. Quickfix: Make converter (com.vaadin.data.util.converter.Converter#convertToPresentation()) return the template id instead of the title.
      2. Chosen solution: Completely remove converter; This solution will simplify the field factory.

      We should also update potentially broken mgnl:template properties of exisiting sitemaps by replacing GoogleSiteMap with google-sitemap:pages/siteMapsConfiguration.

        Acceptance criteria

              pmundt Philip Mundt
              tomwespi Tom Wespi
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 3h
                  3h