Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-19961

<web-extension> messages resource does not override SDK3 (jar) deployed custom model messages


    • Type: Service Pack Request
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 5.2.4
    • Fix Version/s: 5.2.N
    • Labels:
    • Environment:
      ACS 5.2.N, Tomcat, Any DB
    • Bug Priority:
      Category 3
    • ACT Numbers:

      00967790, 00981096



      Using SDK 3.0.1 (jar build default configuration), AIO, ACS 5.2.N, the resulting repo jar (contains custom model) and share jar (contains the share form labels for custom model) are deployed in the respective wars (alfresco,share).

      Post model deployment, using the <web-extension> (tomcat/shared/classes/alfresco/web-extension) location to override the messages for the custom model does not work. The message labels from within the share jar are not overridden by the labels in the web-extensions external path.

      Replication Steps

      • create SDK3 AIO project, configuration with Enterprise (5.2.N)
        ref: https://docs.alfresco.com/5.2/concepts/sdk-getting-started.html
      • build project
        note: this contains a sample custom (Acme) model with the messages for both repo/share and share-config-context.xml for share forms
      • deploy the repo and share jar's generated in the project target to a normal installed ACS 5.2.N instance in the WEB-INF/lib directory for each respective war

      see example attached jars: contentmodel-platform-jar-1.0-SNAPSHOT.jar and contentmodel-share-jar-1.0-SNAPSHOT.jar.withMessages

      • startup the application server
      • log in to Share UI
      • create/upload a document, go to document details page
      • us action menu and change document type to 'Acme Document'
      • scroll down to properties panel in right section of document details page, note the labels used for the custom model properties
      • shut down application server
      • copy messages directory to tomcat/shared/classes/alfresco/web-extension/messages, and modify the properties file labels for the custom model to something different
        See attached zip: messages.zip
      • modify the tomcat/shared/classes/alfresco/web-extension/custom-slingshot-application-context.xml and add bean to load the messages resource override


      <!-- Add module specific messages and labels -->
         <bean id="my.override.contentmodel-share-jar.resources"
            <property name="resourceBundles">
      • start application server, log in to share, navigate to same document's detail page
      • review the custom model properties labels
      • shut down application server
      • remove the bean loading the custom model messages in the share maven jar project
      • rebuild, swap out the share jar in the share.war/WEB-INF/lib
        see attached jar: contentmodel-share-jar-1.0-SNAPSHOT.jar
      • start application server up
      • log in to share, navigate to the document details page
      • scroll to the custom model properties and note the labels rendered

      Expected Behavior

      • using the <web-extension> external path DOES overrides Share UI custom model labels deployed via jar/amp to share

      Actual Behavior

      • using the <web-extension> external path DOES NOT override Share UI custom model labels deployed via jar/amp to share


      To be able to set the messages using the <web-extension> external path, you disable(remove or comment out) the resource context bean loading the custom model messages properties from the SDK3 share jar (basically removing it completely from jar).

      Additional Information

      • default common and slingshot message labels successfully override, though they are located and deployed different path in share war


      share.war/WEB-INF/classes/alfresco/messages/slingshot*.properties  OR common*.properties

      old AMP deployment for models would of been ex.


      current is

      share.war/WEB-INF/classes/lib/<custom share>.jar/alfresco/web-extension/messages/*.properties
      share.war/WEB-INF/classes/lib/<custom share>.jar/alfresco/web-extension/*-context.xml
      • amp configuration setting in SDK3, makes no difference as the content it still packaged into a jar within the amp lib directory
        ex. share.amp/lib/<custom share>.jar






              • Assignee:
                jsoria Jennie Soria [X] (Inactive)
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created:

                  Structure Helper Panel