Topic on User talk:Tpt/RFC

Another storage proposal

2
Beau (talkcontribs)

I like the general idea, as we should avoid any duplication of metadata. I would like to point out that MediaWiki has already page_props table, which can be used to store properties associated with the page. Those properties are already available through API (action=query&titles=Index:Title&prop=pageprops). I have prepared today a proof of concept patch - it is available at http://tools.wikimedia.pl/~beau/tmp/proofread-metadata-props.diff. It is only a demonstration - it is very hacky and has many rough edges.

It uses ParserBeforeStrip hook (which is not the best solution, but I did not managed to find anything more useful) to parse the page content (using MediaWiki preprocessor) and inject page properties. Each property is named 'property-Arg', where 'Arg' is name of MediaWiki:Proofreadpage_index_template template argument. Current version does not handle wiki-syntax well as tags are visible as parser markers right now, but this can be fixed.

The metadata can be accessed using {{#indexinfo:index-name|property-name}}. Currently this magic word cannot be used in index namespace to avoid loops. The page containing this magic word is added to templatelinks table, so if 'index-name' is modified all pages using metadata will be rebuilt.

I have moved examples to User:Tpt/RFC#Using page props table.

Tpt (talkcontribs)

It's a very interesting solution. Thanks a lot ! Could you create a source repository somewhere in order to work both on it ? Can you also edit this draft page in order to describe your system ?

Reply to "Another storage proposal"