Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Conveyor: How to override actions that are different on different Confluence versions?

Manuel Kummerländer December 23, 2014

Hi,

we use Conveyor to override some user actions and it works just fine like this:

<conveyor-config>
	<package-override name="users" namespace="/users">
		<action-override name="editmyprofilepicture" 
			class="our.package.EditMyProfilePictureAction">
			<result name="success" type="velocity">/vm/user/editmyprofilepicture.vm.html</result> 
			<result name="error" type="velocity">/vm/user/editmyprofilepicture-not-allowed.vm.html</result> 
		</action-override>
...

Now, with Confluence 5.7 the path changed from "/users" to "/users/profile" and the configuration breaks, so Conveyor doesn't work. Is there a way to configure both paths in order to be downward compatible? As I see it is not just possible to define a second package-override since Conveyor doesn't work at all if there are missing actions ... sad

Thanks in advance for any help!

Kind regards
Manuel 

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Manuel Kummerländer April 29, 2015

Since our config.xml is not a solid solution anymore we added a servlet filter to modify the URLs. I am not really satisfied with that but it works for now ...

0 votes
Manuel Kummerländer January 15, 2015

We tried a bit around and finally this works:

<conveyor-config>
    <package-override name="users" namespace="/users">
		<action-override name="editmyprofilepicture"
            class="our.package.EditMyProfilePictureAction">
            <result name="success" type="velocity">/vm/user/editmyprofilepicture.vm.html</result>
            <result name="error" type="velocity">/vm/user/editmyprofilepicture-not-allowed.vm.html</result>
        </action-override>
		<action name="editmyprofilepicture"
            class="our.package.EditMyProfilePictureAction">
            <result name="success" type="velocity">/vm/user/editmyprofilepicture.vm.html</result>
            <result name="error" type="velocity">/vm/user/editmyprofilepicture-not-allowed.vm.html</result>
        </action>
...

Now we can use both paths: /users/editmyprofilepicture.action and /users/profile/editmyprofilepicture.action. I don't really understand why, but ... well. wink

0 votes
David Simpson • AppFusions • v3 January 14, 2015

Try duplicating your package-override and adding this too:

<package-override name="user-profiles" namespace="/users/profiles">
  ...
Manuel Kummerländer January 15, 2015

Thank you, @David Simpson • AppFusions • v3, but unfortunately this doesn't work. We have to have the action "editmyprofilepicture" in both package-overrides (for c5.6 and c5.7) and since one of this actions can always not be found (depending on the version we compile for) conveyour just stops working. I will post a solution that works for us as answer.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events