> As you correctly note, $wgUrlProtocols is an array, not a string. This may
> have changed at some MW version, but any setting that really works with
> MediaWiki now should also work with SMW. I am sure that making it a string
> will give you a long list of warnings.
I guess that in MW 1.9.3 (the first version I've used) it already was
an array. 

> But this is of course not related to your earlier problem. I have updated SVN
> to catch the error (not fixing the problem but weakening its effects). Could
> you please send the original query (with Russian characters) again? Note that
> RSS-links do not depend on the query result -- they will yield almost the
> same result on any SMW-installation (with the exception of local query
> parsing errors due to different property types; these do not affect the
> generated link). So you can run tests on ontoworld as well (e.g. on your user
> page there).
I think I've found the reason why
                $title = Title::newFromText( $this->getRSSTitle($res) );
returns NULL.

In Title::secureAndSplit() with my Cyrillic "Specialnaya:Ask/lots of
chars........"

it returns false at the following point:
                /**
                 * Limit the size of titles to 255 bytes.
                 * This is typically the size of the underlying database field.
                 * We make an exception for special pages, which don't need to 
be stored
                 * in the database, and may edge over 255 bytes due to subpage 
syntax 
                 * for long titles, e.g. [[Special:Block/Long name]]
                 */
                if ( ( $this->mNamespace != NS_SPECIAL && strlen( $dbkey ) > 
255 ) ||
                  strlen( $dbkey ) > 512 ) 
                {
                        return false;
                }
Because my Cyrillic params rsstitle and rssdescription aren't very
short and also are URL encoded (hex), so they become even 3 times
longer.

So, I've tried to make sure title belongs to NS_SPECIAL.

First, I've introduced an optional parameter to
SMWQueryResult::getQueryTitle()
----
        public function getQueryTitle($ns=NS_SPECIAL) {
                $title = Title::makeTitle($ns, 'ask');
----
then, I've changed
SMWRSSResultPrinter::getRSSTitle()
----
        protected function getRSSTitle($res) {
                if ($this->rsslinktitle != '') {
                        return $this->rsslinktitle;
                }
                $this->rsslinktitle = $res->getQueryTitle(NS_MAIN);
----
and
SMWRSSResultPrinter::getRSSURL()
----
        protected function getRSSURL($res) {
                $title = Title::newFromText( $this->getRSSTitle($res), 
NS_SPECIAL );
----
to make sure the title gets a NS_SPECIAL namespace.

But no luck! Unfortunately, my title strlen($dbkey) in
Title::secureAndSpilt()
is even longer than 512 bytes! So, even using NS_SPECIAL doesn't
always help with my case :-(

Now I also found another reason, why passing query ID's to Special:Ask
would be cool - it would be a very short title...
Dmitriy


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to