Getting MindTouch Deki Wiki working on Windows Server

This site is intended to read more like a series of instructions than a blog, so I would recommend using the Table of Contents on the right to navigate.

Friday, April 14, 2017

Editing the Home Page

After I had done everything else on this blog I found that if I changed the home page and clicked Save, I would get this error:
Something seems to have broken! Please try saving again - we've already filled in the editor with the contents of your last edit.

Trying to save again would give you this error:
The page you are attempting to create already exists - change the title of your new page to something else.

If I clicked Details on the error message at the top of the screen I would get information that included these lines:
[message] => Column 'page_display_name' cannot be null
[source] => MySql.Data

This would only happen on the home page, not on any of the other ones.  At first I thought it was something related to my import, but after comparing the database entries for my home page and one from a clean install, I didn't see anything amiss.  In fact, editing the home page on a clean install gave me the same message!  Clearly it's a bug in Deki, and Deki is pretty much abandonware at this point so it's not going to get fixed any time soon.  It also seems like it probably comes from the C# API which wouldn't be as trivial for people to fix as the PHP since you'd need to recompile it.  So instead I tried simply removing the constraints from the database table.  This isn't ideal since it seems like there could be side effects of doing that, but I haven't run into any so far.

The Fix

  • Start MySQL Workbench and connect to the database.
  • Under Schemas, expand wikidb and Tables.
  • Right click on pages and choose Alter Table.
    • Under Column Name, select page_display_name.
    • Uncheck Not Null.
    • Click Apply and go through the dialogs that pop up.
  • Back under Schemas > wikidb > Tables, right click on old and choose Alter Table.
    • Under Column Name, select old_display_name.
    • Uncheck Not Null.
    • Click Apply and go through the dialogs that pop up.
That's it.  Try to save again and it should work.  If you get the message about the page already existing, try saving a second time and it should work from that point forward.

No comments:

Post a Comment