Giter Site home page Giter Site logo

dxa-model-service's People

Contributors

alebastrov avatar ben-gineer avatar dxasupport avatar jglandman avatar majiccode avatar mbilenko-sdl avatar raimondkempees avatar roshvets avatar rpannekoek avatar treaz avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dxa-model-service's Issues

Unpublished Include Pages should not cause error

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.

Empty KeywordModelData when retriving a dynamic component presentation

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.

Model Service (R2) ComponentTemplate missing from DCP(s)

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.

dxa.defaults.rich-text-xmlns-remove has no effect

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?

Poor handling for multi-value fields

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.