https://bugzilla.wikimedia.org/show_bug.cgi?id=45176

       Web browser: ---
            Bug ID: 45176
           Summary: Semantic properties do not show up on factbox
           Product: MediaWiki extensions
           Version: REL1_20 branch
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: major
          Priority: Unprioritized
         Component: Semantic MediaWiki
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

SMW 1.8.x

Hello,


semantic properties do not show up on factbox if programatically generated via
PHP.

Someone allready commented this with the advice to invalidate the cache without
explaining how.

I guess I do this and it seems to be a real bug not a cache problem.

Here comes the code...every tip/hint/fix is very welcome!

[...]
SMWDIProperty::registerProperty( '___EXIFSOFTWARE', '_str','MyNewProp');
SMWDIProperty::registerPropertyAlias( '___EXIFSOFTWARE', 'MyNewProp' ) [...]

 public function UpdateDataBefore($store, $data ){
        global $wgUser,$wgEnableParserCache,$wgParser;
        $wgParser->disableCache();
        $wgEnableParserCache = false;

        $str = "EinTestString";  
        $property = new SMWDIProperty( '___EXIFSOFTWARE' );
        $dataItem = new SMWDIString( $str );
        $data->addPropertyObjectValue($property, $dataItem);

[...]

PS: 

1. The Properties show up on Special:Browse but not on the factbox!
Also the PHP-generated properties are automatically declared as special
properties...I don't know why. Could someone explain?

2. If someone could provide some code snipped too, to demonstrate how to
manipulate -->$data<-- on the fly in an UpdateDataBefore-handler this would be
very very nice and open some doors to new innovations. This doc here is not
enough:
http://semantic-mediawiki.org/wiki/SMW_Hooks/SMWStore::updateDataBefore

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to