Configuring the Wikidot API Settings

Printer Friendly Version Attach Files

wdavatar?user=leiger
leiger
31 Aug 2010 02:48. Edited 6 times. (Edit, Permalink)

This was posted by Brunhilda on the page Configuring the Wikidot API Settings.

Brunhilda wrote:
I don't understand. I inserted the unixname of my site: istorijska-biblioteka — but when I tried to import a page from it, the STE said this site does not exist…? Here's the screenshot.

new-1.jpg

Another question: is it obligatory to insert the unixname? If yes, does this mean that I can use mu API key and STE only with one Wikidot site?

Included page "inc:signature" does not exist (create it now)

wdavatar?user=ed-johnson
Ed Johnson

31 Aug 2010 03:05. Edited 0 times. (Edit, Permalink)
I'm not sure what the issue might be. I just ran a test by importing the start page from 2 of my sites and it worked fine. Thinking the hyphen in your site name might be the issue, I tried in on a site of mine that has a hyphen in the name (2, actually) and it works.

Are you sure you didn't make a typo? Is it possibly a character set issue with your language? Without more to go on, I'm stumped. I wish I could be more helpful…

Included page "inc:signature" does not exist (create it now)

wdavatar?user=ed-johnson
Ed Johnson

31 Aug 2010 03:14. Edited 0 times. (Edit, Permalink)

Another question: is it obligatory to insert the unixname? If yes, does this mean that I can use mu API key and STE only with one Wikidot site?

Your key will work with any site you are the MA of. I'm not sure about sites you are a member of. I stumbled upon the fact that you don't actually have to enter your user name in the first field under "Authentication" when configuring your API key. You can leave that field blank and just enter your API key in the second field.

The only place you have to enter the unix name of your site is when you are importing or exporting a page. STE needs to know which site and page you want to import/export so yes, the site name is obligatory.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=ed-johnson
Ed Johnson

31 Aug 2010 03:20. Edited 0 times. (Edit, Permalink)
There must be a typo or something causing this. I am a member of your site and I was able to import your start page into STE using my API key. I exported the page (without editing anything) here: http://www.istorijskabiblioteka.com/sandbox:start-ed

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

31 Aug 2010 03:22. Edited 0 times. (Edit, Permalink)
Hey Brunhilda,

The site you are entering into those settings is for the preview feature only.

If you want to import or export a page, that is different — in that case, it asks you for the site unix name every time. There are some cases where it remembers what the site name was (if you import a page, then try to export it to Wikidot.com again, for example) …

ste-api-settings.JPG

The "Authentication" section is for everything API-related in STE. You need to enter your username in lowercase, and your API key here.

The "Document preview" part is for the preview feature only, and is not used for importing/exporting. If you have 'Use my Wikidot account' unticked, then it uses the default settings and STEBot to access the API. If you have the 'Use my Wikidot account' box ticked, then it uses your account… and because you are not a member of preview.wikidot.com, Wikidot tells STE that the site doesn't exist for you to edit. I think that's what is happening.

So… just say you wanted to test pages using your site's theme, you would have to set up a separate category for STE previews. Let's say you make a new category called "ste" for this.

What you would enter then would be this (in this order):

  • Your username in lowercase … 'brunhilda'
  • Your API key
  • Your site name 'istorijska-biblioteka'
  • The category for previews 'ste'
  • I'd suggest you not change the preview CSS theme URL due to how incompatible it is with CSS2+

Included page "inc:signature" does not exist (create it now)

wdavatar?user=brunhilda
Brunhilda

31 Aug 2010 19:29. Edited 0 times. (Edit, Permalink)
I am sorry for not answering earlier, but I have just come back from the trip to Belgrade.

Your key will work with any site you are the MA of.

Hm, I don't think so. Shane did a really great job with bots at Istorijska biblioteka and he is not a MA of it…

What you would enter then would be this (in this order):

I wrote all this, exactly as you had written, just instead of ste category I put the category of a page I wanted to import. And I still had the same message. The site does not exist.

and because you are not a member of preview.wikidot.com, Wikidot tells STE that the site doesn't exist for you to edit. I think that's what is happening.

What's this? Maybe i should join this site…?

Included page "inc:signature" does not exist (create it now)

wdavatar?user=brunhilda
Brunhilda

06 Sep 2010 11:33. Edited 1 times. (Edit, Permalink)
Excuse me, but, I've just seen that I have a page at mu sandbox category that Ed created on 31 August, probably using STE.

Could you explain me what was going on? Ed, what did you do to manage to dowload and upload a page from STE?

I still cannot do anything.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=ed-johnson
Ed Johnson

06 Sep 2010 14:26. Edited 0 times. (Edit, Permalink)

Ed, what did you do to manage to download and upload a page from STE?

As I explained in a post above, I was able to import the start page from your site using my key (since I am a member) and then exported it to the sandbox category.

It should work for you too, if you have your settings configured properly. If it will help, I could make up a short tutorial on what I did with some screen shots.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=brunhilda
Brunhilda

06 Sep 2010 15:08. Edited 0 times. (Edit, Permalink)

If it will help, I could make up a short tutorial on what I did with some screen shots.

Oh, please do, Ed, I'd appreciate it very much. I followed the instructions Shane had written, but somehow I fail to get it right…

Included page "inc:signature" does not exist (create it now)

wdavatar?user=ed-johnson
Ed Johnson

06 Sep 2010 15:12. Edited 0 times. (Edit, Permalink)
OK, I'll try to get it done later today. I'm stuck working at the office today while everyone else is celebrating a holiday. :(

Included page "inc:signature" does not exist (create it now)

wdavatar?user=ed-johnson
Ed Johnson

06 Sep 2010 16:39. Edited 1 times. (Edit, Permalink)
OK, here's the steps I took. Note that this assumes your API key is configured correctly in the STE Settings.

1. Click the import toolbar icon.
api-import1.jpg2. Fill in the site name and page and click "Import page".
api-import2.jpg3. If successful, the page loads into the editor.
api-import3.jpg4. After making any changes, click the export toolbar icon.
api-export1.jpg5. Fill in the site and page name. Note that you can change the page name like I did (sandbox:start-ed).
api-export2.jpg6. Clicking "Get page meta data" will pull in any information from an existing page. If the page doesn't exist, just fill in the meta data fields with what you want and click "Export page".
api-export3.jpg7. Since the page exists in this example, you get prompted to overwrite the existing page.
api-export4.jpg8. Export was successful.
api-export5.jpg9. Page displays in your default browser if you selected that option above.
api-export6.jpg

Included page "inc:signature" does not exist (create it now)

wdavatar?user=brunhilda
Brunhilda

06 Sep 2010 17:14. Edited 0 times. (Edit, Permalink)
It works, Ed!!!!

Thank you very much. I suggest to create an instructions page where you can copy all this. It is so easy to understand…

Thanks, again!
B.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=ed-johnson
Ed Johnson

06 Sep 2010 21:47. Edited 0 times. (Edit, Permalink)
Done. Check out these 2 new pages that I added to the documentation:

Import (Open from Web)

Export (Save to Web)

Included page "inc:signature" does not exist (create it now)

wdavatar?user=brunhilda
Brunhilda

06 Sep 2010 22:06. Edited 3 times. (Edit, Permalink)
Excellent, Ed. It will be a great help for other users.

I have another problem. Look at my page in the STE Preview:

screenshot.jpg

Is it possible to get a normal preview? As it is? This wouldn't do at all…

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

07 Sep 2010 02:57. Edited 0 times. (Edit, Permalink)
Sorry Brunhilda, but due to the limitation of Java's web browser, it doesn't seem able to understand CSS2 or CSS3… so I've made the in-built preview really, really simple. I've also removed the sidebar, top bar and other sections of the page, to make it simpler.

At the moment, the only way to get a proper preview is to open it in the browser.

In that screenshot you posted, you'll notice that right next to "Close preview" is an "Open in browser" button.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

07 Sep 2010 03:01. Edited 0 times. (Edit, Permalink)
Thanks a lot Ed for adding those pages to the documentation! :)

Included page "inc:signature" does not exist (create it now)

wdavatar?user=brunhilda
Brunhilda

07 Sep 2010 07:53. Edited 0 times. (Edit, Permalink)
OK, no problem.

A strange thing happened last night. It seems that I uploaded twice the same page without noticing it. Their unix names were art2:32 and art2:33. art2 is my public category, so it was visible all night. I am sure I did not export anything…

Included page "inc:signature" does not exist (create it now)

Post Reply

Add reply on "Configuring the Wikidot API Settings"

Printer Friendly Version Attach Files

CSS Theme, Images and Code on this website are © Shane Smith 2010-2012. All forum posts by users and documentation licensed under Creative Commons BY-NC-SA 3.0 License.