tsangk 06 Jan 2013 09:19
Around 2 months ago, Wikidot changed the way it processed and parsed data forms. A bug report was posted by RobElliott, and there has been no official blog post made about it yet. But in short, old [[form]] that weren't 100% YAML compliant will not save now due to a change in the library that Wikidot uses to parse form blocks. The next couple of paragraphs explains the change, however, you can skip to the "fix" by clicking here.
Explanation
As most of the people who use data forms know, Wikidot employs the YAML within the [[form]] syntax.
Previously, a forgiving parser (namely SPYC) was used to parse and extract these values. Forgiving means that tiny mistakes in the markup are still interpreted "correctly". However, due to the amount of errors that this code has supposedly created on the servers1, Wikidot has now forced YAML validation using the sfYAML library whenever [[form]] blocks are saved. That means all form blocks need to be 100% valid when on save (this, however, excludes the API's pages.save_one).
Fixing it
I have devised a simple converter script that converts the now forgiving YAML format to the new stricter sfYAML parser. You can find it at:
All you have to do is copy and paste the *entire* _template file with the [[form]] blocks included and the converter will spew out a fixed version of the YAML code.
Also, if you need help finding all your data form templates in your site, James Kanjo write an impressive piece of code that lists all pages with [[form]] blocks! Check it out here.
Hi Kenneth,
I want to say thanks again to you for implementing this convert site.
And to "bump" this blog / message on the forum :)
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
No worries, Helmut. I have also released the code to GitHub for people who want to look at the code or use it.
Kenneth Tsang (@jxeeno)
For "Data Form Fixer": read also our emergency help page:
http://community.wikidot.com/help:emergency-help
and the last headings: http://community.wikidot.com/help:emergency-help#toc9 ( Data Form Fixer Using)..
We have till today:
http://community.wikidot.com/howto:_start (our Howto's)
http://handbook.wikidot.com/ (our Handbook)
http://community.wikidot.com/help:start (our Getting Help)
http://community.wikidot.com/wiki-explained (Wikidot Explained)
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Thank you for the code. I appreciate.
Thank you for the code