{"action":"closed","issue":{"url":"https://api.github.com/repos/SemanticMediaWiki/SemanticResultFormats/issues/287","repository_url":"https://api.github.com/repos/SemanticMediaWiki/SemanticResultFormats","labels_url":"https://api.github.com/repos/SemanticMediaWiki/SemanticResultFormats/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/SemanticMediaWiki/SemanticResultFormats/issues/287/comments","events_url":"https://api.github.com/repos/SemanticMediaWiki/SemanticResultFormats/issues/287/events","html_url":"https://github.com/SemanticMediaWiki/SemanticResultFormats/issues/287","id":249631873,"node_id":"MDU6SXNzdWUyNDk2MzE4NzM=","number":287,"title":"Tree format <div> container breaks TreeAndMenu?","user":{"login":"krowlandnet","id":5878726,"node_id":"MDQ6VXNlcjU4Nzg3MjY=","avatar_url":"https://avatars0.githubusercontent.com/u/5878726?v=4","gravatar_id":"","url":"https://api.github.com/users/krowlandnet","html_url":"https://github.com/krowlandnet","followers_url":"https://api.github.com/users/krowlandnet/followers","following_url":"https://api.github.com/users/krowlandnet/following{/other_user}","gists_url":"https://api.github.com/users/krowlandnet/gists{/gist_id}","starred_url":"https://api.github.com/users/krowlandnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krowlandnet/subscriptions","organizations_url":"https://api.github.com/users/krowlandnet/orgs","repos_url":"https://api.github.com/users/krowlandnet/repos","events_url":"https://api.github.com/users/krowlandnet/events{/privacy}","received_events_url":"https://api.github.com/users/krowlandnet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-08-11T13:13:13Z","updated_at":"2018-10-19T08:29:17Z","closed_at":"2018-10-19T08:29:17Z","author_association":"NONE","body":"### Setup\r\n\r\n- MW version: 1.29.0 (on a private domain)\r\n- DB (MySQL etc.): 10.1.21-MariaDB\r\n- PHP version: 5.6.30\r\n- SMW version: 2.5.4\r\n- SRF version: 2.5.1\r\n- Browsers and versions (if applicable):\r\n\r\n### Issue\r\n\r\nI use the SRF tree format in combination with the [TreeAndMenu](https://www.mediawiki.org/wiki/Extension:TreeAndMenu) extension to build an interactive overview of a thesaurus. After upgrading MW and SMW, this no longer works.\r\n\r\n**Steps to reproduce**\r\n1. Install TreeAndMenu\r\n2. Create an ultree (as in https://sandbox.semantic-mediawiki.org/wiki/Ulree_example) wrapped in a TreeAndMenu #tree. The example from my site is\r\n`{{#tree:root=Thesaurus|\r\n{{#ask:\r\n[[Category:Thesaurus]]\r\n[[Is narrower than::+]]\r\n | format=tree\r\n | limit=200\r\n | parent=Is narrower than\r\n}}\r\n}}`\r\n\r\n**Expected result:** ...\r\nThe whole tree is rendered.\r\n**Observed result:** ...\r\nOnly the Thesaurus root node (specified after #tree) is shown.\r\n\r\n**My own solution**\r\nThe problem seems to be that the SRF tree for 2.5.1 is wrapped in a HTML div container, with class srf-tree (formats/tree/TreeResultPrinter.php, line 149), while TreeAndMenu expects a ul list. My previous version of SRF didn't put it in the div container AFAIK. I solved this issue for now by removing the Html:rawElement method and simply returning the result.\r\n`return Html::rawElement( 'div', [ 'class' => 'srf-tree' ], $resultText );`\r\nbecomes\r\n`return $resultText;`\r\n\r\nI'm not sure what the rationale behind the div container was, and whether this is a SRF or TreeAndMenu bug. If it is the latter please let me know and I will log the bug there.\r\n\r\n"}}
{"actor":{"display_login":"JeroenDeDauw"}}