• We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      The DefaultWebInterfaceContext does not normally have a context item for $action, however the web items defined in the profile-tabs.xml files rely on this item being defined.

      They arguably need be updated to use the more standard $helper.action since this IS part of the DefaultWebInterfaceContext and matches with the webui definitions in global-user-hover-sections.xml and global-user-sections.xml

      eg:

          <web-item key="follow" name="Follow Tab" section="system.profile" weight="30">
      		<label key="network.name" />
      		<link>/users/viewfollow.action?username=$action.username</link>
      	</web-item>
      

      would be better as:

          <web-item key="follow" name="Follow Tab" section="system.profile" weight="30">
      		<label key="network.name" />
      		<link>/users/viewfollow.action?username=$helper.action.username</link>
      	</web-item>
      

      Other links in the profile-tabs.xml also use this non-standard context, IMO they should also be updated.

            [CONFSERVER-17449] profile-tabs.xml using non-standard context items

            BillA added a comment -

            Thank you for raising this issue. While I can see how this feature would be useful, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request now. Thanks again for your idea.

            BillA added a comment - Thank you for raising this issue. While I can see how this feature would be useful, we have no plans to implement it in the foreseeable future. In order to set expectations, we're closing this request now. Thanks again for your idea.

            Alain,
            Thanks for the suggestion - would you be able to clarify what you are trying to achieve here? What value will this add for you guys?
            Sherif

            Sherif Mansour added a comment - Alain, Thanks for the suggestion - would you be able to clarify what you are trying to achieve here? What value will this add for you guys? Sherif

            Related to this issue is the FollowingTargetUserCondition

            public class FollowingTargetUserCondition extends BaseConfluenceCondition
            {
                private FollowManager followManager;
            
                protected boolean shouldDisplay(WebInterfaceContext context)
                {
                    return followManager.isUserFollowing(context.getUser(), context.getTargetUser());
                }
            
                public void setFollowManager(FollowManager followManager)
                {
                    this.followManager = followManager;
                }
            }
            

            which would be better implemented as

            public class FollowingTargetUserCondition extends BaseConfluenceCondition
            {
                private FollowManager followManager;
            
                protected boolean shouldDisplay(WebInterfaceContext context)
                {
                    return followManager.isUserFollowing(context.getUser(), context.getHelper().getAction().getUsername());
                }
            
                public void setFollowManager(FollowManager followManager)
                {
                    this.followManager = followManager;
                }
            }
            

            Alain Moran added a comment - Related to this issue is the FollowingTargetUserCondition public class FollowingTargetUserCondition extends BaseConfluenceCondition { private FollowManager followManager; protected boolean shouldDisplay(WebInterfaceContext context) { return followManager.isUserFollowing(context.getUser(), context.getTargetUser()); } public void setFollowManager(FollowManager followManager) { this .followManager = followManager; } } which would be better implemented as public class FollowingTargetUserCondition extends BaseConfluenceCondition { private FollowManager followManager; protected boolean shouldDisplay(WebInterfaceContext context) { return followManager.isUserFollowing(context.getUser(), context.getHelper().getAction().getUsername()); } public void setFollowManager(FollowManager followManager) { this .followManager = followManager; } }

            Also located a similar issue in content-metadata.xml

                <web-item key="content-metadata-attachments" name="Attachments" section="system.content.metadata" weight="20">
                    <tooltip key="content.metadata.attachments.tooltip">
            			<param name="param1">$!helper.page.getLatestVersionsOfAttachments().size()</param>
            		</tooltip>
                    <label key="content.metadata.attachments.label">
                        <param name="param1">page-metadata-attachments-text</param>
                        <param name="param2">page-metadata-attachments-count</param>
                        <param name="param3">$!helper.page.getLatestVersionsOfAttachments().size()</param>
                    </label>
            		<link linkId="content-metadata-attachments" accessKey="$action.getTextStrict('navlink.attachments.accesskey')">/pages/viewpageattachments.action?pageId=$helper.page.id&amp;metadataLink=true</link>
                    <condition class="com.atlassian.confluence.plugin.descriptor.web.conditions.HasAttachmentCondition"/>
                    <condition class="com.atlassian.confluence.plugin.descriptor.web.conditions.PagePermissionCondition">
                        <param name="permission">view</param>
                    </condition>
                    <styleClass>page-metadata-icon action-view-attachments</styleClass>
                </web-item>
            

            might be better as

                <web-item key="content-metadata-attachments" name="Attachments" section="system.content.metadata" weight="20">
                    <tooltip key="content.metadata.attachments.tooltip">
            			<param name="param1">$!helper.page.getLatestVersionsOfAttachments().size()</param>
            		</tooltip>
                    <label key="content.metadata.attachments.label">
                        <param name="param1">page-metadata-attachments-text</param>
                        <param name="param2">page-metadata-attachments-count</param>
                        <param name="param3">$!helper.page.getLatestVersionsOfAttachments().size()</param>
                    </label>
            		<link linkId="content-metadata-attachments" accessKey="$helper.action.getTextStrict('navlink.attachments.accesskey')">/pages/viewpageattachments.action?pageId=$helper.page.id&amp;metadataLink=true</link>
                    <condition class="com.atlassian.confluence.plugin.descriptor.web.conditions.HasAttachmentCondition"/>
                    <condition class="com.atlassian.confluence.plugin.descriptor.web.conditions.PagePermissionCondition">
                        <param name="permission">view</param>
                    </condition>
                    <styleClass>page-metadata-icon action-view-attachments</styleClass>
                </web-item>
            

            Alain Moran added a comment - Also located a similar issue in content-metadata.xml <web-item key= "content-metadata-attachments" name= "Attachments" section= "system.content.metadata" weight= "20" > <tooltip key= "content.metadata.attachments.tooltip" > <param name= "param1" >$!helper.page.getLatestVersionsOfAttachments().size()</param> </tooltip> <label key= "content.metadata.attachments.label" > <param name= "param1" >page-metadata-attachments-text</param> <param name= "param2" >page-metadata-attachments-count</param> <param name= "param3" >$!helper.page.getLatestVersionsOfAttachments().size()</param> </label> <link linkId= "content-metadata-attachments" accessKey= "$action.getTextStrict( 'navlink.attachments.accesskey' )" >/pages/viewpageattachments.action?pageId=$helper.page.id&amp;metadataLink= true </link> <condition class= "com.atlassian.confluence.plugin.descriptor.web.conditions.HasAttachmentCondition" /> <condition class= "com.atlassian.confluence.plugin.descriptor.web.conditions.PagePermissionCondition" > <param name= "permission" >view</param> </condition> <styleClass>page-metadata-icon action-view-attachments</styleClass> </web-item> might be better as <web-item key= "content-metadata-attachments" name= "Attachments" section= "system.content.metadata" weight= "20" > <tooltip key= "content.metadata.attachments.tooltip" > <param name= "param1" >$!helper.page.getLatestVersionsOfAttachments().size()</param> </tooltip> <label key= "content.metadata.attachments.label" > <param name= "param1" >page-metadata-attachments-text</param> <param name= "param2" >page-metadata-attachments-count</param> <param name= "param3" >$!helper.page.getLatestVersionsOfAttachments().size()</param> </label> <link linkId= "content-metadata-attachments" accessKey= "$helper.action.getTextStrict( 'navlink.attachments.accesskey' )" >/pages/viewpageattachments.action?pageId=$helper.page.id&amp;metadataLink= true </link> <condition class= "com.atlassian.confluence.plugin.descriptor.web.conditions.HasAttachmentCondition" /> <condition class= "com.atlassian.confluence.plugin.descriptor.web.conditions.PagePermissionCondition" > <param name= "permission" >view</param> </condition> <styleClass>page-metadata-icon action-view-attachments</styleClass> </web-item>

              Unassigned Unassigned
              9fcfb21963e3 Alain Moran
              Votes:
              9 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: