rws / dxa-model-service Goto Github PK
View Code? Open in Web Editor NEWSDL Digital Experience Accelerator Model Service
SDL Digital Experience Accelerator Model Service
When requesting a page that has include pages, if any of those include pages are not found, the model service returns the a message like following:
{
"timestamp": [
"String",
"2019-02-01T11:35:55.973+0000"
],
"status": 500,
"error": "Internal Server Error",
"exception": "com.sdl.webapp.common.api.content.ContentProviderException",
"message": "Content Service returned null for request pubId = 1pageId = 2",
"path": "/PageModel/tcm/1/index"
}
The request for the above would have been "http://localhost:8998/PageModel/tcm/1/index?includes=INCLUDE&modelType=R2"
It would make more sense for the service to return the page without the include page.
The link is resolving without a closing tag. suppose i added <a href="tcm3-7781" title="something">something</a>
then i will see in model service response <a herf="/en/images/test.jpg" title="something"> something
Corresponding issue for: RWS/dxa-web-application-java#104
Using DXA 2.0 + SDL Web 8.5, when we try to retrieve the keywords from a component that it's linked to a dynamic component presentation, the keyword info is not populated. The keyword is published, and in fact we need this category to be publishable.
When the component is linked to a page, the KeywordDataModel is rightly populated.
When you have a DCP on a page, the preview just has an id reference in the EntityModelData in the form "[component item id]-[template item id]".
This makes sense and I understand the purpose of normalizing the model.
However, when I get the published Page from the model service it replaces the reference with EntityModelData to save me a round trip to the database but doesn't include the ComponentTemplate so I can't access the template metadata.
Also, ExtensionData for Target Group Conditions is not present when a Component Template is flagged as a DCP even when checked to be embedded on a Page using a dynamic assembly.
This prevents Target Group Conditions being evaluated at presentation time as there is no way to retrieve them.
It seems as if an EntityModelData should still expose ComponentTemplate and ExtensionData regardless of whether the associated Component Template is a DCP or not. It is only really the Content property I would have anticipated being omitted for a DCP.
According to the DXA 2.0 Docs (https://docs.sdl.com/LiveContent/content/en-US/SDL%20DXA-v10/GUID-DDB87018-AE37-4624-A033-2483644B4C57), you can get the Model Service to leave the component URI in de xlink:href attribute when resolving the Rich Text field by setting a configuration setting in dxa.properties:
dxa.defaults.rich-text-xmlns-remove=false
I have set this property, and restarted the Model Service, but I still don't see the xlink:href in the JSON returned by the Model Service. Scanning the code in this repo, I don't see any reference to this property so I am guessing it has not been implemented?
The R2 serialization exposes multi-value field as an object instead of an array when there is only one element populated.
This should always be an array whether there are zero, one, or more elements since the model service is the last point we can reliably check the schema to determine if the field is set to be multi-value or not.
Otherwise it'll be very difficult to consume the JSON without checking each property for being an array / object / literal.
All information can be found here: https://tridion.stackexchange.com/questions/19905/dd4t-2-2-multimediafield-empty-when-using-model-service
Dynamic link resolving was working fine till 2.0.2.
As soon as we upgraded to Model 2.0.3 service, link resolving stopped working.
This is the corresponding model service issue for the problem in the DXA web app java whereby the entities are cached without referencing the context page: RWS/dxa-web-application-java#116
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.