Last modified: 2012-07-31 21:51:50 UTC
You can see the issue here: http://scratchpad.referata.com/wiki/SMW_1.8_query_test?useskin=vector There's just a single query in the page - if you remove it, the gap goes away. This seems to be due to something that was added in the SMW code sometime in the last few weeks. It happens for various MW versions. I really don't know what's causing it - it doesn't appear to be anything in the HTML, so I'm guessing that it's some sort of strange CSS or JS issue.
Added kgh to recipients list, since he originally discovered the issue.
*** Bug 38616 has been marked as a duplicate of this bug. ***
I can confirm this. And somehow suspect I caused it. I'm not getting any error though, so am not sure where this is coming from.
When testing with MW 1.20 the same thing happens but after a page refresh the gap is gone, so I'm also a buffed. It just a guess but since all the navigation list items are are ul/li items that somewhere the ul/li css is overridden.
I looked at Special:Ask and within the Html source (looking with chrome inspector, not just the plain source) after the <body class="mediawiki ltr sitedir-ltr ns--1 ns-special mw-special-Ask page-Special_Ask skin-vector action-view vector-animateLayout"> and before the <title> element their is suddenly a whitespace generated which causes the distraction in different heights.
Looking into it a bit further, it involves both printers from SMW (such as SMW_QP_List.php) and those delivered by SRF as well as queries executed in Special:Ask and within normal pages. Since no one has recently worked (to the best of my knowledge) on SMW_QP_List.php and assuming that the symptoms appear in Special:ask and normal page queries, and recently untouched printers show the same symptoms my assumptions would be that something happens after getResultText() either in SMW_QueryProcessor.php or SMW_QueryPrinter.php that causes the added whitespace at the top. I think we also can eliminate JS/CSS as cause because SMW_QP_List.php does not use any specific CSS elements nor does it load any JavaScript or CSS specific files via the ResourceLoader and still shows the same behaviour as other printers that use JS or CSS.
On Internet Explorer looking on the HTML-Code is saw that there also where spaces in front of <!DOCTYPE html> after setting $wgHtml5 = false; it looks like the problem disappeared. Can somebody test and confirm this?
Yes, indeed - "$wgHtml5 = false;" makes the problem go away! I just added it to Referata, and now even on pages where the gap is still there, hitting shift-refresh makes it disappear. (I can remove that line again, though, if that would be helpful for testing purposes.)
I tried $wgHtml5 = false; with MW 1.20 and it won't work. Yaron just to be curious does the SMW/SRF version on scratchpad come from a recent git repo or the old SVN repo (both had the label 1.8 alpha) ? (Can't see the svn nor git version on scratchpad)?
It uses SMW code from Git, from I think 2-3 weeks ago. (I can update if that would help.) The difference might be that Referata is using MW 1.18, instead of 1.20.
Better not make an update right now. Do you have the git number to see which possible changes have been committed before that git version, might help pin-pointing changes that appear then ...
I'm not sure what the git number is, but it looks like the code was last updated July 9. The whole $wgHtml5 thing shouldn't really matter though... I mean, presumably if the bug is fixed, it will work fine regardless of the setting of that variable.
Could you do me a favour (don't wont create a patch) and test one minor thing for me in /includes/storage/SMW_QueryResult.php, could you comment out those three lines and revert and any $wgHtml5 settings to its original to see if the change does the trick. Line 147: - public function getQuery() { - return $this->mQuery; - } I know it's a long shot ...
Always glad to help - that doesn't seem to work though. I removed the wgHtml5 line too, and now the problem is back.
The HTML5 think seams to only partly help Commenting out the lines mentioned above does not change anything
Well now I'm also at the end with my Latin. Since it was the closest to 9 Jul change that had something to do with queries which means that any change before 9 Jul is causing the trouble, I just don't know which one. Someone else any ideas?
I have many pages with queries that can be found here http://www.wecowi.de/wiki/Kategorie:Liste I somehow have the impression, that it more often happens when there are more then one dates queried
OK, here is my last guess. I saw in the hex editor that SMW_QueryResult.php comes with BOM (Byte order mark) (which shouldn't be but right now it does) in front of the <?php, could you try to delete this because as soon as the BOM is gone, the problem disappears.
JACKPOT thanks, that really seams to help
Nice!
https://gerrit.wikimedia.org/r/#/c/17007/
Oh, that was caused by a BOM?! No idea it could have that effect. Thanks for fixing! :)