Giter Site home page Giter Site logo

dd4t.model's Issues

Improved caching with JMS-based invalidation

There should be two cache agents:

  • a 'piggy-back' agent, which checks the Tridion broker to find the last published date. It should do so EVERY TIME, and the monitors (like the current DefaultCacheAgent uses) must GO!!!
  • an agent which is invalidated through JMS

Both agents should store in the same cache store. Preferably one which supports async invalidation (so when the item is to be invalidated, this is done in the background and the most recent item is returned until the new item is put in the cache store).

DD4T.Serialization.JSONSerializerService

https://tridion.stackexchange.com/questions/17961/dxa-1-2-intermittent-issue-in-json-output
https://tridion.stackexchange.com/questions/18235/dxa-1-5-intermittent-issue-in-json-output

I am suspecting that the root cause for the issues reported in the above questions are related to the JSONSerializer fix that was put in for DD4T.

The component presentation builder from DD4T ComponentPresentationBuilder is using the following https://github.com/dd4t/DD4T.TridionTemplates/blob/develop/source/DD4T.Templates.Base/Builder/ComponentPresentationBuilder.cs

try
{
// we cannot be sure the component template uses the same serializer service as the page template
// so we will call a factory which can detect the correct service based on the content
ISerializerService serializerService = SerializerServiceFactory.FindSerializerServiceForContent(renderedContent);
cp = serializerService.Deserialize<Dynamic.ComponentPresentation>(renderedContent);
}

In the base SerializerServiceFactory, I noticed that we are using the DD4T.Serialization.JSONSerializerService (https://github.com/dd4t/DD4T.Model/blob/2.0.4-beta1/source/DD4T.Serialization/SerializerServiceFactory.cs), which is using the DD4T.Serialization.JS JSONSerializerService and does not having the concurrency issue that is fixed below

private static string defaultSerializerServerType = "DD4T.Serialization.JSONSerializerService"; // Initialization in DD4T Serialization/SerializerServiceFactory

I see a commit transaction here
ff96b15 // Fixed and commited to DD4T

I would like to get some feedback before pursuing to upgrade the DD4T.Merged manually with the fix indicated above. The fix for the above issues would be to upgrade DD4T corresponding to the version of DXA.

Also, is it recommended that we switch the NewtonSoft references from 6.0.8 to 10.0.1, for the concurrency issue? I did not see an open issue in DD4T.Model and hence opened a new issue. Let me know your feedback!

IKeyword to Keyword (de)serialization error

Original post here; https://tridion.stackexchange.com/questions/21828/upgrade-to-tridion-9-5-and-net-dd4t-2-5-producing-error-with-ikeyword-on-dynami

Error:
<tcm:Error ErrorCode="80040356" Category="18" Source="Kernel" xmlns:tcm="http://www.tridion.com/ContentManager/5.0"><tcm:Line ErrorCode="80040356" Cause="true"><![CDATA[Could not create an instance of type DD4T.ContentModel.IKeyword. Type is an interface or abstract class and cannot be instantiated. Path 'Component.Fields.panels.LinkedComponentValues[1].Fields.link.EmbeddedValues[0].Link.LinkedComponentValues[0].Fields.CTAs.EmbeddedValues[0].Link.LinkedComponentValues[0].Categories[2].Keywords[0].ParentKeywords[0].IsRoot', line 1, position 28829.]]></tcm:Line></tcm:Error>

I found a workaround for dynamic templates as posted on Tridion Stack exchange, but now it's also appearing when calling FindComponentPresentations.

Is it possible to add to the JSONSerializerService?

public class KeywordConverter : CustomCreationConverter<IKeyword>
    {
        public override IKeyword Create(Type objectType)
        {
            return new Keyword();
        }
    }

TargetGroups missing from ComponentPresentation model

ComponentPresentation has a Conditions property, but there is no way in the web application to get the name(s) of Target Group(s) linked to the CP.

In many personalization/targetting scenarios we would like to have Target Group details (name + id) available delivery side. For example:

Deprecate IMultimedia.AltText

This property is never filled (unless you write custom template code), and it is out of place here. AltText is a content / metadata field.
The property must be marked as obsolete so it can be removed in the next major release.

Unable to access CustomerCharacteristicCondition

There is information in the DD4T XML / JSON against each component presentation for any TargetGroupConditions (previously Conditions) where each TargetGroup has an enumerable of Conditions.

However, the Conditions JSON contains no information about the concrete class it should be deserialized with (e.g. "$type": "CustomerCharacteristicCondition") and, presumably because of this, it is not possible to cast Condition to CustomerCharacteristicCondition to access its properties.

At present, it appears the only way to evaluate TargetGroupConditions would be to implement some custom deserialization in order to have access to the properties of each condition.

DD4t.ContelModel.Page.LastPublishedDate not correct

Hi, In my DD4T MVC Application, while rendering a page through "ActionExecutedContext" method, in my DD4T.ContentModel.Page i am getting value of "LastPublishedDate" as "01/01/0001". When i see in my Broker Database and check for the "Last_Published_Date" key for that particular page, i get correct date. Can anyone help me resolve the issue.

The reader's MaxDepth of 64 has been exceeded

In Newtonsoft.JSON 13, a default MaxDepth of 64 for JSON (de)serialization was introduced. Although DD4T.Model references Newtonsoft 12, you can still run into this problem if you decide to upgrade Newtonsoft in your application.
It should be possible to configure a MaxDepth in the Web.config, so that you can override the default.

REST service

If time permits (otherwise we can use the Java version)

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.