Code Monkey home page Code Monkey logo

dd4t.mvc's People

Contributors

albertromkes avatar dominiccronin avatar ehenderiks avatar kunalshetye avatar quirijnslings avatar sshibani avatar thijsborst avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dd4t.mvc's Issues

XpmMarkupService confuses IsQueryBased and IsRepositoryPublished

If a component presentation is dynamic (in other words: loaded directly from the broker, not from the page), the IsRepositoryPublished and IsQueryBased are both set to true by the XpmMarkupService. This is not correct, because CPs can be dynamic without being query-based. This is the case when a component template is marked as 'publish as a dynamic component' but also 'allow to be embedded on a page'.
As a result, a DCP which is embedded on the page cannot be moved around, like you can with a completely static CP.
To solve this, we probably need to add an overload to the StartXpmEditingZone, because by looking at the viewmodel it isn't possible to tell if it was created as a result of a query.

If a binary is not found, the request path contains /BinaryData

When a binary is requested using the BinaryDistributionModule or through a BinaryController, the path in the request is temporarily rewritten to /BinaryData/*. At the end of a successful request, it is rewritten again to the original path. But when the request is not successful, e.g. when the binary cannot be found in Tridion, the path in the request stays on '/BinaryData...'. Although you don't notice this in the browser (it is a server-internal process), you do notice it if you have other handlers / modules in the pipeline which do something with the request. One example is a Friendly Url module, which looks up '404' requests in a list of friendly url definitions.
We need to make sure the path is always reset to the original, even if the binary cannot be found.

Normalize URLs

If a user requests a URL with double slashes (like http://www.acme.org//my//page.html), the URL should be normalized (into http://www.acme.org/my/page.html) before it is requested from the broker API. This is standard behaviour of most web servers.
This should become part of the 'add welcome file' logic in the DD4TControllerBase.

Optionally we could add support for extensionless urls as well.

StartXpmEditingZone does not work for linked components

If you call StartXpmEditingZone on a model that represents a linked component (rather than a component presentation), an empty string is returned. This is a shame because Tridion allows you to edit fields inside linked components if you just add a (nested) ComponentPresentation XPM comment. The template part is simply ignored.
To solve, we need to overload the StartXpmEditingZone with a parentModel (an IViewModel which contains a component template).

RenderComponentPresentation can pass null page

The code here:
https://github.com/dd4t/DD4T.MVC/blob/develop/source/DD4T.Mvc/Html/TridionHelper.cs#L99

is clearly intended to ensure that a non-null value of 'page' is passed to

MvcHtmlString output = renderer.ComponentPresentations(page, helper, byComponentTemplate, bySchema);

at line 115.

The assumption is that evaluating: helper.ViewContext.Controller.ViewBag.Page will throw if no page is available ,however it can simply evaluate to null without throwing.

Implement IDependencyMapper interface

Class should contain the defaults that will be set by on of the DD4T.DI.*

Example:

var mappings = new Dictionary<Type, Type>();
mappings.Add(typeof(IMessageProvider), typeof(JMSMessageProvider));

return mappings;

Inconsistent casing in namespace

In DD4T.Mvc\ViewModels\XPM\Contracts.cs, the namespace is defined as
DD4T.MVC.ViewModels.XPM

This is inconsistent with the namespacing scheme used in the rest of DD4T, where 'Mvc' is used rather than 'MVC'

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.