cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction silently rolled back

tomoconnell
Champ in-the-making
Champ in-the-making
I have written some javascript that traverses a folder and checks to see if any of the documents in that folder are locked using .isLocked.

This script does what it should apart from always giving an error "Failed to save content: Transaction silently rolled back because it has been marked as rollback-only"

4 REPLIES 4

yogeshpj
Star Contributor
Star Contributor
Generally this error comes when you have nested transaction and error comes in one transaction then in parent transaction it shows that  transaction has been already marked as rollback-only.Try to debug your code it must have some specific error.

mrogers
Star Contributor
Star Contributor
It also happens if you try to handle and ignore exceptions.  Please post your code.

tomoconnell
Champ in-the-making
Champ in-the-making
<javascript>
var dataLocation = companyhome.childByNamePath("Sites/cfm-administration/documentLibrary/Testing/Locked");
var children = dataLocation.children;
var node;


function traverse(nodes) {
   
   for each(node in nodes) {
      
      var lockStatus = node.isLocked;
      
      if (node.isContainer) {
         traverse(node.children);
      }
      else {
         if (lockStatus == 1) {
            createEntry(node);
         }      
      }
   }   
}

// function createEntry is out of scope.

traverse(children);
</javascript>

Was originally testing node.isLocked directly in the if statement, was just messing around to try and fix the error.