rws / dxa-modules Goto Github PK
View Code? Open in Web Editor NEWSDL Digital Experience Accelerator Modules
License: Apache License 2.0
SDL Digital Experience Accelerator Modules
License: Apache License 2.0
The core module is not initialized correctly as the spring-context.xml is placed in the wrong place in dxa-module-core. It is placed here: src/main/resources/spring-context.xml
, but it should be placed here: src/main/resources/META-INF/spring-context.xml
.
A workaround is to place it in the Spring context of the web application itself:
<!-- Temporary workaround to get the core module to load propertly -->
<context:component-scan base-package="com.sdl.dxa.core"/>
I see that the following construct is used in the archetype to create webapps (which in this case will also find the core module's Spring beans):
@Configuration
@ComponentScan(basePackages = {"com.sdl.dxa"})
public class WebAppConfiguration {
But I believe that this should primarily be used for loading webapp specific Spring beans, not standard DXA modules. The modules themselves should be self-contained, so it should only be needed to drop the module JAR into the webapp and everything should be initialized correctly. And the module itself can use whatever package name it prefers.
We are facing issue to map some Tridion component field data to EntityModel object. Some components link fields can be linked to different type of components. So, we have used generic type, EntityModel type of field in the SemanticEntity to map data of the linked component.
But some of the components are throwing following error:
Caused by: com.sdl.webapp.common.api.mapping.semantic.SemanticMappingException: Ambiguous semantic mapping for …
I have investigated the issue and found that DXA framework is failing to map linked component data to EntityModel object if entities for linked component have “entityName” attribute value same as the class name. As the mapping shown below:
@SemanticEntity(entityName = "**Product**", vocabulary = SDL_CORE, prefix = "p")
public class **Product** extends AbstractEntityModel {
…
}
But if we put “entityName” different from class name, as shown below then it is working.
@SemanticEntity(entityName = "**Product**", vocabulary = SDL_CORE, prefix = "p")
public class **ProductObject** extends AbstractEntityModel {
…
}
The issue is occurring because DXA framework register both the value that is specified in “entityName” attribute and entity class name as entity. If both the values are same, then DXA framework finds ambiguous semantic mapping (unable to find unique matching entity for model data) and throws exception.
Can you please let me know if it is limitation of DXA framework or we should follow some naming convention for class name and “entityName” attribute?
Hi,
I was trying to prepare the OOTB DXA 2.2 (with latest HF) + DD Module 2.2, It was not working and getting this below error message.
just to add my findings I too validate with DXA .NET 2.1 + DD Module - it's working fine.
Steps to reproduce:
I did download the sources and modules from github here as of 22nd Apr 2020.
https://github.com/sdl/dxa-web-application-dotnet/tree/release/2.2
https://github.com/sdl/dxa-modules/tree/release/2.2
https://github.com/sdl/dxa-modules/releases/download/DXA_2.2.2_Hotfix/SDL.DXA.DynamicDocumentation.Module.2.2.2.zip
Sdl.Web.Common.DxaException: No View Model registered for View 'Ish:Page:GeneralPage'. Check that you have registered this View in the 'Ish' area registration.
at Sdl.Web.Common.Models.ModelTypeRegistry.GetViewModelType(MvcData viewData) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Common\Models\ModelTypeRegistry.cs:line 115
at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.BuildPageModel(PageModel& pageModel, PageModelData pageModelData, Boolean includePageRegions, Localization localization) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 75
at Sdl.Web.Tridion.Mapping.ModelBuilderPipeline.CreatePageModel(PageModelData pageModelData, Boolean includePageRegions, Localization localization) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Mapping\ModelBuilderPipeline.cs:line 132
at Sdl.Web.Tridion.Mapping.DefaultContentProvider.LoadPageModel(Int32 pageId, Boolean addIncludes, Localization localization) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\DefaultContentProvider.cs:line 362
at Sdl.Web.Tridion.Mapping.DefaultContentProvider.<>c__DisplayClass2_1.b__0() in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\DefaultContentProvider.cs:line 104
at Sdl.Web.Tridion.Caching.CacheProvider.CreateCacheValue[T](UInt32 hash, String key, String region, Func1 addFunction, IEnumerable
1 dependencies) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\Caching\CacheProvider.cs:line 133
at Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd[T](String key, String region, Func1 addFunction, IEnumerable
1 dependencies) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\Caching\CacheProvider.cs:line 86
at Sdl.Web.Tridion.Caching.DefaultCacheProvider.GetOrAdd[T](String key, String region, Func1 addFunction, IEnumerable
1 dependencies) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\Caching\DefaultCacheProvider.cs:line 63
at Sdl.Web.Tridion.Mapping.DefaultContentProvider.GetPageModel(Int32 pageId, Localization localization, Boolean addIncludes) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\DefaultContentProvider.cs:line 99
at Sdl.Web.Modules.DynamicDocumentation.Controllers.ApiController.Page(Int32 publicationId, Int32 pageId) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\DynamicDocumentation\Controllers\ApiController.cs:line 72
Sdl.Web.Common.DxaException: No View Model registered for View 'Ish:Page:GeneralPage'. Check that you have registered this View in the 'Ish' area registration.
at Sdl.Web.Common.Models.ModelTypeRegistry.GetViewModelType(MvcData viewData) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Common\Models\ModelTypeRegistry.cs:line 115
at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.BuildPageModel(PageModel& pageModel, PageModelData pageModelData, Boolean includePageRegions, Localization localization) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Mapping\DefaultModelBuilder.cs:line 75
at Sdl.Web.Tridion.Mapping.ModelBuilderPipeline.CreatePageModel(PageModelData pageModelData, Boolean includePageRegions, Localization localization) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Mapping\ModelBuilderPipeline.cs:line 132
at Sdl.Web.Tridion.Mapping.DefaultContentProvider.LoadPageModel(Int32 pageId, Boolean addIncludes, Localization localization) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\DefaultContentProvider.cs:line 362
at Sdl.Web.Tridion.Mapping.DefaultContentProvider.<>c__DisplayClass2_1.b__0() in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\DefaultContentProvider.cs:line 104
at Sdl.Web.Tridion.Caching.CacheProvider.CreateCacheValue[T](UInt32 hash, String key, String region, Func1 addFunction, IEnumerable
1 dependencies) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\Caching\CacheProvider.cs:line 133
at Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd[T](String key, String region, Func1 addFunction, IEnumerable
1 dependencies) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\Caching\CacheProvider.cs:line 86
at Sdl.Web.Tridion.Caching.DefaultCacheProvider.GetOrAdd[T](String key, String region, Func1 addFunction, IEnumerable
1 dependencies) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\Caching\DefaultCacheProvider.cs:line 63
at Sdl.Web.Tridion.Mapping.DefaultContentProvider.GetPageModel(Int32 pageId, Localization localization, Boolean addIncludes) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\Sdl.Web.Tridion\Providers\DefaultContentProvider.cs:line 99
at Sdl.Web.Modules.DynamicDocumentation.Controllers.ApiController.Page(Int32 publicationId, Int32 pageId) in C:\Workspace\SDL-Tridion-Docs\DDWebapp\dxa-web-application-dotnet-release-2.2\DynamicDocumentation\Controllers\ApiController.cs:line 72
The DXA_1.2_Release tag is not on the release/1.2 branch. Also the release/1.2 is missing some webapp-java pom fixes from the DXA_1.2_Release tag branch.
After taking the latest source code from DXA 2.1, I am getting this error
NuGet Package restore failed for project Sdl.Web.Modules.DynamicDocumentation: Unable to find version '2.1.0-beta-20181116120415' of package 'Sdl.Dxa.Modules.DynamicDocumentation.Boilerplate'.
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages: Package 'Sdl.Dxa.Modules.DynamicDocumentation.Boilerplate.2.1.0-beta-20181116120415' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages'.
https://sitecore.myget.org/F/sc-packages/api/v3/index.json: Package 'Sdl.Dxa.Modules.DynamicDocumentation.Boilerplate.2.1.0-beta-20181116120415' is not found on source 'https://sitecore.myget.org/F/sc-packages/api/v3/index.json'.
https://api.nuget.org/v3/index.json: Package 'Sdl.Dxa.Modules.DynamicDocumentation.Boilerplate.2.1.0-beta-20181116120415' is not found on source 'https://api.nuget.org/v3/index.json'.
. Please see Error List window for detailed warnings and errors.
The DXA .NET modules from the dxa-modules project do not have NuGet packages.
I would like to have NuGet packages for every DXA .NET module, starting with the widely used Core module.
Combined with using precompiled views form Razor Generator this will make it much easier to use the DXA modules.
Especially for your first-time DXA project it takes a lot of time finding the DXA site in one project and the Core module in the other, then having to check out both, create a solution with them, making the post-build task in the Core module to work, etc. All of this would be almost a single click effort when using NuGet packages.
See SI4T/SI4T#4 for original issue, since the DXA Search module is using SI4T for the search indexing, we will need to fix this in SI4T via a Pull Request.
The XO module for DXA.Java does not track experiment views, only conversions.
The class XOTrackingMarkupDecorator needs to be extended with a call to the analytics manager to track views each time a specific experiment variant is shown:
@Override
protected String processMarkupByAnalytics(HtmlNode markup, ViewModel model) {
SmartTargetExperiment experiment = (SmartTargetExperiment) model.getMvcData().getMetadata().get("Promotion");
try {
**this.analyticsManager.trackView(experiment.getExperimentDimensions(), Collections.emptyMap());**
return this.analyticsManager.addTrackingToLinks(markup.toHtml(), experiment.getExperimentDimensions(), Collections.emptyMap());
} catch (SmartTargetException e) {
log.warn("Exception while adding tracking to experiment links", e);
return markup.toHtml();
}
}
Inline editing a Teaser Component Link field is not possible, the field is selectable and the breadcrumb seems to indicate we are on the actual field, but there is no slide out opening to select a different Component.
in .NET on the Teaser.cshtml
view we do the following:
<a class="@linkStyle" href="@Model.Link.Url" title="@Model.Link.AlternateText" @Html.DxaPropertyMarkup(() => Model.Link)>
@(Model.Link.LinkText ?? Html.Resource("core.readMoreLinkText"))
@if (!isButton)
{
<i class="fa fa-chevron-right"></i>
}
</a>
This generates the XPM markup inside the <a>
tag (which is incorrect, for XPM it needs to always be generated outside of the <a>
tag, and inside a <span>
or <div>
tag).
But more importantly @Html.DxaPropertyMarkup(() => Model.Link)
is on the wrong field, it uses Model.Link
(which is a reference to the embedded Schema field), and should use Model.Link.Url
(which is a reference to the internalLink
field of the embedded Schema, containing the actual Component link).
For DXA.NET the solution for the Teaser view is:
<span @Html.DxaPropertyMarkup(() => Model.Link.Url)>
<a class="@linkStyle" href="@Model.Link.Url" title="@Model.Link.AlternateText">
@(Model.Link.LinkText ?? Html.Resource("core.readMoreLinkText"))
@if (!isButton)
{
<i class="fa fa-chevron-right"></i>
}
</a>
</span>
The issue described in RWS/dxa-html-design#4 needs to be fixed in the DXA Java DXA Java as well.
Calling toString() method on Image with null url causes infinite loop.
Reason is that 'toHtmlElement' method implicitly calls 'toString' method:
throw new DxaException("URL is null for image component: " + this);
wich in turn calls 'toHtmlElement' method
In .NET DXA 2.1 version
To make dynamic documentation module work without core module, otherwise if you wish to do that you must register Main region RegisterViewModel("Main", typeof(RegionModel)); in DynamicDocumentationModuleAreaRegistration
Error: Page not found: [{publicationId}] {pageId}/index.html
Sites 9 introduced the concept of page regions in the Sites Content Manager. Component presentations can be organized in regions on a page.
The "Generate Index Data" TBB ignores those regions and only renders component presentations which are added directly on the page.
No image is shown when having the CID module active and adding a new image through XPM (not published before to the site). CID is probably not able to handle images published through the preview web service. I have seen this issue on the .NET version as well.
Mediamanager Item within a RichText field is not working while using retrofit mode. It is always getting failed to map the mediamanager item.
Error Details -
Sdl.Web.Common.DxaException: Unable to map field 'Content' to property of type 'Sdl.Web.Common.Models.RichText'. ---> Sdl.Web.Common.DxaException: No semantic mapping found between Schema 33274 (uuid:9389a8ce-0f19-44ee-9eb6-2d04d0c02c25:ExternalContentLibraryStubSchemamm) and model type 'Sdl.Web.Common.Models.MediaItem'
at Sdl.Web.Common.Mapping.SemanticSchema.GetModelTypeFromSemanticMapping(Type baseModelType)
As a workaround we have created a subclass and extended the default MediaManagerDistribution model. But need proper fix for that.
The language selector view in the .NET core module does an assumption that there always is a PageModel
object in the WebRequestContext
. This is not always the case, for example when browsing through product pages in the E-Commerce framework.
When the WebRequestContext.PageModel
is null the LanguageSelector view causes an error in the header.
p.s. The LanguageSelector view contains a lot of logic, the language selector URLs should be resolved in a controller and added to the model so that the view is cleaner.
While connecting the smart target in tridion, I am getting the below error. Can someone tell me the debugging tips for the same issue.
java.lang.IllegalArgumentException: Universe must not be null or empty at com.tridion.smarttarget.entitymodel.query.Query.<init>(Query.java:263) ~[smarttarget_entitymodel-8.1.1.jar:8.1.1] at com.tridion.smarttarget.query.builder.QueryBuilder.<init>(QueryBuilder.java:128) ~[smarttarget_core-8.1.1.jar:8.1.1] at com.tridion.smarttarget.query.builder.QueryBuilder.<init>(QueryBuilder.java:112) ~[smarttarget_core-8.1.1.jar:8.1.1] at com.sdl.dxa.modules.smarttarget.mapping.SmartTargetPageBuilder.executeSmartTargetQuery(SmartTargetPageBuilder.java:166) ~[dxa-module-smarttarget-web8-1.4.1.jar:1.4.1] at com.sdl.dxa.modules.smarttarget.mapping.SmartTargetPageBuilder.processQueryAndPromotions(SmartTargetPageBuilder.java:135) ~[dxa-module-smarttarget-web8-1.4.1.jar:1.4.1] at com.sdl.dxa.modules.smarttarget.mapping.AbstractSmartTargetPageBuilder.createPage(AbstractSmartTargetPageBuilder.java:161) ~[dxa-module-smarttarget-abstract-1.4.1.jar:1.4.1] at com.sdl.webapp.tridion.mapping.ModelBuilderPipeline.createPageModel(ModelBuilderPipeline.java:72) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT] at com.sdl.webapp.tridion.mapping.AbstractDefaultProvider$1.tryFindPage(AbstractDefaultProvider.java:287) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT] at com.sdl.webapp.tridion.mapping.AbstractDefaultProvider$1.tryFindPage(AbstractDefaultProvider.java:267) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT] at com.sdl.webapp.tridion.mapping.AbstractDefaultProvider.findPage(AbstractDefaultProvider.java:102) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT] at com.sdl.webapp.tridion.mapping.AbstractDefaultProvider.getPageModel(AbstractDefaultProvider.java:267) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT] at com.sdl.webapp.common.controller.PageController.getPageModel(PageController.java:321) ~[dxa-common-api-1.4.1.jar:1.4.1] at com.sdl.webapp.common.controller.PageController.handleGetPage(PageController.java:129) ~[dxa-common-api-1.4.1.jar:1.4.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_121] at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_121]
Even when I rename the smarttarget_conf, same error coming. So i think might be connection is not loading this file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.