[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2014-01-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

MWJames jamesin.hongkon...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from MWJames jamesin.hongkon...@gmail.com ---
Merged with master

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-28 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

--- Comment #6 from MWJames jamesin.hongkon...@gmail.com ---
I was looking at the wrong cause and while the above analysis is certainly not
wrong, the reason why the parsing is excluded for Specialpages is that in order
to avoid unnecessary parsing and performance degradation [1] checks whether a
page is a special page or not and only in a case it is a normal page it uses
the SMW\ContentProcessor to process SMW's annotations.

[1]
https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/hooks/InternalParseBeforeLinks.php#L54

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-28 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

--- Comment #7 from MWJames jamesin.hongkon...@gmail.com ---
I need some time to think this over since I don't want to make the check
arbitrary towards Specialpages. Maybe use something like [1] and only allow
specific SpecialPages to pass (setting that tells which Specialpages are
allowed to pass).

[1] $this-parser-getTitle()-isSpecial( 'Ask' ) ||
$this-parser-getTitle()-isSpecial( 'RunQuery' )

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-28 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

--- Comment #8 from MWJames jamesin.hongkon...@gmail.com ---
[1] should allow to use SMW's internal content processor for listed
Specialpages (earlier suggestions for a fix should be reverted in favour of
[1]).

Default setting is (deployed with SMW-core):
$GLOBALS['smwgEnabledSpecialPage'] = array( 'Ask' );

In case of SF, [2] should be added to the LocalSettings.

[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/59

[2] $GLOBALS['smwgEnabledSpecialPage'] = array( 'Ask', 'RunQuery' );

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-28 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

--- Comment #9 from Jaider Andrade Ferreira jaide...@gmail.com ---
Yes, this fixes the problem. Thanks again.
I am not a developer and I don't know PHP, but I put 

$smwgEnabledSpecialPage = array( 'Ask', 'RunQuery' );

in LocalSettings.php, instead of 

$GLOBALS['smwgEnabledSpecialPage'] = array( 'Ask', 'RunQuery' );

Is this fine, too? Right?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-28 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

--- Comment #10 from MWJames jamesin.hongkon...@gmail.com ---
(In reply to comment #9)
 Yes, this fixes the problem. Thanks again.
 I am not a developer and I don't know PHP, but I put 
 
 $smwgEnabledSpecialPage = array( 'Ask', 'RunQuery' );

This works as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-27 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

MWJames jamesin.hongkon...@gmail.com changed:

   What|Removed |Added

Summary|SMW::on and SMW::off in SMW |Special:Ask / template
   |1.9 |output shows SMW::on and
   ||SMW::off in SMW 1.9

--- Comment #1 from MWJames jamesin.hongkon...@gmail.com ---
Only template parsing in Special:Ask [[SMW::off]]/[[SMW::on]] is distorted
because [1] fails to enter parsing due to $wgParser-getTitle() and
$wgParser-getOptions() being null.

I'm not aware of that anyone has worked on this part ([1] and [2] are the same
for master and 1.8.0.5) therefore I can't tell why the behaviour are suppose
the be different.

[1]
https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/queryprinters/ResultPrinter.php#L293

[2]
https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/1.8.0.5/includes/queryprinters/SMW_ResultPrinter.php#L282

PS: Checked the output of $wgParser-getOptions()/$wgParser-getOptions() using
var_dump() in Special:ask which yields null.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-27 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

--- Comment #2 from Jaider Andrade Ferreira jaide...@gmail.com ---
I don't know if this helps, but the problem appears in Special:RunQuery, too
(from SemanticForms), not only in Special:Ask.

See: http://wikincat.org/wiki/Special:RunQuery/AdvancedSearch
(type wiki, for example, in the first entry field).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-27 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

--- Comment #3 from MWJames jamesin.hongkon...@gmail.com ---
(In reply to comment #2)
 I don't know if this helps, but the problem appears in Special:RunQuery, too
 (from SemanticForms), not only in Special:Ask.

This is due to the special status of a SpecialPages where parsing is handled
differently in MW in comparison to a standard page.

The issue appears to be the $wgParser stubobject initialization.

[1] https://www.mediawiki.org/wiki/Manual:$wgParser

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-27 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

--- Comment #4 from MWJames jamesin.hongkon...@gmail.com ---
As an easy fix, just remove [1], [2].

[3] was set for a reason (exists at least since 1.8) which is why the
SpecialPage like Ask or RunQuery will show [[SMW::off]]/[[SMW::on]] for a
template output.

[1]
https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/queryprinters/ResultPrinter.php#L303

[2]
https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/includes/queryprinters/ResultPrinter.php#L304

[3] $result = '[[SMW::off]]' . $result . '[[SMW::on]]';

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 58991] Special:Ask / template output shows SMW::on and SMW::off in SMW 1.9

2013-12-27 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=58991

--- Comment #5 from Jaider Andrade Ferreira jaide...@gmail.com ---
Ok, thanks.
This fix the Special:Ask, but not the Special:RunQuery.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l