• SOLVED: Saving script did not work - Error?

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #47427  by OpaHeinz
 
Hello together

I started to use scripting.
After opening of Administration - scripting, there is still one line code:
Code: Select all
print("Hola, mundo!");
I copied another code snipped in the scripting interface:
Code: Select all
import com.openkm.bean.*;
import com.openkm.util.*;
import com.openkm.api.*;

ContentInfo ci = OKMFolder.getInstance().getContentInfo(null, "/okm:root");
print("Folders: " + ci.getFolders() + "<br/>");
print("Documents: " + ci.getDocuments() + "<br/>");
print("Size: " + FormatUtil.formatSize(ci.getSize()) + "<br/>");
just for testing purposes.
Evaluation works fine

But when I try to click the buttons [save] or [load] then
the entered code get lost and
Code: Select all
print("Hola, mundo!");
is still visible again.
Version 6.3.4

What did I wrong? :(

thank you in advance
rgds Heinz
Last edited by OpaHeinz on Fri Feb 08, 2019 9:43 am, edited 1 time in total.
 #47428  by OpaHeinz
 
No it is not an error.

I figured out, that I have to enter first a serverpath and a filename into the input field on the left button.
Then saving still works
( I still expected a dialog after click on save button)
 #47444  by jllort
 
Consider the save button as an experimental feature. When you click on save there's no message and if the file already exists it will be overwritten. A good option from my point of view should be keep scripting stored into OpenKM repository ( some specific folder ) and be able to update, or reuse from there.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.