Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug with Fix] Integrity violations - invalid property value found on "cm:name" during upload of folder with empty space #2106

Open
p4535992 opened this issue Aug 2, 2023 · 0 comments

Comments

@p4535992
Copy link

p4535992 commented Aug 2, 2023

In recent months I am frequently encountering the error I highlighted in this post:
https://hub.alfresco.com/t5/alfresco-content-services-forum/integrity-violations-invalid-property-value-found-on-quot-cm/m-p/315150

Thanks to menczingerm I found out what the problem is:

This is the constrait for cm:name property from the contentModel.xml

<constraints>
   <constraint name="cm:filename" type="REGEX">
      <parameter name="expression"><value><![CDATA[(.*[\"\*\\\>\<\?\/\:\|]+.*)|(.*[\.]?.*[\.]+$)|(.*[ ]+$)]]></value></parameter>
      <parameter name="requiresMatch"><value>false</value></parameter>
   </constraint>
   <constraint name="cm:userNameConstraint" type="org.alfresco.repo.dictionary.constraint.UserNameConstraint" />
   <constraint name="cm:authorityNameConstraint" type="org.alfresco.repo.dictionary.constraint.AuthorityNameConstraint" />
   <constraint name="cm:storeSelectorConstraint" type="REGISTERED">
      <parameter name="registeredName"><value>defaultStoreSelector</value></parameter>
   </constraint>
</constraints>

Tested via RestApi and CMIS browserbind calls and as expected Alfresco will trim the space from the end of the filename, when you try to upload a folder in Share UI then it do not trim the spaces at the end of the folder name so you will receive this error.

Constraint: 002013695 Value '2020 ACCERT. RES. MINORI X ACQUISIZ. CITT. ITA ' is not valid as a file name. This property must be a valid file name.

The space is the problem at the end of the filename, i am forced to preprocess the file/folder name values before the upload.

This issue is solved with this PR: #1988

@p4535992 p4535992 changed the title Bug fix: Integrity violations - invalid property value found on "cm:name" during upload of folder with empty space [Bug] Integrity violations - invalid property value found on "cm:name" during upload of folder with empty space Aug 2, 2023
@p4535992 p4535992 changed the title [Bug] Integrity violations - invalid property value found on "cm:name" during upload of folder with empty space [Bug with Fix] Integrity violations - invalid property value found on "cm:name" during upload of folder with empty space Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant