Page MenuHomePhabricator

error with the parser function with CategoryTree
Closed, ResolvedPublic

Description

Author: professorminh

Description:
I have it working with the xml format like:
<categorytree>MyCategory</categorytree>

[<a href="#" onclick="this.href='javascript:void(0)'; categoryTreeCollapseNode('P\x26G','0',this);" title="collapse" class="CategoryTreeLoaded">–</a>] <a class="CategoryTreeLabel CategoryTreeLabelNs14 CategoryTreeLabelCategory" href="/wiki/index.php?title=Category:MyCategory">MyCategory</a>
[<a href="#" onclick="this.href='javascript:void(0)'; categoryTreeExpandNode('Soap','0',this);" title="expand">+</a>] <a class="CategoryTreeLabel CategoryTreeLabelNs14 CategoryTreeLabelCategory" href="/wiki/index.php?title=Category:Soap">Soap</a>


Version: unspecified
Severity: critical

Details

Reference
bz13028

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 10:07 PM
bzimport set Reference to bz13028.
bzimport added a subscriber: Unknown Object (MLST).

professorminh wrote:

I think i fixed it...
in the function ... function efCategoryTreeParserFunction( &$parser )
in CategoryTree.php

before:
return array( $html, 'isHTML' => true );

after:
return array( $html, 'noparse' => true, 'isHTML' => true );

Seems fine without this with MediaWiki trunk... what version of MW are you using?

professorminh wrote:

I'm using the current version MW 1.11.1

kevin.paul.nichols wrote:

(In reply to comment #3)

I'm using the current version MW 1.11.1

Same problem here with 1.11.1. Gives similar HTML error type output with the parser, but works with the XML syntax.

  • Bug 13268 has been marked as a duplicate of this bug. ***

jeff.cropp wrote:

I have the same problem running MW 1.11.1. The fix suggested in Comment #1 works for me. Does it have a downside?

professorminh wrote:

(In reply to comment #6)

I have the same problem running MW 1.11.1. The fix suggested in Comment #1
works for me. Does it have a downside?

the fix works fine.

Fixed in r36894 i suppose. I have added the "noparse" flag, even though it seems redundant. And the fix is probably mute, since the problem appears only to exist with 1.11, and the latest version of CT doesn't work with 1.11 anyway. But adding the flag didn't seem to hurt :)

If anyone is still having this problem with a recent version of CategoryTree and MediaWiki, please reopen this bug report.