Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-14851

Docextra tabs are loaded asynchronously using a HTTP POST action instead of GET

    Details

    • Difficulty:
      Trivial
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:
    • GCI categories:
      Code

      Description

      Issue

      Steps to reproduce:

      1. Open any XWiki page, (e.g. "Sandbox.WebHome") with the browser's dev tools (Inspect) opened on the Network tab
      2. 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

      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.

        Attachments

          Activity

            People

            • Assignee:
              andreic Camelia Andrei
              Reporter:
              enygma Eduard Moraru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: