3.41 - Exporting a new page gives error

Status: Implemented

Created by RobElliott 18 Jun 2011 12:12

rating: +2+x

**STE **


wdavatar?user=leiger
leiger

18 Jun 2011 12:27. Edited 1 times. (Edit, Permalink)
I think this is a new (different) bug. It occurs when the page does not exist yet - but the parent field has no impact on this whatsoever.

I'll look into it as soon as I can.

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

wdavatar?user=leiger
leiger

25 Jun 2011 04:07. Edited 0 times. (Edit, Permalink)
Oh, wow. For such a critical bug… I think I just realised why this is happening, and it's extremely simple!

A change that Wikidot made has broken the code I use to check whether the page exists or not (I try to retrieve the page, and check if the error message is the one displayed when the page doesn't exist… but Wikidot changed that error message text).

The best long-term solution is to allow you to define "create only", "edit only", or "create/edit page" when you export. This will make exports faster and preventing this bug from ever re-occurring.

For now I'll add a temporary fix: changing the text that I look for to match the new error message.

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

wdavatar?user=leiger
leiger

25 Jun 2011 04:09. Edited 2 times. (Edit, Permalink)
This was a comment I wrote over a year ago. It's warning that this code could break at some point, so whilst I did catch the error and display it as an error message… I should've included more details, explaining exactly where the problem was (it wasn't export at fault per-se, but some code that export uses).

// Note that this method could stop working due to future changes to the API, so have a backup plan by catching any exceptions that are thrown.

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

Post Reply

Add reply on "3.41 - Exporting a new page gives error"

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.