[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-02-06 Thread jo12bar
jo12bar added a comment.
Thanks @hoo - guess I had a brain-fart ;)

I am still having difficulties with accessing some Special:AboutTopic pages. For example, if I visit the Special:AboutTopic page for "flag of Canada" (Q984 on my wiki), then I automatcally get redirected to the (non-existent) page for Flag of Canada (/wiki/Flag_of_Canada), with a regular link to create it.

I have managed a work-around though. If I visit the Special:AboutTopic page for "Wikidata property related to law and justice" (Q16 on my wiki), then I don't get redirected - there just aren't any .articleplaceholder-statementgroup's or top images. So what I did was rip some of the html off of https://nap.wikipedia.org/wiki/Speci%C3%A0le:AboutTopic?entityid=Q80110 and wrote a snippet in Chrome DevTools that I can use to sort-of create a "layout testing page." Something like this:

ArticlePlaceholder-Test-Page-Setup.jsdocument.querySelector("#mw-content-text").innerHTML = `
  
  <div class="articleplaceholer-description">
<p>national flag</p>
  </div>

  <div class="articleplaceholder-sidebar">
<div class="articleplaceholder-topimage">
  <div class="thumb tright">
<div class="thumbinner" style="width:302px;">
  <a href="/wiki/Fi%C3%B9ra:Flag_of_Canada.svg" class="image">
<img alt="Flag of Canada.svg" src="//upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Flag_of_Canada.svg/300px-Flag_of_Canada.svg.png" width="300" height="150" class="thumbimage" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Flag_of_Canada.svg/450px-Flag_of_Canada.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Flag_of_Canada.svg/600px-Flag_of_Canada.svg.png 2x" data-file-width="1000" data-file-height="500">
  </a>
  <div class="thumbcaption">
<div class="magnify">
  <a href="/wiki/Fi%C3%B9ra:Flag_of_Canada.svg" class="internal" title="Ingrandisce"></a>
</div>
  </div>
</div>
  </div>
</div>

<div class="articleplaceholder-identifierlist">
  <h2><span class="mw-headline" id="Risorse_esterne">Risorse esterne</span>
  <table>
<tbody>
  <tr>
<td class="articleplaceholder-id-prop">identificativo Freebase</td>
<td class="articleplaceholder-id-value">
  <div class="articleplaceholder-statement">
<span><a rel="nofollow" class="external text" href="https://g.co/kg/m/0p0sz">/m/0p0sz
  </div>
</td>
  </tr>

  <tr>
<td class="articleplaceholder-id-prop">identificativo Flags of the World</td>
<td class="articleplaceholder-id-value">
  <div class="articleplaceholder-statement">
<span><a rel="nofollow" class="external text" href="http://flagspot.net/flags/ca.html">ca</a>
  </div>
</td>
  </tr>
</tbody>
  </table>
</div>
  </div>

  <div class="articleplaceholder-statementgrouplist">
<div class="articleplaceholder-statementgroup">
  <h2><span class="mw-headline" id="no_tipo_.27e">no tipo 'e
  
bandiera nazionale
  



  genere
  
Canadian pale
  



  data di fondazione/creazione/costruzione
  
15 Fre 1965
  



  appartiene alla giurisdizione
  
Canadà
  



  creatore
  
George Stanley
  



  colore
  
rosso
  
  
Ghiangh
  



  raffigura
  
Foglia d'acero</span>
<div class="articleplaceholder-qualifier">
  <p>colore: <span><span>rosso</span>
</div>
  </div>
  <div class="articleplaceholder-statement">
<span>campo dello scudo</span>
<div class="articleplaceholder-qualifier">
  <p>colore: <span><span>rosso</span>
</div>
  </div>

  <div class="articleplaceholder-statement">
<span>palo</span>
<div clas

[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-02-04 Thread jo12bar
jo12bar added a comment.
One concern I do have: with my current solution, only one column of boxes is shown at fairly standard desktop screen sizes (anything under 1109px in width). However, there is still a very large gap on the side of that column, so that it looks like another column should fit there:

F5487207: Capture.PNG

I can fix this to a degree with percentage-based left and right margins, but this ruins the uniform-margin look we had before. If the .articleplaceholder-statementgroup's had a fluid width, then it may fix the problem but then we may have to debate column sizes, number of columns, etc... Basically, lots of headaches.

Any ideas? Or is my current solution good?TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: gerritbot, hoo, jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, harikiran, Th3d3v1ls, SacredWKnight, JakeTheDeveloper, Ramalepe, Liugev6, Lewizho99, Maathavan, DatGuy, SamanthaNguyen, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-01-26 Thread jo12bar
jo12bar added a comment.
Hey @Lucie, could you maybe send me the exact config in LocalSettings.php that you use when testing? I've followed the instructions at https://www.mediawiki.org/wiki/Wikibase/Installation to the letter, and even implemented a change mentioned in this comment on this issue in the WikibaseImport repo, but I am still unable to succesfully import an entity and have ArticlePlaceholder see it. Here's some of the issues I'm having:


If the entity contains some value that has an unit (such as 'year' in the Canada entity), then the import script fails with Illeagal value: http://www.wikidata.org/entity/Q577. However, ArticlePlaceholder shows a page for the entity - just not the right one:F5366772: Capture.PNG
If the entity does not contain a value that has some sort of unit (for example, this unlabled entity) then WikibaseImport is able to import it without an issue, but ArticlePlaceholder complains that "This is not a valid item ID":F5366796: Capture.PNG


I am honestly at a loss about what is happening here. The logs don't seem to reveal anything, though I'm not that good at reading them. The only information I could find on this was the previously-mentioned issue from WikibaseImport's repo, but the fixes suggested in it do not seem to work.

Below is the relevant part of my LocalSettings.php file, where I set up Wikibase (client & repo), WikibaseImport, and ArticlePlaceholder:

## Wikibase (client)
# Repo
require_once "$IP/extensions/Wikibase/repo/Wikibase.php";
require_once "$IP/extensions/Wikibase/repo/ExampleSettings.php";
$wgEnableWikibaseRepo = true;
$wikibaseRepoConfig = array(
	'conceptBaseUri' => 'http://www.wikidata.org/entity/'
);
array_replace($wgWBRepoSettings, $wikibaseRepoConfig);

# WikibaseImport
require_once "$IP/extensions/WikibaseImport/WikibaseImport.php";

# Client
require_once "$IP/extensions/Wikibase/client/WikibaseClient.php";
require_once "$IP/extensions/Wikibase/client/ExampleSettings.php";
$wgEnableWikibaseClient = true;
$wikibaseClientConfig = array(
	'siteGlobalID' => 'enwiki',
);
array_replace($wgWBClientSettings, $wikibaseClientConfig);


## ArticlePlaceholder
wfLoadExtension('ArticlePlaceholder');
$wgArticlePlaceholderImageProperty = 'P18';

Just for reference, I've also uploaded the whole file:
F5366825: LocalSettings.php

Could you maybe take a look and see what you think? I'm pretty stuck right now...TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, SacredWKnight, JakeTheDeveloper, DatGuy, SamanthaNguyen, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-01-22 Thread jo12bar
jo12bar added a comment.
Alright, thanks for the tip. I'll definently look into using that extension - guess I didn't do enough research 

(Also, sorry that this is taking so long -  I've got a lot of exams this week, so I've been studying like mad. I'll definitely have the code ready by Saturday at the latest.)TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, SacredWKnight, JakeTheDeveloper, DatGuy, SamanthaNguyen, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-01-16 Thread jo12bar
jo12bar added a comment.
Is there any way that I can set a copy of wikidata.org, or (even better) connect the Wikibase Client to wikidata.org for testing purposes?TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, SacredWKnight, JakeTheDeveloper, DatGuy, SamanthaNguyen, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-01-16 Thread jo12bar
jo12bar added a comment.
Well, magically it's now working! Thanks @Florian! Now I can actually work on the CSS for this - should be a patch on Gerrit in a few hours.TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, FilipGCI, SacredWKnight, JakeTheDeveloper, DatGuy, SamanthaNguyen, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-01-16 Thread jo12bar
jo12bar added a comment.
*face palm*

Alright, I'll do that the moment I get home.TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, FilipGCI, SacredWKnight, JakeTheDeveloper, DatGuy, SamanthaNguyen, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-01-15 Thread jo12bar
jo12bar added a comment.
I keep running into this error after installing ArticlePlaceholder:

MediaWiki internal error.

Original exception: [16c787b6628d058f6d4d527b] /wiki/Special:Version MWException from line 176 of /vagrant/mediawiki/includes/Hooks.php: Invalid callback ArticlePlaceholder\BaseTemplateToolboxHookHandler::onBaseTemplateToolbox in hooks for BaseTemplateToolbox

Backtrace:
#0 /vagrant/mediawiki/includes/skins/BaseTemplate.php(115): Hooks::run(string, array)
#1 /vagrant/mediawiki/skins/Vector/VectorTemplate.php(273): BaseTemplate->getToolbox()
#2 /vagrant/mediawiki/skins/Vector/VectorTemplate.php(195): VectorTemplate->renderPortals(array)
#3 /vagrant/mediawiki/includes/skins/SkinTemplate.php(251): VectorTemplate->execute()
#4 /vagrant/mediawiki/includes/OutputPage.php(2382): SkinTemplate->outputPage()
#5 /vagrant/mediawiki/includes/MediaWiki.php(865): OutputPage->output(boolean)
#6 /vagrant/mediawiki/includes/MediaWiki.php(877): Closure$MediaWiki::main()
#7 /vagrant/mediawiki/includes/MediaWiki.php(519): MediaWiki->main()
#8 /vagrant/mediawiki/index.php(43): MediaWiki->run()
#9 /var/www/w/index.php(5): include(string)
#10 {main}

Exception caught inside exception handler: [16c787b6628d058f6d4d527b] /wiki/Special:Version MWException from line 176 of /vagrant/mediawiki/includes/Hooks.php: Invalid callback ArticlePlaceholder\BaseTemplateToolboxHookHandler::onBaseTemplateToolbox in hooks for BaseTemplateToolbox

Backtrace:
#0 /vagrant/mediawiki/includes/skins/BaseTemplate.php(115): Hooks::run(string, array)
#1 /vagrant/mediawiki/skins/Vector/VectorTemplate.php(273): BaseTemplate->getToolbox()
#2 /vagrant/mediawiki/skins/Vector/VectorTemplate.php(195): VectorTemplate->renderPortals(array)
#3 /vagrant/mediawiki/includes/skins/SkinTemplate.php(251): VectorTemplate->execute()
#4 /vagrant/mediawiki/includes/OutputPage.php(2382): SkinTemplate->outputPage()
#5 /vagrant/mediawiki/includes/exception/MWException.php(174): OutputPage->output()
#6 /vagrant/mediawiki/includes/exception/MWException.php(220): MWException->reportHTML()
#7 /vagrant/mediawiki/includes/exception/MWExceptionHandler.php(71): MWException->report()
#8 /vagrant/mediawiki/includes/exception/MWExceptionHandler.php(139): MWExceptionHandler::report(MWException)
#9 /vagrant/mediawiki/includes/MediaWiki.php(547): MWExceptionHandler::handleException(MWException)
#10 /vagrant/mediawiki/index.php(43): MediaWiki->run()
#11 /var/www/w/index.php(5): include(string)
#12 {main}

I've installed each of ArticlePlaceholder's dependencies separately, and tested each one to make sure that they worked. This error only pops up after installing ArticlePlaceholder to mediawiki/extensions and adding

## ArticlePlaceholder
wfLoadExtension('ArticlePlaceholder');
$wgArticlePlaceholderImageProperty = 'P18';

to my LocalSettings.php file.

Any idea what's going on?TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, FilipGCI, SacredWKnight, JakeTheDeveloper, DatGuy, SamanthaNguyen, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-01-15 Thread jo12bar
jo12bar added a comment.
I keep running into this error after installing ArticlePlaceholder:

MediaWiki internal error.

Original exception: [16c787b6628d058f6d4d527b] /wiki/Special:Version MWException from line 176 of /vagrant/mediawiki/includes/Hooks.php: Invalid callback ArticlePlaceholder\BaseTemplateToolboxHookHandler::onBaseTemplateToolbox in hooks for BaseTemplateToolbox

Backtrace:
#0 /vagrant/mediawiki/includes/skins/BaseTemplate.php(115): Hooks::run(string, array)
#1 /vagrant/mediawiki/skins/Vector/VectorTemplate.php(273): BaseTemplate->getToolbox()
#2 /vagrant/mediawiki/skins/Vector/VectorTemplate.php(195): VectorTemplate->renderPortals(array)
#3 /vagrant/mediawiki/includes/skins/SkinTemplate.php(251): VectorTemplate->execute()
#4 /vagrant/mediawiki/includes/OutputPage.php(2382): SkinTemplate->outputPage()
#5 /vagrant/mediawiki/includes/MediaWiki.php(865): OutputPage->output(boolean)
#6 /vagrant/mediawiki/includes/MediaWiki.php(877): Closure$MediaWiki::main()
#7 /vagrant/mediawiki/includes/MediaWiki.php(519): MediaWiki->main()
#8 /vagrant/mediawiki/index.php(43): MediaWiki->run()
#9 /var/www/w/index.php(5): include(string)
#10 {main}

Exception caught inside exception handler: [16c787b6628d058f6d4d527b] /wiki/Special:Version MWException from line 176 of /vagrant/mediawiki/includes/Hooks.php: Invalid callback ArticlePlaceholder\BaseTemplateToolboxHookHandler::onBaseTemplateToolbox in hooks for BaseTemplateToolbox

Backtrace:
#0 /vagrant/mediawiki/includes/skins/BaseTemplate.php(115): Hooks::run(string, array)
#1 /vagrant/mediawiki/skins/Vector/VectorTemplate.php(273): BaseTemplate->getToolbox()
#2 /vagrant/mediawiki/skins/Vector/VectorTemplate.php(195): VectorTemplate->renderPortals(array)
#3 /vagrant/mediawiki/includes/skins/SkinTemplate.php(251): VectorTemplate->execute()
#4 /vagrant/mediawiki/includes/OutputPage.php(2382): SkinTemplate->outputPage()
#5 /vagrant/mediawiki/includes/exception/MWException.php(174): OutputPage->output()
#6 /vagrant/mediawiki/includes/exception/MWException.php(220): MWException->reportHTML()
#7 /vagrant/mediawiki/includes/exception/MWExceptionHandler.php(71): MWException->report()
#8 /vagrant/mediawiki/includes/exception/MWExceptionHandler.php(139): MWExceptionHandler::report(MWException)
#9 /vagrant/mediawiki/includes/MediaWiki.php(547): MWExceptionHandler::handleException(MWException)
#10 /vagrant/mediawiki/index.php(43): MediaWiki->run()
#11 /var/www/w/index.php(5): include(string)
#12 {main}

I've installed each of ArticlePlaceholder's dependencies separately, and tested each one to make sure that they worked. This error only pops up after installing ArticlePlaceholder to mediawiki/extensions and adding

## ArticlePlaceholder
wfLoadExtension('ArticlePlaceholder');
$wgArticlePlaceholderImageProperty = 'P18';

to my LocalSettings.php file.

Any idea what's going on?TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, FilipGCI, SacredWKnight, JakeTheDeveloper, DatGuy, SamanthaNguyen, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Claimed] T149193: Boxes act weird if the external id section is small

2017-01-15 Thread jo12bar
jo12bar claimed this task.jo12bar added a comment.
#google-code-in-2016 is pretty much done, but I wasn't able to finish this task before the deadline (I need to sleep!). If it's alright with everyone, I'll keep working on this - vagrant roles were just giving me a lot of issues. Going to try installing ArticlePlaceholder's dependencies manually.

Thanks!TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, FilipGCI, SacredWKnight, JakeTheDeveloper, DatGuy, SamanthaNguyen, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T149193: Boxes act weird if the external id section is small

2017-01-12 Thread jo12bar
jo12bar added a comment.
I'll take a look at this 

(Claimed for #google-code-in-2016)TASK DETAILhttps://phabricator.wikimedia.org/T149193EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: jo12barCc: jo12bar, Florian, Harjotsingh, Aklapper, TerraCodes, Lucie, SacredWKnight, JakeTheDeveloper, DatGuy, Abbe98, JGirault, D3r1ck01, MuhammadShuaib, Izno, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs