Sorry for the double post, Markus, forgot the list.

Hi Markus,

thanks for your answer.

Am 12.04.2011 21:17, schrieb Markus Krötzsch:
> > First, aliases are meant as additional labels, not as main labels. You
> > should add a proper label to your call of registerProperty().
Ok, done. I now have

SMWPropertyValue::registerProperty( '___glt', '_str', 'Glt', true );
SMWPropertyValue::registerProperty( '___gld', '_txt', 'Gld', true );
SMWPropertyValue::registerProperty( '___gll', '_str', 'Gll', true );

and

SMWPropertyValue::registerPropertyAlias( '___glt', wfMsg( 'glt' ) );
SMWPropertyValue::registerPropertyAlias( '___gld', wfMsg( 'gld' ) );
SMWPropertyValue::registerPropertyAlias( '___gll', wfMsg( 'gll' ) );

> > 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.
I checked, wfMsg returns the right values.

It does work now. Somehow. Observations:

- As a label in the registration above I have to use valid wiki
pagenames, incl. uppercase first letter. Else querying using #ask
returns an empty result.

- This happened for a while but I can not reproduce it anymore:  When I
set one of the properties on a page and on the same page query for it,
right after the saving the query displays the results only for this page
(and not for other pages that might use the property) and as links. In
short, it looks as if I had just used a brand-new, not yet defined
property. After a purge all results are displayed correctly.

- The very first column of the page still behaves funny in that it only
returns values if I use the internal label, the alias does not return
any results.

- Except for the very first column of the page the column headers of the
values show the internal label, not the aliases.

Stephan

------------------------------------------------------------------------------
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