Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
9.10-rc-1
-
Trivial
-
N/A
-
N/A
-
Pull Request accepted
-
-
Code
Description
Issue
Steps to reproduce:
- Open any XWiki page, (e.g. "Sandbox.WebHome") with the browser's dev tools (Inspect) opened on the Network tab
- Observe the request to load the comments docextras tab using a "POST" method on "http://localhost:8080/xwiki/bin/get/Sandbox/WebHome?xpage=xpart&vm=commentsinline.vm"
Expected behavior:
- Requests to get information (i.e. not alter the state) should be done using the HTTP "GET" method, even/specially if they are performed on the "/get/" URL XWikiAction.
Technical Requirements
- Knowledge of JavaScript and asynchronous (AJAX) calls
- Knowledge of HTML
- Basic understanding of Apache Velocity and the way XWiki filesystem skins are structured
Expected Outcome
- Loading each tab in the docextras bottom section of a page (when clicking on a tab or when loading the page initially) must generate a "GET" HTTP request, which should be easily observed in the Network tab of the browser's development tools.
Links
- http://extensions.xwiki.org/xwiki/bin/view/Extension/Skin%20Application
- https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Skins
- http://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/Skins/
- http://extensions.xwiki.org/xwiki/bin/view/Extension/Skin%20Extension%20Plugin
- http://extensions.xwiki.org/xwiki/bin/view/Extension/Flamingo%20Skin
Hints
- The docextra tabs are handled by the skin in the "docextra.vm" template file and most of the common XWiki javascript code is located in the "xwiki.js" resource file.
- Take extra care when working with javascript resource files when it comes to minification. The the javascript resource files included in the downloaded copy of XWiki are already minified and need to be replaced with the originals from the sources on GitHub, corresponding to your XWiki version. After that, you need to disable minification when viewing a page for your changes to be applied or you might be executing the wrong (old/not modified) code.