Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-1442

After cancelling edition the workflow buttons and lock button are disabled

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • 4.2.0
    • 3.0 M5
    • UI
    • None

      How to reproduce :

      • Open a content
      • Edit the content
      • Cancel the edition

      Behaviour :

      • All workflow buttons are disabled. According to the tooltip, the content is yet in edition (see. screenshot).

          [CMS-1442] After cancelling edition the workflow buttons and lock button are disabled

          seems ok in v4

          Raphaël Franchet added a comment - seems ok in v4

          The following temporary patch was applied :

          Index: main/plugin-cms/resources/js/org/ametys/cms/editor/SaveAction.i18n.js
          ===================================================================
          --- main/plugin-cms/resources/js/org/ametys/cms/editor/SaveAction.i18n.js	(revision 2370)
          +++ main/plugin-cms/resources/js/org/ametys/cms/editor/SaveAction.i18n.js	(working copy)
          @@ -197,5 +197,12 @@
           	var contentId = targets[0].getParameters()['id'];
           		
           	org.ametys.cms.editor.Save._backToContent(contentId);
          +		
          +         // FIXME Bug CMS-1442
          +	   var contentTarget = org.ametys.messagebus.bus.MessageBuilder.getInstance().createTarget("content", {'id': contentId});
          +	   var messages = [];
          +	    messages.push(org.ametys.messagebus.bus.MessageBuilder.getInstance().createMessage(org.ametys.ribbon.RibbonManager.EVENTTYPE_METADATACHANGED, null, [contentTarget]));
          +	    messages.push(org.ametys.messagebus.bus.MessageBuilder.getInstance().createMessage(org.ametys.ribbon.RibbonManager.EVENTTYPE_WORKFLOWCHANGED, null, [contentTarget]));
          +		org.ametys.messagebus.MessageBus.getInstance().fireMessages(messages);
           	}
           }
          
          
          

          This patch is a hack, send workflow and lock change events to force buttons to refresh.
          Keep this bug opened until find a better way

          Laurence Aumeunier added a comment - The following temporary patch was applied : Index: main/plugin-cms/resources/js/org/ametys/cms/editor/SaveAction.i18n.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/editor/SaveAction.i18n.js (revision 2370) +++ main/plugin-cms/resources/js/org/ametys/cms/editor/SaveAction.i18n.js (working copy) @@ -197,5 +197,12 @@ var contentId = targets[0].getParameters()[ 'id' ]; org.ametys.cms.editor.Save._backToContent(contentId); + + // FIXME Bug CMS-1442 + var contentTarget = org.ametys.messagebus.bus.MessageBuilder.getInstance().createTarget( "content" , { 'id' : contentId}); + var messages = []; + messages.push(org.ametys.messagebus.bus.MessageBuilder.getInstance().createMessage(org.ametys.ribbon.RibbonManager.EVENTTYPE_METADATACHANGED, null , [contentTarget])); + messages.push(org.ametys.messagebus.bus.MessageBuilder.getInstance().createMessage(org.ametys.ribbon.RibbonManager.EVENTTYPE_WORKFLOWCHANGED, null , [contentTarget])); + org.ametys.messagebus.MessageBus.getInstance().fireMessages(messages); } } This patch is a hack, send workflow and lock change events to force buttons to refresh. Keep this bug opened until find a better way

            Unassigned Unassigned
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: