Jump to content

Topic on Extension talk:ShortUrl/Flow

ShortUrl and Semantic Mediawiki

2
StasR (talkcontribs)

Extension:SemanticMediaWiki and Extension:SemanticForms don't work correctly after installing ShortUrl:

  • page Special:Properties (SMW) contains “NO_VALID_VALUE” instead of the names of predefined properties;
  • page Special:CreateProperty (SF) displays a message “This appears to be a cross-site request forgery; canceling save” when you try to save or preview property

I was able to fix it by editing the function setupUrlRouting (ShortUrl.hooks.php): replaced

$router->add( $wgShortUrlTemplate,
              array( 'title' => SpecialPage::getTitleFor( 'ShortUrl', '$1' )->getPrefixedText() )
            );

with

$router->add( $wgShortUrlTemplate,
              array( 'title' => 'Special:ShortUrl/$1' ) 
            );

After that everything is working correctly.

Rotsee (talkcontribs)

How about this?

$router->add( $wgShortUrlTemplate,
              array( 'title' => SpecialPage::getTitleFor( 'ShortUrl', false, '$1' )->getPrefixedText() )
            );
Reply to "ShortUrl and Semantic Mediawiki"