Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Power Scripts for Confluence returns "cannot load SIL content from file"

Nancy Bonanno
Contributor
June 18, 2020

Does anyone use Power Scripts for Confluence?  It looks like the answer to a prayer but I installed it and copied a test script but when I add the SIL "macro" and run it, it just says  "cannot load SIL content from file".  Maybe I haven't configured something correctly but I don't know what.

 

2 answers

0 votes
Nancy Bonanno
Contributor
June 19, 2020

I GOT IT TO WORK!  First, I'm an idiot and my program were in the folders "silprograms/examples" but the program is configured to look in just "silprograms."

Second, I finally found this youtube video which demonstrated the script I needed, and it's a bit different than the example that comes with the tool.  Using the video, I was able to twiddle the program and add labels to my child pages.

https://www.youtube.com/watch?v=nM0a8JM2T2E&list=PLKTAla3ZrW8mMmYvgOVf3UPXU8V4nc-xj&index=4

 

Thank you everyone.

0 votes
Ivan Lima
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2020

Hey @Nancy Bonanno, did you take a look at Scripted macros? I would follow the steps for ScriptMacro so that you can get the hang of it.

If you are getting something like the screenshot below, your subfolder or files' name may be incorrect. Other than that, I don't see any other reason.

Screen Shot 2020-06-18 at 11.22.55 AM.png

If you want to run the script once, you can run it from SIL Manager. However, if you associate the script to a ScriptMacro, for example, every time you visit the page it will trigger the script.

Cheers,
IL.

Nancy Bonanno
Contributor
June 18, 2020

Yes!  I'm getting the same error as your attachment.  In what way would my subfolder or file names be wrong?  I just installed and left defaults.  Home directory is "silprograms"... I do have the name of script correct.  Any ideas?

Nancy Bonanno
Contributor
June 18, 2020

I don't really need it to be something that stays on the page. Just a program that runs once and adds a label to a bunch of pages.  I've tried running it from the SIL Manager and it says "success" but nothing happens.   I assume I'm not replacing the variables correctly.  If I could just see some working examples, I could probably figure it out!

Ivan Lima
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2020

If you can provide us with some screenshots, from your SIL manager, macro, etc., it will help the community to assess it. 

Normally, when you land to one of those pages I mentioned before, you will see a chat (bottom right) that you can ask them to help you as well.

Nancy Bonanno
Contributor
June 19, 2020

I appreciate your time and interest!  Here is what I just sent to their support:

 

You know, I really just think I need a kickstart on how to use your tool.
I need to add a label to a bunch of child pages just once.  In the test scenario, I'm using my personal space (nb7149), the parent page ("Home page") and the children ("Child Page 1", "Child Page 2", "Child Page 3")
I installed Power Scripts and left all the default configurations.

config.png
I took your example AddLabelsToChildren and made TestAddLabels.  I'm not sure which variables need to be replaced and with what, though.   Here is what I have at the moment.

testprogram.png


Right now, if I run this from the Manager, it returns the word Done but doesn't add any labels.If I add it to a macro on the Home page, it says "Cannot load SIL content from manager."

Questions:   Can I just run this script right here instead of adding it to a macro?  Or do I need to add it to the macro on the Home Page?

If I run it from the Manager, how would it know which Space to add the labels to?

What do I put in the first line for "pages = "...the name of the home page?  The space and the home page?

Do I need to replace PKey with something and if so, what?

 

Thanks for any and all help.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events