Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Edge-case: Removed ContentType, existing Content #19

Open
leekelleher opened this issue Mar 21, 2018 · 2 comments
Open

Edge-case: Removed ContentType, existing Content #19

leekelleher opened this issue Mar 21, 2018 · 2 comments
Assignees
Labels

Comments

@leekelleher
Copy link
Contributor

NOTE: Logging here, so I don't forget about this in future.
This is not yet an actionable task.

I've hit an edge-case with Stacked Content, where I have existing Content blocks in the stack, then later I decide to remove specific ContentType from the Stacked Content data-type configuration.

The existing Content block is still in the stack, but when I click to edit it, there is a JS console error.

The error comes from Inner Content not being able to find the corresponding ContentType for that block, see here:

https://github.com/umco/umbraco-inner-content/blob/1.1.0/src/Our.Umbraco.InnerContent/Web/UI/App_Plugins/InnerContent/js/innercontent.controllers.js#L114-L117

The practical developer says "just delete those blocks" ... but I'm wondering if we should do something nicer? Either to display a warning/notification, or let the Content block still be editable?

We can detect in the JS if the ContentType is not available after this line:

https://github.com/umco/umbraco-inner-content/blob/1.1.0/src/Our.Umbraco.InnerContent/Web/UI/App_Plugins/InnerContent/js/innercontent.controllers.js#L229

@leekelleher leekelleher self-assigned this Mar 21, 2018
@markadrake
Copy link

Ran into that issue as we developed new stacked content components for our client, and deprecated existing ones (obviously we want there content strategy to be use the latest & greatest). But now they are unable to edit the legacy components.

Party of me is like "Rejoice! Delete and replace your content!" but the other side is like "wow they need to do all that for a typo or link change?".

My opinion - allow them to make edits. It's less of a headache in the long run. A visual message in the backoffice would be nice too. Perhaps make a dictionary entry so that it's configurable? Just ideas :)

@leekelleher
Copy link
Contributor Author

Thanks @markadrake, I agree, let them make edits.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants