Hello folks,
I tried to remap links with the Conveyor Plugin but I can't get it to work and I have no idea why. I know this is not an atlassian plugin but maybe someone else had these problems and can help me.
So I'm using version 1.0.1 and I'm following exactly the way it is in the instructions and in the FAQ.
I made a new plugin and I was adding this lines to my pom:
<properties> ... <confluence.conveyor.version>1.0.1</confluence.conveyor.version> </properties>
<dependency> <groupId>org.randombits.confluence</groupId> <artifactId>confluence-conveyor</artifactId> <version>${confluence.conveyor.version}</version> <scope>provided</scope> <!-- There are no actual code dependencies on Conveyor, it just needs to be listed for the OBR. --> <optional>true</optional> </dependency>
<pluginDependencies> <pluginDependency> <groupId>org.randombits.confluence</groupId> <artifactId>confluence-conveyor</artifactId> </pluginDependency> </pluginDependencies>
<Import-Package> org.randombits.confluence.conveyor;version="[${confluence.conveyor.version},2)". </Import-Package>
Afterwards I added these lines to my atlassian-plugin:
<conveyor name="My Action Overrides" key="myActionOverrides"> <resource type="xml" name="peopledir" location="/conveyor-config.xml" /> </conveyor>
And created a conveyor-config.xml in the same folder where the atlassian-plugin.xml is located. I took this as an example from the FAQ (Hijacking the People Directory: Blocking Access) (and removed the conditions)
But now the People directory is not blocked and the config of Conveyer also states: "There are currently no overriden actions available."
Is there any point where I went wrong or did I missed something at any point?
Thanks for your time :)
Community moderators have prevented the ability to post new answers.
So... I fixed this problem and I want to show everyone how I did it :)
First of, make a new plugin and install conveyor on your Confluence-installation.
Start editing the pom.xml and add this:
<properties> ... <confluence.conveyor.version>1.0.1</confluence.conveyor.version> </properties>
and add the dependency like this:
<dependencies> <dependency> <groupId>org.randombits.confluence</groupId> <artifactId>confluence-conveyor</artifactId> <version>${confluence.conveyor.version}</version> <scope>provided</scope> <!-- There are no actual code dependencies on Conveyor, it just needs to be listed for the OBR. --> <optional>true</optional> </dependency> </dependencies>
and into the build
<build> <plugins> <plugin> ... </plugin> <plugin> ... <!-- Specify what to bundle in the OBR --> <pluginDependencies> <pluginDependency> <groupId>org.randombits.confluence</groupId> <artifactId>confluence-conveyor</artifactId> </pluginDependency> </pluginDependencies> <instructions> <!-- List any external packages required by your plugin here. --> <Import-Package> </Import-Package> <Export-Package/> <CONF_COMM/> </instructions> </configuration> </plugin> </plugins> </build>
Now go to the atlassian-plugin.xml and add something like this
<conveyor name="My Action Overrides" key="myActionOverrides" state="enabled"> <resource type="xml" name="conveyor-config" location="/conveyor-config.xml" /> <resource type="xml" name="conveyor-config2" location="/conveyor-config2.xml" /> </conveyor>
create a new xml file and start overwriting your actions (it should look something like this)
<?xml version="1.0"?> <conveyor-config> <package-override name="users" namespace="/users"> <action-override name="viewuserprofile" inherit="true"> <result-override name="success" type="redirect">http://www.anotherhomepage.de/${user.name}</result-override> </action-override> </package-override> </conveyor-config>
If there are still some questions left just ask :)
Hey Patrick,
its very good, that the conveyor-config is showing you the possible redirect - at the time I got there, It wasnt very long until I got it.
The thing is, the peopledirectory(-action) you specefied is not executed as far as I know, so try to use dopeopledirectorysearch or browsepeople and this should do the trick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Leroy
Im glad your having some success Im working at it, I have even created a new plugin from scratch to make sure I didn't have any potential conflicts with anything but still can't get it to work although I have had some success.
In the Conveyor Report it shows that I have the overridden the "/peopledirectory.action" WHICH IS GOOD at least that's something!! However when I go to test that action it doesn't redirect to the dashboard as I have stipulated in my plugin see below
<conveyor-config>
<package-override name="default">
<action-override name="peopledirectory" class="com.atlassian.confluence.core.ConfluenceActionSupport">
<result name="success" type="redirect">/dashboard.action</result>
</action-override>
</package-override>
</conveyor-config>
I did try even duplicating yours and something seemed to work but it brought up an error instead of redirecting it as stipulated
<conveyor-config>
<package-override name="users" namespace="/users">
<action-override name="viewuserprofile" inherit="true">
<result-override name="success" type="redirect">http://www.google.com</result-override>
</action-override>
</package-override>
</conveyor-config>
Appreciate your help
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Leroy
When you go to the Convey Report does it show an override key?, mine doesn't I think that's the problem. Not sure how the overrde key is set or what it means
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes it does show an override key - It shows my package like: your.plugin.path or your.company.pluginname (groupId.artifactId)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello - I developed on 4.1.6 Version and tested it on a 4.3 Beta version. I remapped the users-package and it worked fine on both versions - I tried some others too - I think I tried the default package on the 4.1.6 version but I don't know if this would have worked on 4.2+
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Leroy.
I've done some testing on Confluence 4.1.7 and Confluence 4.2+. It appears that anything overriden from package 'default' does not work in 4.2+ - as in the original actions were performed instead. Have tested on other packages like users, pages, seemed to be working alright.
What Confluence version were you working on?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And I made a little mistake there - write this into your conveyor-config.xml - not abstractuserprofile stuff - that was for testing and makes the whole thing not working
<action-override name="browsepeople" class="com.atlassian.confluence.core.ConfluenceActionSupport">
<result name="success" type="redirect">/dashboard.action</result>
</action-override>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
do you have:
<dependency>
<groupId>org.randombits.confluence</groupId>
<artifactId>confluence-conveyor</artifactId>
<version>${confluence.conveyor.version}</version>
<scope>provided</scope>
<!-- There are no actual code dependencies on Conveyor, it just needs to be listed for the OBR. -->
<optional>true</optional>
</dependency>
in your pom?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help but unfortunetly I can't get it to work, I think I have basically duplicated everything that you have done
See attached for a text file with my various files, any thoughts would appreciated and vice versa if I find anything more will let you know
See attached for text file with
- pom
- conveyor-config.xml
- atlassian-plugin.xml
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For some reason I don't think the text file was attached he's a shortened version
See below
- pom
- conveyor-config.xml
- atlassian-plugin.xml
======================================================================
pom file
======================================================================
<!-- conveyor plugin starts here-->
<pluginDependencies>
<pluginDependency>
<groupId>org.randombits.confluence</groupId>
<artifactId>confluence-conveyor</artifactId>
</pluginDependency>
</pluginDependencies>
<instructions>
<Import-Package>
</Import-Package>
<!--
<Export-Package/>
<CONF_COMM/>
-->
</instructions>
<!-- conveyor plugin ends here-->
..
</project>
======================================================================
conveyor-config.xml
======================================================================
<?xml version="1.0"?>
<conveyor-config>
<package-override name="default">
<action-override name="abstractuserprofile" class="com.atlassian.confluence.core.ConfluenceActionSupport">
<result name="success" type="redirect">/dashboard.action</result>
</action-override>
</package-override>
</conveyor-config>
======================================================================
atlassian-plugin.xml
======================================================================
** this is all I have done here
<conveyor name="My Action Overrides" key="myActionOverrides" state="enabled">
<resource type="xml" name="conveyor-config" location="/conveyor-config.xml" />
</conveyor>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Leroy
Having a similar issue and have tried many variations. See below for what I have so far and maybe we can piece it together.
I have installed the Conveyor plugin and and from what I gather once you have installed this you only need to create the
Unfortuantely I still can't get it to work, maybe its not compatible with versions 4.XX and ablove mine is 4.1.9
My conveyor-config.xml
<?xml version="1.0"?>
<conveyor-config>
<package-override name="default">
<action-override name="peopledirectory" class="com.atlassian.confluence.core.ConfluenceActionSupport">
<result name="success" type="redirect">/dashboard.action</result>
</action-override>
<action-override name="dopeopledirectorysearch" class="com.atlassian.confluence.core.ConfluenceActionSupport">
<result name="success" type="redirect">/dashboard.action</result>
</action-override>
<action-override name="browsepeople" class="com.atlassian.confluence.core.ConfluenceActionSupport">
<result name="success" type="redirect">/dashboard.action</result>
</action-override>
</package-override>
</conveyor-config>
My atlassian-plugin.xml
<conveyor key="myConveyorConfig" name="My Conveyor Configuration" resource="conveyor-config.xml"/>
As I said this hasn't worked and am not sure what I am doing wrong, hopefully this might help you in some way to figure it out. I am keen to solve this
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Patrick,
I just got it to work but I'm not sure what caused the problem - I'll write what I did:
I changed this in the atlassian-plugin:
<conveyor name="My Action Overrides" key="myActionOverrides" state="enabled"> <resource type="xml" name="conveyor-config" location="/conveyor-config.xml" /> </conveyor>
and removed the import-package in the pom.xml so it looks empty like this:
<Import-Package> </Import-Package>
And now my config looks something like this (plus the missing tags)
<action-override name="abstractuserprofile" class="com.atlassian.confluence.core.ConfluenceActionSupport"> <result name="success" type="redirect">/dashboard.action</result> </action-override>
But if I add something which seems to wrong, it just not works, e.g. if I add a line like this to the config:
<action-override name="viewuser" class="com.atlassian.confluence.core.ConfluenceActionSupport"> <result name="success" type="redirect">/dashboard.action</result> </action-override>
none of the other action-override work.
Tell me if this solved your problem too.
Edit: I dont know why here are such big blank spaces
btw: did you add the dependencies in the pom.xml?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.