On 09/04/11 18:03, Stephan Gambke wrote:
> Hi,
>
> in an extension I register properties in an smwInitProperties hook
> handler like this:
>
> SMWPropertyValue::registerProperty( '___glt', '_str', false , true );
> SMWPropertyValue::registerProperty( '___gld', '_txt', false , true );
>
> I register aliases in an smwInitDatatypes hook handler like this:
>
> SMWPropertyValue::registerPropertyAlias( '___glt', wfMsg( '___glt' ) );
> SMWPropertyValue::registerPropertyAlias( '___gld', wfMsg( '___gld' ) );
>
> Works alright, I can store and query the data from a dedicated Special
> page or from a parser hook without problems. However, querying the data
> from the wiki using the aliases does not really work.
>
> Whenever I query the data from the wiki using the aliases the very first
> printout-column on a page shows the expected column-heading, but no
> values, all other columns do not show headings, but values. This applies
> to whole pages, i.e. might span several queries. You can see it here:
> http://wiki.foxtrott.de/test
>
> Did I miss something?

First, aliases are meant as additional labels, not as main labels. You 
should add a proper label to your call of registerProperty().

Second, you should make sure that the messages that you use are actually 
loaded properly in MediaWiki. It is conceivable that the call wfMsg( 
'___glt' ) does somehow not return the right value at all time points 
during execution. This can be checked brute force by adding print 
commands to the hook where you run the registration.

Markus

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to