When uploading a file(an image to the dam folder as an example) on CQ5 using CRXDE lite or other UI interface, the system would give an error message if the file being uploaded has invalid characters.
I just found out that [ and ] are not allowed as part of file names.
But when uploading file using a non-UI interface, SlingPostServlet for example, the character [ gets replaced with the percent encoding representation(%5D) and no error was generated.
Is there some kind of list/doc that would show which characters are not allowed in CQ5?
I am using CQ5.4
Thank you
The JCR naming restrictions are described in the Repository Model section of the JCR specification.
Specifically, the following characters are not allowed:
(“/”, “:”, “[“, “]”, “|”, “*”)
There is a com.day.cq.commons.jcr.JcrUtil class has a createValidName(title) method which may be able to help you. By default the STANDARD_LABEL_CHAR_MAPPING will replace all illegal characters with an underscore. It is possible to use the HYPHEN_LABEL_CHAR_MAPPING to replace with a hyphen using the createValidName(title, labelCharMapping[]) method.
Clientlibs used by the coral-ui on AEM's backend use the following regex to filter:
_ILLEGAL_FILENAME_REGEX: /[\".%/\:*?[]|\n\t\r ]|[\x7f-\uffff]/g
Here's a sample:
var text = "äüö?abcdefghijklmnopqrstuvwxyz!\"§$%&/()=?´`+*#'-_.:,;<>^°";
var regex = /[\"\.%/\\:*?\[\]|\n\t\r ]|[\x7f-\uffff]/g;
console.log(text.toLowerCase().replace(regex, '-'));
Related
When I am trying to upload app to ABAP-Repository using SE38 and /UI5/UI5_REPOSITORY_LOAD I get following error message:
SAPUI5 component ID SAPUI5.BRUTTOUMSATZ2 in SAPUI5 repository ZBRUTTOUMSATZ is potentially invalid.
Submitting the Project via eclipse brings up the same error message.
Does anyone know how to fix this issue or what might cause this ? I didn't find any documentation on this error message.
The application runs fine when hosted on a local Jetty-Server.
A component name should follow these rules, according to the long text of error message /ui5/app_api (019).
Consist only of alphanumerical characters
Contain only lowercase letters in the first except the last segment
May contain camel case in the last segment
Not begin with a number
Not contain special characters
Contain a dot as separator of the namespace
Not be longer than 40 letters for each segment (separated by a dot)
submitting to ABAP-Repository has way more strict naming conventions then mentioned in your answer. I think the application name cannot be longer then 16 signs ... otherwise you cannot submit.
I would like to map pages such domain/content/myProject/home.html to domain/home.html. /content/myProject/ is not needed. I have the following code:
String newpath = getResourceResolver().map(page.getPath());
this does not change anything. newpath is stay page.getPath()
how to solve this issue?
Answering as this question as it remains unanswered. Here is an example of how the etc mappings should look like:
Trick is you add 2 entries to sling:internalRedirect as / and /content/example/
AEM first tries to resolve resources with first entry '/'. So non page URLs like /etc/designs, /content/dam etc will be addressed by the first entry. If it is unable to resolve using the first one, it uses the second entry to resolve the page.
This is also the adobe recommended way for URL shortening compared to other techniques like apache redirect.
You need to create map in etc.Then Resource Resolver will take care of trimming the path .
CREATING MAPPING DEFINITIONS IN AEM
In a standard installation of AEM you can find the folder:
/etc/map/http
This is the structure used when defining mappings for the HTTP protocol. Other folders (sling:Folder) can be created under /etc/map for any other protocols that you want to map.
Configuring an Internal Redirect to /content
To create the mapping that prefixes any request to http://localhost:4503/ with /content:
Using CRXDE navigate to /etc/map/http.
Create a new node:
Type sling:Mapping
This node type is intended for such mappings, though its use is not mandatory.
Name localhost_any
Click Save All.
Add the following properties to this node:
Name sling:match
Type String
Value localhost.4503/
Name sling:internalRedirect
Type String
Value /content/
Click Save All.
This will handle a request such as:
localhost:4503/geometrixx/en/products.html
as if:
localhost:4503/content/geometrixx/en/products.html
had been requested.
You can refer here for further documentation http://docs.adobe.com/docs/en/cq/5-6-1/deploying/resource_mapping.html
I am attempting to deploy my SSRS solution. I have set the "TargetReportFolder" property of my project to "Reports"
When I right-click and select "Deploy", I get the following error:
The path of the item '/Reports' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash.
Obviously my path is less than 260 characters long. I've tried setting my TargetReportFolder property to "/Reports", to the name of my project, and to the name of my project with a slash at the beginning - all give the same error.
I don't understand this deployment process very well. Can someone help me understand?
(I also feel like this may not be on topic, but was encouraged by the presence of an SSRS tag)
My problem was that I didn't understand how Reporting Services works with SharePoint. My comment above is incorrect, I did need to deploy, but I had the wrong parameters for my properties. This page helped me:
http://msdn.microsoft.com/en-us/library/bb283155.aspx
The key takeaways from this article are:
All Target*Folder properties need to be either a URL to a document library, or empty
If they are empty, they take the value of TargetReportFolder, which can't be empty and must be a URL to a document library
TargetServerURL needs to be the URL of the site collection in SharePoint
I've created a fresh PHP-class, named it Application_Form_Login and saved it as Application_Form_Login.php inside the /website/lib directory. But everytime I'm running pimcore it refuses to load that file. What am I doing wrong here?
I've been looking at the Zend autoloader and trying to find out the issue.
I've noticed that in pimcore bootstrapping all the relevant directories are added to the include path. But they don't seem to get checked. Or maybe my file isn't named correctly to be picked up?
Your filename should be /website/lib/Application/Form/Login.php
From the page you just quoted:
Each "_" character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.
I have an app., coded with ejb3, jsf and maven, which runs on jboss 4.2.2GA
The problem I have been facing for 2 days is I cannot convert non-english characters that are added to url on runtime. For instance, there is a search textbox and a button. When a user enters a word including non-english characters, and pushes the button, it is added to the url with bad characters like %56 or &347 etc..
Is there any way to achieve what I am trying to do here? BTW, is there also any way to get over this problem on the jboss side configuration rather than application side (filters or context.xml etc..)?
Any help would be appreciated
Thanks a lot,
Baris
--
EDIT: I have solved this issue by using URLEncoder. When I passed the variable to the action method, I use URLEncoder in order to encode it to the right charset.
Example:
Take parameter from the URL:
String someString = ServletActionContext.getRequest().getParameter("someStringFromURL");
Encode the string;
String encoded = URLEncoder.encode(someString, "ISO-8859-9");
Find the appropriate connector element in your tomcat server.xml (deploy/jboss-web.deployer/server.xml for recent versions) and add the attribute URIEncoding with a value of UTF-8.
I have solved this issue by using URLEncoder. When I passed the variable to the action method, I use URLEncoder in order to encode it to the right charset.
Example: Take parameter from the URL:
String someString = ServletActionContext.getRequest().getParameter("someStringFromURL");
Encode the string;
String encoded = URLEncoder.encode(someString, "ISO-8859-9");