Uploaded image for project: 'Alfresco One Platform'
  1. Alfresco One Platform
  2. ACE-1710

Component extension mechanism does not always respect the @region action attribute

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: Web Scripts and Surf
    • Labels:
      None
    • Environment:
      Cloud
    • Regression Since:
      4.2

      Description

      See: http://blogs.alfresco.com/wp/developer/2011/08/12/customizing-alfresco-share-freemarker-templates/

      I am using the mechanism to override an .ftl, specifically to add .js "after" an existing js block e.g.
      <@region id="additional-js" target="js" action="after" scope="global" />

      This is for a Cloud override of a "js" region for search.get.html.ftl

      If you create an override of that component for the js block e.g.:

      <#-- Add cloud JS -->
      <@markup id="cloudSearchJs" target="js" action="after">
         <#-- JavaScript Dependencies -->
         <@script src="${url.context}/res/cloud/customizations/components/search/cloud-search.js" group="search" />
      </@>
      

      When you view-source on the resulting page, I found that the new cloud-search.js was actually inserted between the two js files that happened to be in the original block! This obviously breaks the client-side component method override as the base component is not present at init time. Anyway, also I found that using the "before" or "after" did not seem to work (both did an insert in the middle) but "replace" does work which I have used as a work-around for now.

      See the two search.get.html.ftl files in HEAD-BUG-FIX for concrete example)

        Attachments

          Activity

            People

            • Assignee:
              closedissues Closed Issues
              Reporter:
              kroast Kevin Roast [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: