[MGNLSTK-1481] Cannot open page on EE travel demo with STK added afterwards Created: 20/May/15 Updated: 15/Apr/16 Resolved: 29/Sep/15 |
|
| Status: | Closed |
| Project: | Magnolia Standard Templating Kit (closed) |
| Component/s: | None |
| Affects Version/s: | 2.9 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Evzen Fochr |
| Resolution: | Obsolete | Votes: | 2 |
| Labels: | 5.4migration, support | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 1h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Date of First Response: | |||||||||
| Sprint: | Kromeriz 12 | ||||||||
| Story Points: | 1 | ||||||||
| Description |
|
If an EE bundle with travel demo is already installed - and then STK is installed: one gets the following error on opening a page: Caused by: java.lang.ClassCastException: info.magnolia.module.site.ConfiguredSite cannot be cast to info.magnolia.module.templatingkit.sites.Site
at info.magnolia.module.templatingkit.functions.STKTemplatingFunctions.site(STKTemplatingFunctions.java:232)
|
| Comments |
| Comment by Daniel Kasmeroglu [ 13/Jul/15 ] |
|
This is clearly an implementation error in STKTemplatingFunctions caused by recent refactorings. The methods in STKTemplatingFunctions simply assumes that they got an instance of the old type info.magnolia.module.templatingkit.sites.Site whereas they're only getting the new interface info.magnolia.module.site.Site . A temporary solution would be to override the current type ConfiguredSite while adding the following type mapping to your magnolia module declarator:
<components>
<id>main</id>
<type-mapping>
<type>info.magnolia.module.site.Site</type>
<!-- NEW BUT NOT WORKING TYPE
<implementation>info.magnolia.module.site.ConfiguredSite</implementation>
-->
<implementation>info.magnolia.module.templatingkit.sites.Site</implementation>
</type-mapping>
</components>
|
| Comment by Edgar Vonk [ 14/Jul/15 ] |
|
We also run into this issue with Magnolia 5.4 EE with multisite and the STK installed. PS: it is not that we want to install the STK but various (Magnolia) modules still come with the STK currently. See e.g. |