-
Type:
Service Pack Request
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 4.2.2
-
Fix Version/s: 4.2.5
-
Component/s: ACS JavaScript API
-
Labels:None
-
Environment:linux pg tomcat
-
Bug Priority:
-
ACT Numbers:
00095295 Premier
-
Build Location:
How to reproduce?
=================
1) create a plain vanilla 3.4.10 (linux pg tomcat)
2) create a site 'site1' in Share as admin
3) create a folder 'folder1' in 'site1' document library
4) create in '/Company Home/Data Dictionary/Scripts' a file 'alex1.js' that contains:
----------alex1.js-------
var folder = companyhome.childByNamePath("/Sites/site1/documentLibrary/folder1");
var anode = folder.createNode("test1.txt", "cm:content");
anode;
----------------------------
This script creates a node that has no content.
5) execute the script going (as admin) to:
http://localhost:8080/alfresco/command/script/execute?scriptPath=/Company Home/Data Dictionary/Scripts/alex1.js
6) get the node details from the node browser (see attachment node1.html) and confirm it has not 'content'.
7) create in '/Company Home/Data Dictionary/Scripts' a file 'alex2.js' that contains:
----------alex2.js-------
var anode = companyhome.childByNamePath("/Sites/site1/documentLibrary/folder1/test1.txt");
anode.properties.content.guessMimetype("test1.txt");
anode.save();
----------------------------
8) execute the script going (as admin) to:
http://localhost:8080/alfresco/command/script/execute?scriptPath=/Company Home/Data Dictionary/Scripts/alex2.js
9) get the node details from the node browser (see attachment node2.html)
Result:
=====
calling the guessMimetype() method added a new property to the node.
Expected result:
===============
calling the guessMimetype() method on a node that has no content should not create a content.
- is cloned by
-
MNT-15798 CLONE - call to guessMimetype() on a node that has no content creates a content property
- Closed
- is related to by
-
MNT-8679 /share/proxy/alfresco/slingshot/doclib/doclist call fails if a document has a null mimetype
- Closed
-
MNT-15760 Inconsistent behavior on upload of zero byte files between REST v0 API and FTP
- Closed
-
MNT-8680 impossible to remove the content property using anode.properties.content=null;
- Closed
-
MNT-9519 Misleading error message about 'mimetype' when content is null
- Closed