Fixing Old Data Forms

Fixing Old Data Forms

By tsangktsangk on 06 Jan 2013 09:19, last edit by Helmut_pdorfHelmut_pdorf on 06 Jan 2013 15:27

Around 2 months ago, Wikidot changed the way it processed and parsed data forms. A bug report was posted by RobElliottRobElliott, 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:

convert.wikidot.com

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 KanjoJames Kanjo write an impressive piece of code that lists all pages with [[form]] blocks! Check it out here.

Facebook


Tags: bug convert data-forms fixing wikidot yaml

Related Community Blog Posts

The following posts have similar tags and may be related to this post.

Rate it up ?

rating: +4+x

Discuss

Add a New Comment

Share

Bookmark and Share

Community Blog feed-icon-14x14.png

Posts by date

Posts by tags

addthis admin admin_forum alexa animoto app appplication attributes autocomplete automatic autonumber autosave backwards badge banner birthday blog bloo bookmark browser bug bugs button calendar candidate category cell ceo changes chinese chrome cleanup code comment community convert count country csi css database data-forms delete deletion domain embed etension excel explorer favicon featured feature-request features file file-manager firefox fixing form forum free freemind front fun gallery gemeinschaft gerdami german glossary good google handbook header heading help helpon home homepage howto how-to html iframe images include infobox inline internet istorijska_biblioteka italian javascript job join joke link list listpages live localize mail manual mass-delete mass-edit mediawiki members membership membershipapply membershipbypassword michal microsoft mindmanager mindmap mindmeister module multi-file multilingual nested newpage news newspaper nextpage official open pagecalendar pagecalender pagepath pages %%page_unix_name%% permissions playground portuguese press previouspage private pro programming reshuffle rob row russian sandbox scheme scripting search search_engine services simplecal skins snippet social spam spanish squark styles successful syntax system table tag tags template templates themes thumbnail thumbnails toolbar town translate turkish tutorial tweet updated_at upload uri url user users variables video vote weneed who.is wiki wikidot wikipedia wish wishlist yaml

Posts by rating

Fixing Old Data Forms
Rating: þ{rating}þ (06 Jan 2013 09:19)

Fixing Old Data Forms
Rating: þ{rating}þ (06 Jan 2013 09:19)

Fixing Old Data Forms
Rating: þ{rating}þ (06 Jan 2013 09:19)


Blogroll

{"module":"feed\/FeedModule","params":{"src":"http:\/\/michalf.me\/feed\/pages\/category\/blog\/t\/Michal+Frackowiak%27s+blog","limit":"1","module_body":"**[http:\/\/michalf.me Michal]:** \n%%linked_title%%\n[[size smaller]]%%date|%e %b %Y at %H:%M |agohover%%[[\/size]]"}}
{"module":"feed\/FeedModule","params":{"src":"http:\/\/quake.wikidot.com\/feed\/pages\/category\/dev\/t\/Piotr+Gabryjeluk+blog","limit":"1","module_body":"**[http:\/\/piotr.gabryjeluk.pl\/ Gabrys]:**\n%%linked_title%%\n[[size smaller]]%%date|%e %b %Y at %H:%M |agohover%%[[\/size]]"}}
{"module":"feed\/FeedModule","params":{"src":"http:\/\/squark.wikidot.com\/feed\/pages\/category\/blog\/t\/Squark%27s+Latest+Posts","limit":"1","module_body":"**[http:\/\/squark.wikidot.com\/ Squark]:**\n%%linked_title%%\n[[size smaller]]%%date|%e %b %Y at %H:%M |agohover%%[[\/size]]"}}

Admin dashboard

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.