Reinitialize Sandbox Application

Version 24.1 by Pascal Bastien on 2014/08/01 18:48

cogReinitializes the SandBox space by using a SandBox space template
TypeXAR
Category
Developed by

Pascal Bastien

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

Provides an application to reinitialize periodically the SandBox space by overwriting it with clean pages located in another space.

This application provides the following:

  • A page to launch manually (and/or by scheduler) the SandBox reinitialisation, in SandboxTemplate.ReinitSandboxMacro
  • A template space of Sandbox (i.e. list of clean Sandbox pages):
    • SandboxTemplate.WebHome (all languages are present)
    • SandboxTemplate.TestPage1
    • SandboxTemplate.TestPage2
    • SandboxTemplate.TestPage3
  • Configured to forbid access to the SandboxTemplate space for XWikiAllGroup (SandboxTemplate.WebPreferences)
  • A Scheduler job to launch automatically the reinitialisation, in Scheduler/Reinit Sandbox from SandboxTemplate

If you click on "Reinitialisation of Sandbox space (without confirmation)" in SandboxTemplate.ReinitSandboxMacro, the macro will

  • erase ALL Sandbox space pages
  • overwrite Sandbox by this space SandboxTemplate
  • and unhide Sandbox space

Of course, it is recommended to backup your Sandbox space before and test with this link: "Mode Debug: 'Reinitialisation of Sandbox space' (without modification)"

With 1.1 version, it is possible to reinitialize periodically another space (rather than Sandbox) by overwriting it with in another space (rather than SandboxTemplate): to use with caution.

ReinitSandbox_main.png

Know bugs:

  • English translation to be improved... :-)
  • copy from SanboxTemplate.WebHome copies only one language (because of copyDocument function limitation) (fixed by 1.0 version)

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

By default the macro is not scheduled. You must schedule it and choose periodicity in ... scheduler.

Release Notes

v1.1

Version 1.1: Add source (name of template space) and target (name of space to overwrite) parameter + copy all documents languages of Sandbox
Version 1.0 (fixing multilingual problem and missing attachments and use xwiki 2.1 syntax)
Version 0.9 (Initial version)

    

Get Connected