[MGNLRES-104] Extension field missing: The extension of a resource is missing in the edit form. Hence it also can't be changed. Created: 05/Mar/14  Updated: 29/Mar/22  Resolved: 18/Mar/14

Status: Closed
Project: Magnolia Resources Module
Component/s: app
Affects Version/s: 2.2.2
Fix Version/s: 2.2.4

Type: Bug Priority: Major
Reporter: Christian Ringele Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File Resources-Extension.jpg    
Issue Links:
Relates
relates to MGNLRES-113 Install(Text/Binary)ResourcesTask doe... Closed
dependency
is depended upon by MGNLSTK-494 Files from theme can differ in the fi... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Team: Nucleus

 Description   

In former resources the extension was a field in the form/dialog, see print screen.
The extension is not necessarily correlating to the template in use.
The extension should be displayed and therefore also be changeable again.



 Comments   
Comment by Milan Divilek [ 05/Mar/14 ]

5.2.3 is coming out in next few days and is currently being closed down, it is not possible to squeeze this ticket in one the last moment. Moved to 5.2.4.

Comment by Jaroslav Simak [ 18/Mar/14 ]

This fix:

  1. re added extension field to the subapps for resources
  2. favors extension defined in the node name rather than in node property extension
  3. adds new Uri2Repository mapping that first checks for extension in the node name and then in extension property
  4. adds new option to the install tasks to strip/not strip extension from the node name when installing new resource
  5. point 2 does not apply for binaries - binaries can be accessed via nodePath.extension where extension is defined in the node name or in the binary node property.
  6. enables editing possibility for uploaded binaries (name and extension)
Comment by Roman Kovařík [ 18/Mar/14 ]
  • info.magnolia.module.resources.mapping.URI2ResourcesRepositoryMapping.getHandle(String) is almost the same as parent method. Would be good to reuse parent code if possible.
  • Wouldn't be content.getName() enough? (And content.getPath() is used two times anyway):
    if (StringUtils.isNotBlank(MIMEMapping.getMIMEType(StringUtils.substringAfterLast(content.getPath(), ".")))) {
  • Update tasks for adding of the new extension field should be at least grouped in ArrayDelegateTask to be clear that they are related.
Generated at Mon Feb 12 06:47:26 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.