[MGNLSTK-995] Foldername and filename cannot be the same with Theme module import Created: 16/Aug/12  Updated: 02/Jul/18  Resolved: 02/Jul/18

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: None
Affects Version/s: 2.0.3
Fix Version/s: 2.7.x

Type: Bug Priority: Neutral
Reporter: Stef te Winkel Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: STK, Theme, import, module
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

STK Theme module import


Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

When importing a new theme module into the STK filenames (before the extension) which are the same as foldernames are ignored.

For example

folder: core
file in folder: core/base.js
file: core.js

core

__base.js
core.js

Importing this will ignore the core.js since a folder with the name core already exists.



 Comments   
Comment by Jan Haderka [ 17/Aug/12 ]

This is a known limitation and will not change. However it should not be silently ignored and exception should be raised in such situation. Also documentation should make it more clear.

Comment by Ruth Stocks [ 04/Nov/13 ]

Documented in tip box at:

Comment by Jozef Chocholacek [ 05/Nov/13 ]

Actually, the resource is not ignored. It is imported and its properties (content) are set correctly, the other resources (from the core folder) are added as sub-nodes of it. But the resource is still accessible at expected URL (e.g. http://localhost:8080/magnolia-enterprise-webapp/demo-project/resources/templating-kit/themes/pop/js/core.js).

The difference depends on whether the resource (core.js in our case) is in the list before or after any of the resources in the core folder.

If it is before, then it is created with a proper node type (mgnl:content) so it is visible with proper icon in the admin interface, and can be open and edited.

If it is after any of the resources from the same-name folder, then it is created with a mgnl:folder node type, and thus is not available for editing.

(All this results from the way how InstallResourceTask.execute() is implemented, and how it is called from ThemeInstallTask and InstallResourcesTask.)

Comment by Ruth Stocks [ 08/Nov/13 ]

Updated the wording at the doc links above. I've noted the explanation and will include it in a more extensive, future doc on creating theme modules.

Comment by Jan Haderka [ 02/Jul/18 ]

STK have been deprecated in September 2017. As part of this project nearing end-of-life, we are not planning to fix any of the existing issues except for the critical security issues. For more details, please consult documentation.

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