Rescue App

The MgnlGroovyRescueApp is a special Vaadin app that can be used to bypass the Magnolia filter chain. This is useful when you need to perform rescue operations on a corrupted Magnolia instance or when the Magnolia UI is not loading.

All operations performed in the Groovy Rescue App are executed in system context, meaning no security restrictions are enforced. This might expose your data to risk of irreversible damages if you are not aware of what you are doing. In other words, use it at your own risk.

There are three steps to using the Rescue App:

Register the Groovy Rescue App

  1. Edit your values.yml file and edit the instance required like in the following lines:

    magnoliaAuthor:
      rescueModeDX: true (1)
    1 Ensure this is set to true.
  2. Redeploy your WAR file.

  3. Open a Web browser and access the Groovy Rescue App at http://host/<contextPath>.

Make the required changes

Use Groovy commands to navigate to the data you want to change.

Example 1: Deleting an erroneous configuration node untitled from /config/modules/someModule/virtualURIMapping.

  1. Assign Session of config repository to session.

    session = ctx.getJCRSession('config')
  2. Assign the parent node content to root.

    root = session.getNode('/modules/someModule/virtualURIMapping/')
  3. Get and remove the child node untitled.

    root.getNode('untitled').remove()
  4. Save the session.

    session.save()
    Always remember to save the session after modifying a node.

Example 2: Disabling the I18nContentSupportFilter filter.

mgnl> session = ctx.getJCRSession('config')
====> session-admin-213
mgnl> root = session.getNode('/server/filters/i18n') (1)
====> node /server/filters/i18n
mgnl> root.getProperty('enabled').getString() (2)
====> true
mgnl> root.setProperty('enabled', 'false') (3)
====> property /server/filters/i18n/enabled
mgnl> root.getProperty('enabled').getString() (4)
====> false
mgnl> session.save() (5)
1 Assign the content of the /server/filters/i18n node to root.
2 Check the current setting of the enabled property.
3 Set the property to false.
4 Verify that the configuration has been changed.
5 Save the session.

Example 3: Reset superuser password.

session = MgnlContext.getJCRSession('users')
superuser = session.getNode('/system/superuser')
superuser.setProperty('enabled', 'true')
superuser.pswd = info.magnolia.cms.security.SecurityUtil.getBCrypt('superuser')
session.save()

Deregister the Groovy Rescue App

  1. Edit your values.yml file and edit the instance required like in the following lines:

    magnoliaAuthor:
      rescueModeDX: false (1)
    1 Set it back to false.
  2. Redeploy your war file.

Feedback

PaaS

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Cloud PaaS docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules