-
Bug
-
Resolution: Fixed
-
Blocker
-
2.3.1, 2.3.2
-
Magnolia CE/EE 5.4.3
-
-
Empty show more show less
-
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.)
- Quickfix: Make converter (com.vaadin.data.util.converter.Converter#convertToPresentation()) return the template id instead of the title.
- 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.
- caused by
-
MGNLGS-25 Develop static field that would set and properly display Google Sitemap template.
- Closed
- is duplicated by
-
MGNLGS-114 RegistrationException on Magnolia 5.4.3
- Closed
-
MGNLGS-113 ContentType of XML-Sitemap is text/html
- Closed
-
MGNLGS-115 sitemap nodes reference wrong template
- Closed