[MGNLSTK-691] Glossary Letter Template not available in Template drop-down menu Created: 25/Oct/10  Updated: 05/Apr/13  Resolved: 02/Apr/13

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: demoproject, templates
Affects Version/s: 1.3.5
Fix Version/s: 1.4.9, 2.0

Type: Bug Priority: Neutral
Reporter: Matt Dertinger Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: stk, templates, templating, templating_kit
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File glossary-letter-template-unavailable.png    
Issue Links:
dependency
depends upon MGNLSTK-407 Make template hierarchy configurable ... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

Hi,

If someone mistakenly clicks on the template column for a page that uses the Glossary Letter template, they won't be able to change the template back to Glossary Letter. This happens on the demoauthor.magnolia-cms.com site as well.

Steps to reproduce

  1. Log in to AdminCentral
  2. Navigate to website/demo-project/service/glossary/a
  3. Double-click on the template column
  4. Notice that the Glossary Letter template is not available as an option (See attached screenshot).

Please let me know if you need more information.

Possible Remedy

Would it be possible to update TemplateCategoryUtil to only allow templates with a subcategory of glossaryLetter under pages that have a template with a subcategory of glossary. In other words, the only allowable template under stkGlossary should be stkGlossaryLetter. Likewise, the only allowable template under stkGlossaryLetter should be stkGlossaryTerm.

Does this make sense?

Thanks,
Matt



 Comments   
Comment by Philipp Bärfuss [ 19/Jan/11 ]

We should revert that and try to fix this in a more global way. If the currently assigned template is not in the list of available template we should do:

  • add it to the list (there is no harm as it is already assigned)
  • don't let the user to change the template
Comment by Ondrej Chytil [ 03/Feb/11 ]

Issue will be solved by change of template availability which should make it easier to configure (i.e. configuration should be done in site definition without need to change java classes).

Comment by Christian Ringele [ 30/Dec/11 ]

This is a bug in the TemplatesAvailability class.
The Glossary template is catgeory feature, and ClossaryLetter is section.
But the TemplateAvailability doesn't allow section beiing added below a feature page (which should be allowed:

if(category.equals(TemplateCategory.SECTION) || category.equals(TemplateCategory.HOME) || category.equals(TemplateCategory.FUNCTIONAL)){
                return parentTemplateCategory.equals(TemplateCategory.HOME) || parentTemplateCategory.equals(TemplateCategory.SECTION) || parentTemplateCategory.equals(TemplateCategory.FUNCTIONAL);
            }

to

if(category.equals(TemplateCategory.SECTION) || category.equals(TemplateCategory.HOME) || category.equals(TemplateCategory.FUNCTIONAL)){
                return parentTemplateCategory.equals(TemplateCategory.HOME) || parentTemplateCategory.equals(TemplateCategory.SECTION) || parentTemplateCategory.equals(TemplateCategory.FUNCTIONAL)|| parentTemplateCategory.equals(TemplateCategory.FEATURE);
            }
Comment by Christian Ringele [ 30/Dec/11 ]

Have a look at commit 53067. Can be used identically for lower branches.

Generated at Mon Feb 12 07:29:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.