Hi Evzen,
thanks a lot for your help, the most useful link I read to solve this issue! :)

To solve this problem I did this things:

1. Stop Magnolia (Author instance is under windows)

        .\magnolia_control.bat stop

2. Install Groovy Interactive Rescue Console, changing the web.xml

Comment the following:

[code]
        <!-- Magnolia Configuration —>
        <!--
        <filter>
                <display-name>Magnolia global filters</display-name>
                <filter-name>magnoliaFilterChain</filter-name>
                
<filter-class>info.magnolia.cms.filters.MgnlMainFilter</filter-class>
        </filter>
        <filter-mapping>
                <filter-name>magnoliaFilterChain</filter-name>
                <url-pattern>/*</url-pattern>
                <dispatcher>REQUEST</dispatcher>
                <dispatcher>FORWARD</dispatcher>
                <dispatcher>INCLUDE</dispatcher>
                <dispatcher>ERROR</dispatcher>
        </filter-mapping>
        —>
[/code]

Add the following:

[code]
        <!-- Magnolia Groovy Rescue Interactive Console -->
        <servlet>
                <servlet-name>Vaadin</servlet-name>
                <servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
                <init-param>
                   <description>Groovy Rescue App</description>
                   <param-name>UI</param-name>
                   
<param-value>info.magnolia.module.groovy.rescue.MgnlGroovyRescueApp</param-value>
                </init-param>
        </servlet>
        <servlet-mapping>
                <servlet-name>Vaadin</servlet-name>
                <url-pattern>/*</url-pattern>
        </servlet-mapping>
        <!-- Groovy Console END -->
[/code]

3. Startup Magnolia:

        .\magnolia_control.bat start

4. Access Console accessing this URL:

        
http://localhost:8080/magnoliaAuthor/.magnolia/pages/groovyInteractiveConsole.html

5. Run Groovy Script You need (In my case):

[code]
        import info.magnolia.context.*;
        import info.magnolia.*;
        import info.magnolia.tools.*;
        import info.magnolia.cms.util.*;

        hm = MgnlContext.getSystemContext().getHierarchyManager("config"); // 
Change to appropriate workspace
        node = 
hm.getContentByUUID("00d88123-4180-48d4-a4a9-e8ae829d8f1a").getJCRNode(); // 
Change to get the appropriate node
        parent = node.getParent()

        node.remove()
        parent.save()

        println 'Parent node'
        DumperUtil.dump(parent)
[/code]

6. Restart Magnolia:

        .\magnolia_control.bat stop
        .\magnolia_control.bat start

7. Let's go :)

This are the useful links I read to complete the task:

Useful Scripts
https://wiki.magnolia-cms.com/display/WIKI/Groovy+Shell+Scripts
https://wiki.magnolia-cms.com/display/WIKI/Useful+shell+scripts


How to delete JCR Node using Groovy
https://documentation.magnolia-cms.com/plugins/viewsource/viewpagesrc.action?pageId=57192270

How to install Interactive Groovy Console.
Please note the Nicolas Barbé comments on how to install the on Magnolia 5
https://wiki.magnolia-cms.com/display/WIKI/Groovy+Rescue+Servlet

Thanks all, Davide.

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=163ab48b-346a-49a5-82c2-6775bd3ef19c


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to