title: Groovy script for "AEM ACS Commons Generic List editor breaks when more than 8 items are added"
body: <pre><code>renameRewriterFoldersInApps();
  protected void renameRewriterFoldersInApps(){
    Session session = resourceResolver.adaptTo(Session.class);
    Workspace workspace = session.getWorkspace();
    workspace.copy(originalNamePath1, renamedpath1)
    workspace.copy(originalNamePath2, renamedpath2)
    Node node1 = session.getNode(originalNamePath1)
    Node node2 = session.getNode(originalNamePath2)
    node1.remove()
    node2.remove()
    session.save()
    revertNamesOfRewriterFoldersInApps()
  }
  
  protected void revertNamesOfRewriterFoldersInApps(){
   Session session = resourceResolver.adaptTo(Session.class);
   Workspace workspace = session.getWorkspace()
   workspace.copy(renamedpath1, originalNamePath1)
   workspace.copy(renamedpath2, originalNamePath2)
   Node node1 = session.getNode(renamedpath1)
   Node node2 = session.getNode(renamedpath2)
   node1.remove()
   node2.remove()
   session.save()
  }
  </code></pre>
  <p>This is the script that I have written to fix the issue but it does not work fine. The proposed solution <a href="https://stackoverflow.com/questions/68460284/aem-acs-commons-generic-list-editor-breaks-when-more-than-8-items-are-added">AEM ACS Commons Generic List editor breaks when more than 8 items are added</a>
  does work if i do it manually on crx/de
  Any idea what is wrong with my script?</p>