I have created metadata fields and mapped it with respective sites and i have uploaded a lot of files with these metadata field . And in the advanced search i was able to search with the metadata field.
But recently i have added amps files in amps and amps_share and applied amps . After that in advanced search i am not getting my previous metadata fields for search option.
Before applying amps i have taken the backup of TOMCAT folder . Is there any way to get back my previous advanced metadata search option.
I am using alfresco commumity version 5.2 on windows 10 system.
I think it is possible because i have the backup of tomcat folder. Please help in this regard.
Regards
Akash
Solved! Go to Solution.
There might be something in the amp you applied to share app. Please share the link to the amp if its possible.
From what i could understand, you used to see Content search option but it is not visible.
Extract the amp you applied to share app, and find the share-config-custom.xml. Look for '<config evaluator="string-compare" condition="AdvancedSearch" '
See if 'replace="true"'. Also check what all are all the forms that are configured and see if you can find whether form for content search is missing?
Following form should be configured in order to see content metadata search as option in Advance search:
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
There might be something in the amp you applied to share app. Please share the link to the amp if its possible.
From what i could understand, you used to see Content search option but it is not visible.
Extract the amp you applied to share app, and find the share-config-custom.xml. Look for '<config evaluator="string-compare" condition="AdvancedSearch" '
See if 'replace="true"'. Also check what all are all the forms that are configured and see if you can find whether form for content search is missing?
Following form should be configured in order to see content metadata search as option in Advance search:
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
I am attaching some lines of my share amps which you have told to check share-config-custom.xml.
<config evaluator="string-compare" condition="DocumentLibrary">
<indicators>
<indicator id="signed-doc" index="10" label="indicator.signed">
<evaluator>evaluator.doclib.indicator.digitalSigning.signedDoc</evaluator>
</indicator>
</indicators>
<multi-select>
<action type="action-link" id="onActionSign" label="menu.selected-items.sign" />
</multi-select>
<aspects>
<visible>
<aspect name="acme:securityClassified"/>
<!-- <aspect name="pdft:signed" />
--> <aspect name="pdft:encrypted" />
</visible>
<addable> <!-- defaults to visible config -->
</addable>
<removeable> <!-- defaults to visible config -->
</removeable>
</aspects>
<types>
<!-- Define the ACME base doc type as decedent from cm:content -->
<type name="cm:content">
<subtype name="acme:document"/>
</type>
</types>
</config>
<!-- <config evaluator="aspect" condition="pdft:signed">
<forms>
<form>
<field-visibility>
<show id="pdft:signaturedate" />
<show id="pdft:reason" />
<show id="pdft:location" />
<show id="pdft:signedby" />
</field-visibility>
<appearance>
<field id="pdft:signaturedate" label-id="prop.pdft_signaturedate" />
<field id="pdft:reason" label-id="prop.pdft_reason" />
<field id="pdft:location" label-id="prop.pdft_location" />
<field id="pdft:signedby" label-id="prop.pdft_signedby" />
</appearance>
</form>
</forms>
</config> -->
<!-- Configure forms for pdft:encrpyted aspect in Share -->
<config evaluator="aspect" condition="pdft:encrypted">
<forms>
<form>
<field-visibility>
<show id="pdft:encryptiondate" />
<show id="pdft:encryptedby" />
</field-visibility>
<appearance>
<field id="pdft:encryptiondate" label-id="prop.pdft_encryptiondate" />
<field id="pdft:encryptedby" label-id="prop.pdft_encryptedby" />
</appearance>
</form>
</forms>
</config>
<!--================================================================================================================
Advanced Search Forms for types
(search forms for aspects are not available)
=============================================================================================================-->
<config evaluator="string-compare" condition="AdvancedSearch" replace="true">
<advanced-search>
<forms>
<!-- Standard out-of-the-box types -->
<form labelId="pdftoolkit.aspect.signed.search.type"
descriptionId="pdftoolkit.aspect.signed.search.description" id="signedpdfsearch">cm:content</form>
<form labelId="pdftoolkit.aspect.encrypted.search.type"
descriptionId="pdftoolkit.aspect.encrypted.search.description" id="encryptedpdfsearch">cm:content</form>
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content
</form>
<form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
<!-- Custom type -->
<form labelId="form.label.advancedsearch.acmeDocument"
descriptionId="form.description.advancedsearch.acmeDocument">acme:document
</form>
</forms>
</advanced-search>
</config>
<!--================================================================================================================
View, Edit, Create, and Search forms for custom types
The following form configurations for the custom types
have not been created from scratch. We have instead copied
out-of-the-box form configurations for cm:content and cm:folder
from the tomcat/webapps/share/WEB-INF/classes/alfresco/share-form-config.xml file
in a standard Alfresco installation (with the version matching)
and used them as a starting point.
=============================================================================================================-->
<!-- __________________________________ acme:document base type _________________________________________________-->
<!-- View and Edit forms for acme:document -->
<config evaluator="node-type" condition="acme:document">
<forms>
<!-- Default form configuration for the cm:content type -->
<form>
<field-visibility>
<show id="cm:name"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<show id="mimetype"/>
<show id="cm:author" force="true"/>
<show id="size" for-mode="view"/>
<show id="cm:creator" for-mode="view"/>
<show id="cm:created" for-mode="view"/>
<show id="cm:modifier" for-mode="view"/>
<show id="cm:modified" for-mode="view"/>
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true"/>
<show id="cm:categories"/>
<!-- cm:dublincore aspect -->
<show id="cmublisher"/>
<show id="cm:contributor"/>
<show id="cm:type"/>
<show id="cm:identifier"/>
<show id="cm:dcsource"/>
<show id="cm:coverage"/>
<show id="cm:rights"/>
<show id="cm:subject"/>
<!-- cm:complianceable aspect -->
<show id="cm:removeAfter"/>
<!-- cm:effectivity aspect -->
<show id="cm:from"/>
<show id="cm:to"/>
<!-- cm:summarizable aspect -->
<show id="cm:summary"/>
<!-- cm:translatable aspect -->
<show id="cm:translations"/>
<!-- cm:localizable aspect -->
<show id="cm:locale"/>
<!-- cmwnable aspect -->
<show id="cmwner"/>
<!-- cm:attachable aspect -->
<show id="cm:attachments"/>
<!-- cm:emailed aspect -->
<show id="cmriginator"/>
<show id="cm:addressee"/>
<show id="cm:addressees"/>
<show id="cm:sentdate"/>
<show id="cm:subjectline"/>
<!-- exif:exif aspect -->
<show id="exif:dateTimeOriginal"/>
<show id="exifixelXDimension"/>
<show id="exifixelYDimension"/>
<show id="exif:exposureTime"/>
<show id="exif:fNumber"/>
<show id="exif:flash"/>
<show id="exif:focalLength"/>
<show id="exif:isoSpeedRatings"/>
<show id="exif:manufacturer"/>
<show id="exif:model"/>
<show id="exif:software"/>
<show id="exifrientation"/>
<show id="exif:xResolution"/>
<show id="exif:yResolution"/>
<show id="exif:resolutionUnit"/>
<!-- audio:audio aspect -->
<show id="audio:album"/>
<show id="audio:artist"/>
<show id="audio:composer"/>
<show id="audio:engineer"/>
<show id="audio:genre"/>
<show id="audio:trackNumber"/>
<show id="audio:releaseDate"/>
<show id="audio:sampleRate"/>
<show id="audio:sampleType"/>
<show id="audio:channelType"/>
<show id="audio:compressor"/>
<!-- cm:indexControl aspect -->
<show id="cm:isIndexed"/>
<show id="cm:isContentIndexed"/>
<!-- cm:geographic aspect -->
<show id="cm:latitude"/>
<show id="cm:longitude"/>
<!-- surf:widget aspect -->
<show id="surf:widgetType"/>
<show id="surf:mid"/>
<show id="surf:label"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<set id="cm:content2cols" template="/org/alfresco/components/form/2-column-set.ftl"/>
<field set="cm:content2cols" id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl"/>
</field>
<field set="cm:content2cols" id="size">
<control template="/org/alfresco/components/form/controls/size.ftl"/>
</field>
<field set="cm:content2cols" id="cm:creator"/>
<field set="cm:content2cols" id="cm:created"/>
<field set="cm:content2cols" id="cm:modifier"/>
<field set="cm:content2cols" id="cm:modified"/>
<field id="cm:taggable">
<control>
<control-param name="compactMode">true</control-param>
<control-param name="params">aspect=cm:taggable</control-param>
<control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
<control-param name="createNewItemIcon">tag</control-param>
</control>
</field>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
<field id="cmriginator" read-only="true"/>
<field id="cm:addressee" read-only="true"/>
<field id="cm:addressees" read-only="true"/>
<field id="cm:sentdate" read-only="true"/>
<field id="cm:subjectline" read-only="true"/>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
<!-- Document Library pop-up Edit Metadata form -->
<form id="doclib-simple-metadata">
<field-visibility>
<show id="cm:name"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<!-- tags and categories -->
<show id="cm:taggable" for-mode="edit" force="true"/>
<show id="cm:categories"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl"/>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="cm:description">
<control>
<control-param name="activateLinks">true</control-param>
</control>
</field>
<field id="cm:taggable">
<control>
<control-param name="compactMode">true</control-param>
<control-param name="params">aspect=cm:taggable</control-param>
<control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
<control-param name="createNewItemIcon">tag</control-param>
</control>
</field>
<field id="cm:categories">
<control>
<control-param name="compactMode">true</control-param>
</control>
</field>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
<!-- Document Library Inline Edit form -->
<form id="doclib-inline-edit">
<field-visibility>
<show id="cm:name"/>
<show id="cm:content" force="true"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="cm:content" label-id="">
<control>
<control-param name="editorAppearance">explorer</control-param>
<control-param name="forceEditor">true</control-param>
</control>
</field>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
</forms>
</config>
<!-- Create and search forms for acme:document -->
<config evaluator="model-type" condition="acme:document">
<forms>
<form>
<field-visibility>
<show id="cm:name"/>
<show id="cm:content" force="true"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<show id="mimetype"/>
<show id="app:editInline" force="true"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<appearance>
<field id="cm:name">
<control>
<control-param name="maxLength">255</control-param>
</control>
</field>
<field id="cm:title">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="cm:content" label-id="">
<control>
<control-param name="editorAppearance">explorer</control-param>
</control>
</field>
<field id="mimetype">
<control template="/org/alfresco/components/form/controls/hidden.ftl">
<control-param name="contextProperty">mimeType</control-param>
</control>
</field>
<field id="app:editInline">
<control template="/org/alfresco/components/form/controls/hidden.ftl">
<control-param name="contextProperty">editInline</control-param>
</control>
</field>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
<!-- Search form -->
<form id="search">
<field-visibility>
<show id="cm:name"/>
<show id="cm:title" force="true"/>
<show id="cm:description" force="true"/>
<show id="mimetype"/>
<show id="cm:modified"/>
<show id="cm:modifier"/>
<!-- ACME custom props -->
<show id="acme:documentId" force="true"/>
<show id="acme:securityClassification"/>
</field-visibility>
<appearance>
<field id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl"/>
</field>
<field id="cm:modifier">
<control>
<control-param name="forceEditable">true</control-param>
</control>
</field>
<field id="cm:modified">
<control template="/org/alfresco/components/form/controls/daterange.ftl"/>
</field>
<!-- ACME Props appearance -->
<set id="acmeDocSet" appearance="bordered-panel" label-id="form.set.label.acme.document"/>
<field id="acme:documentId" label-id="form.field.label.acme.documentId" set="acmeDocSet">
<control template="/org/alfresco/components/form/controls/textfield.ftl"/>
</field>
<field id="acme:securityClassification" label-id="form.field.label.acme.securityClassification"
set="acmeDocSet"/>
</appearance>
</form>
</forms>
</config>
<!-- Advanced search form for items with pdft:signed aspect -->
<config evaluator="model-type" condition="cm:content">
<forms>
<!-- search for signed PDF documents -->
<form id="signedpdfsearch">
<field-visibility>
<show id="cm:name" force="true" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="cm:modified" force="true" />
<show id="cm:modifier" force="true" />
<show id="pdft:signaturedate" force="true" />
<show id="pdft:reason" force="true" />
<show id="pdft:location" force="true" />
<show id="pdft:signer" force="true" />
</field-visibility>
<appearance>
<field id="cm:modifier">
<control>
<control-param name="forceEditable">true</control-param>
</control>
</field>
<field id="cm:modified">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<field id="pdft:signaturedate" label-id="prop.pdft_signaturedate">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<field id="pdft:reason" label-id="prop.pdft_reason">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="pdft:location" label-id="prop.pdft_location">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="pdft:signer" label-id="prop.pdft_signer">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
</appearance>
</form>
For more details i am attaching two image file that will show how advanced search was looking before applying the new amps files and after applying the amps files.
Please have a look i think now you can definetely help me in this regard.
Hi @akash251998
Great that you got it resolved - thanks for updating your post.
Cheers,
As you can see this from has replace=true which is replacing any existing forms configured by you.
<config evaluator="string-compare" condition="AdvancedSearch" replace="true"> <advanced-search> <forms> <!-- Standard out-of-the-box types --> <form labelId="pdftoolkit.aspect.signed.search.type" descriptionId="pdftoolkit.aspect.signed.search.description" id="signedpdfsearch">cm:content</form> <form labelId="pdftoolkit.aspect.encrypted.search.type" descriptionId="pdftoolkit.aspect.encrypted.search.description" id="encryptedpdfsearch">cm:content</form> <form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content </form> <form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form> <!-- Custom type --> <form labelId="form.label.advancedsearch.acmeDocument" descriptionId="form.description.advancedsearch.acmeDocument">acme:document </form> </forms> </advanced-search> </config>
Modify the share-config-custom.xml in your custom module and set replace=true in custom module and additionally add the two forms that you actually need from share amp. or update the share-config-custom.xml in the amp to remove "replace=true" and remove all other form configs except the forms that are required for the addon.
<form labelId="pdftoolkit.aspect.signed.search.type" descriptionId="pdftoolkit.aspect.signed.search.description" id="signedpdfsearch">cm:content</form> <form labelId="pdftoolkit.aspect.encrypted.search.type" descriptionId="pdftoolkit.aspect.encrypted.search.description" id="encryptedpdfsearch">cm:content</form>
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.