Details
-
Bug
-
Resolution: Not a bug
-
Medium
-
None
-
None
-
Windows, Standalone
Description
When using the confluence.pm module, i created a perl script that attempts to modify the title and content of a page at the same time. It fails with this message:
REMOTE ERROR: java.lang.Exception: com.atlassian.confluence.core.persistence.confluence.StaleObjectStateException: The version of the object to be saved was more than the previous version! at rename.pl line 30
My script is:
use Confluence; my $url = "http://localhost:8090/rpc/xmlrpc"; my $u = "admin"; my $p = "password"; my $space = "~admin"; my $wiki = new Confluence $url, $u, $p; my $oldPage = { space => $space, title => "ORIGINAL TITLE", content => "original content", }; my $page = $wiki->storePage($oldPage); print "Page created\n"; print $page->{version} . "," . $page->{id} . "," . $page->{title} . "\n"; my $newPage = { space => $space, title => "NEW IMPROVED TITLE", id => $page->{id}, version => $page->{version}, content => "new content", }; $wiki->storePage($newPage); print "Page updated\n";