U4-7888 - Cannot change default template for document type

Created by Asbjørn Riis-Knudsen 03 Feb 2016, 11:47:48 Updated by Sebastiaan Janssen 23 Aug 2016, 10:36:02

Tags: PR

Relates to: U4-8892

I have a site which I just upgraded to 7.3.7. I am unable to change the default template for a document type. I can select it in the dropdown and press Save, but when I reload, it jumps back to the original setting.

Unfortunately, I am not sure if this is a new issue in 7.3.7 or if I simply only discovered it now.

The site is based on a uSkinned theme, if that makes any difference.

From testing, the values are correct in the database, but the IsDefault value is simply ignored in the UI (and when creating content). It seems to always use the template with the lowest ID.

1 Attachments

Comments

Emmanuel Tissera 17 Feb 2016, 10:57:24

Same issue in Umbraco 7.4.0 - upgrade from 7.3.6

Changing the [IsDefault] flag in [cmsDocumentType] via SQL does not help either.


Simon Hebert 19 Feb 2016, 20:09:10

Same issue here with the 7.3.7 version. No way to keep the selection of another default template. It always revert to the same. Also, the "Default template" dropdown menu don't display non-english templates characters correctly and show À like entities for accent characters. All these problems are recents since we have also older versions of Umbraco (like 7.2.8) without these bugs and all work fine.

This bug is really a problem for a production Umbraco website because user need to manually choose his default template on each new content wich is creating. This technical step is often unknown by editor users.

Another bug related to the document types, if I choose the "Copy" option on a document type, I get a YSOD : Server Error in '/' Application. - Cannot insert duplicate key row in object 'porlier.cmsPropertyType' with unique index 'IX_cmsPropertyTypeUniqueID'. The duplicate key value is (518102c1-d289-4f05-9147-22de8a1d3935). The statement has been terminated.

It appears to have some regressions in newer versions.


Andy Butland 29 Feb 2016, 09:07:25

Believe this is fixed by the small change indicated here: https://github.com/umbraco/Umbraco-CMS/pull/1152


Claus Jensen 15 Mar 2016, 12:43:08

Thanks @abutland - yep it seems like the default template was actually being set on save but when reloading the mapping didn't map it over correctly so it would look incorrect when shown in the UI.

@shebert@androide.com I've tried creating a template with both danish characters and accent characters and currently do not see any issues showing this in both the template section, the document type section and when selecting the template in the dropdown on the document itself in content section. If you are still seeing this issue on the latest version could you please create a new issue for this with reproduction steps - thanks!


Simon Hebert 16 Mar 2016, 15:31:33

@Claus Jensen In version 7.3.7, the issue with accent characters is still present. The Allowed templates checkbox list show accents correctly but the Default template dropdown don't. See the attached image for an example of the problem.

With the version 7.4.1, the templates screen for document types has changed and there is no dropdown anymore for selecting the default templates and the Allowed templates page show accents correctly.


Dan Sørensen 16 Aug 2016, 11:36:39

I got this in version 7.4.1


Claus Jensen 16 Aug 2016, 11:45:05

@saadan Could you post a screenshot of where you see this issue please?


Asbjørn Riis-Knudsen 16 Aug 2016, 11:52:39

@saadan @claus As this has Due in version set to 7.4.2, I would expect it to occur in 7.4.1. Or am I misunderstanding something?


Claus Jensen 16 Aug 2016, 12:43:15

@arknu @saadan The confusion is due to this issue actually containing two bugs. There's the bug with accent characters not showing correctly and then there's the mapping issue fixed in Andy's PR.

  • The accent characters are "fixed" in 7.4.1 due to the fact that the field that didn't show those correctly, no longer exists in 7.4.1 (we switched to the new document type editor that doesn't have this issue).

  • The mapping issue causing the default template stuff to break, is fixed in Andy's PR which was pulled in for 7.4.2

Hope that explains it all!


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.4.0, 7.4.1, 7.3.7

Due in version: 7.4.2

Sprint: Sprint 11

Story Points:

Cycle: