URL Shortener Application (Pro)
Category | Application |
Rating | |
License | GNU Lesser General Public License 2.1 |
Minimal XWiki version supported | 14.10 |
Sources | Issues |
Usage
With this application you can create short URLs for your wiki pages. These URLs will be persistent through page move/rename.
The app provides intuitive functionalities for both beginners and advanced users. You can:
- go to the page for which you want to create a shortened URL
- open the More actions menu
- click on Get shortened URL
- observe the small notification displayed on the bottom of the page, which should notify if the URL was copied to clipboard or if any error occurred
- use the URL as needed
While on a page, instead of using the More actions menu, the Alt+u shortcut can be used directly for the copying the shortened URL action. The shortcut keys can be updated by overriding the urlshortener.menu.action.shortcut translation key with the chosen keys.
How is a page uniquely identified by a URL?
The first time someone copies the shortened URL of a page, an ID is associated to that page and stored on a URLShortener.Code.URLShortenerClass object to be used whenever is requested again. The ID is created by generating an UUID truncated to length 5 (to have indeed a short URL) and testing it to not be used already on the instance. The generated and stored ID is then of course used in the created URL.
As a result, when the server is running on localhost, on port 8080, the generated URL will be http://localhost:8080/xwiki/short/{pageID} ) if this was done on the main wiki, and http://localhost:8080/xwiki/short/{wikiName}/{pageID} when on a subwiki.
How can the ID of a page be changed?
As stated on this documentation, a page with an associated shortened URL has a URLShortener.Code.URLShortenerClass object added. If the shortened URL is created, but then the object is removed from the page, for any reason, the URL will stop working. There are 2 ways of fixing it:
- if you want the old URL to work again, edit the page in object mode, add a URLShortener.Code.URLShortenerClass object, put the old ID in the pageID property, then save the page
- if you want another ID for this page, just click on the Get shortened URL button again and it will automatically be created
Why are old copied URLs different from the new ones?
Starting with application version 1.2, the generated URL structure has changed from http://localhost:8080/xwiki/rest/p/{pageID} to http://localhost:8080/xwiki/short/{wikiName}/{pageID} . For this, any URL copied after upgrading to this version will be of the new form.
Note that the old URL will still be working, in order to be backwards compatible with the already copied and used URLs.
This was done because the old structure was using Solr for finding the wiki page associated to a shortened URL, and this meant that sometimes you needed to wait for the indexing process in order to have a URL to redirect to the correct page.
An example for this use case would be that someone copied an URL while using extension version 1.1 and used it in a document. Now, when copying the URL from the menu of the same page, the structure of the URL has changed. In this case, both URLs will point to the same page and will continue to work. So there is no need to change already created and used links.
Installation Steps
This paid extensions requires 14.10 or above. In order to install the extension, follow the next steps inside your XWiki instance (on cloud or on premise).
Navigate to the Extension Manager
In the Applications Panel click on "More Applications..." and then "Install new applications...". Alternatively navigate directly to the Administration and select the "Extensions" section.
Install the Extension
Search for the extension you wish to install and use the Install button to install it.
Get a License
Navigate to the "Licenses" section of the Administration, fill your details, look for the extension you just installed in the live table and click the buttons to get a trial license or to buy a license.
Install the License
If you have selected a trial license then you're good and there's nothing else to do. Your trial license is automatically installed.
However if you've selected to buy a license you'll be redirected to a page to perform the payment. At the end you need to come back to the "Licenses" administration section and click on the "Check for Updates" button. This will download and apply the license you bought.
Use the Extension
Start using the Extension! Refer to the extension's documentation to know how to use it.
Installing Paid Apps on Subwikis
If you want to install an application on the whole farm (main wiki + subwikis), you can do so directly from the main wiki’s Extension Manager, as seen below:
Extensions can also be installed only on a particular subwiki by global admins. Subwiki admins will not be able to install these extensions due to their limited rights.
Options
The price is per year and varies depending on the support level and the number of users.
Support / Users | 10 | 25 | 50 | 100 | 250 | 500 | 1000 | 2500 | 5000 | 10000 | 20000 |
---|---|---|---|---|---|---|---|---|---|---|---|
Silver |
Benefits
What do you get when you purchase an XWiki extension?
1 year license
By purchasing an XWiki extension license, you'll benefit from it during one year.
Free updates
You benefit from all the extension updates during one year. You are always up to date.
Support included
If you are facing an issue, you can reach the XWiki support. Our team is always available to help.
How to Buy
To buy, install this extension from inside your XWiki instance and follow the instructions.
Release notes
v1.2.3
Bug fixes:
- #23 Shortened URL is lost when the page is moved
v1.2.2
Bug fixes:
- #21 Duplicate pageID for pages created from a template with shortened URL
v1.2.1
Bug fixes:
- #16 Short URL redirects to the wrong page after page copy
v1.2
Improvements:
- #9 When creating a shortened url, we should allow notifications for this event to be deactivated
Bug fixes:
- #12 Make the generated URLs shorter
v1.1.1
v1.1
Improvements:
v1.0
#1 Create first version of the app
Extension details
License
- GNU Lesser General Public License 2.1
Sources
Issues
Type
- xar
Developed by
Compatibility
- Requires 14.10 or above.
Dependencies
- com.xwiki.urlshortener:application-urlshortener-default 1.2.4
- com.xwiki.licensing:application-licensing-licensor-api 1.25
- org.webjars:requirejs 2.3.6
- org.webjars:jquery 3.6.0
- org.xwiki.platform:xwiki-platform-uiextension-ui 14.10