[Wikidata-bugs] [Maniphest] T247196: Wikibase property names are missing when renders

2020-09-27 Thread CXuesong
CXuesong added a comment.


  This bug does not reproduce on 1.36.0-wmf.10.

TASK DETAIL
  https://phabricator.wikimedia.org/T247196

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: CXuesong
Cc: Michael, Legoktm, Ladsgroup, darthmon_wmde, WMDE-leszek, Jakob_WMDE, 
Tarrow, Samantha_Alipio_WMDE, Addshore, Aklapper, CXuesong, Hazizibinmahdi, 
Akuckartz, Iflorez, alaa_wmde, Nandana, lucamauri, Lahi, Gq86, 
GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, _jensen, rosalieper, 
Scott_WUaS, Jonas, Wong128hk, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T247196: Wikibase property names are missing when renders

2020-03-29 Thread CXuesong
CXuesong added a comment.


  I've applied patch r/578298 and it seems the problem has been mitigated. 
Thanks in advance!

TASK DETAIL
  https://phabricator.wikimedia.org/T247196

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Ladsgroup, CXuesong
Cc: darthmon_wmde, WMDE-leszek, Jakob_WMDE, Tarrow, Samantha_Alipio_WMDE, 
Addshore, Aklapper, CXuesong, Oblanco79, Alter-paule, Hazizibinmahdi, 
Beast1978, Un1tY, Hook696, Daryl-TTMG, RomaAmorRoma, E.S.A-Sheild, Iflorez, 
Kent7301, alaa_wmde, RhinosF1, Meekrab2012, joker88john, CucyNoiD, Nandana, 
NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, 
Cpaulf30, Lahi, Gq86, Af420, Darkminds3113, Bsandipan, Lordiis, 
GoranSMilovanovic, Adik2382, Jayprakash12345, Th3d3v1ls, Ramalepe, Liugev6, 
QZanden, LawExplorer, WSH1906, Lewizho99, Maathavan, _jensen, rosalieper, 
Scott_WUaS, Jonas, Wong128hk, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T247196: Wikibase property names are missing when renders

2020-03-08 Thread CXuesong
CXuesong added a comment.


  Yes, I have.
  
  And actually the Property labels can be fetched from DB successfully. It just 
gets lost when storing the labels to the cache, i.e. `EmptyBagOStuff`.

TASK DETAIL
  https://phabricator.wikimedia.org/T247196

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Addshore, CXuesong
Cc: Samantha_Alipio_WMDE, Addshore, Aklapper, CXuesong, Iflorez, darthmon_wmde, 
alaa_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 
_jensen, rosalieper, Scott_WUaS, Jonas, Wikidata-bugs, aude, Lydia_Pintscher, 
Mbch331
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Retitled] T247196: Wikibase property names are missing when renders

2020-03-08 Thread CXuesong
CXuesong renamed this task from "Wikibase property names are missing" to 
"Wikibase property names are missing when renders".

TASK DETAIL
  https://phabricator.wikimedia.org/T247196

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: CXuesong
Cc: Aklapper, CXuesong, darthmon_wmde, Nandana, Lahi, Gq86, GoranSMilovanovic, 
QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, 
Mbch331
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Created] T247196: Wikibase property names are missing

2020-03-08 Thread CXuesong
CXuesong created this task.
CXuesong added a project: MediaWiki-extensions-WikibaseRepository.
Restricted Application added a subscriber: Aklapper.
Restricted Application added a project: Wikidata.

TASK DESCRIPTION
  I'm hosting a personal structured data site 
<https://crystalpool.cxuesong.com/>, powered by MediaWiki and Wikibase. After a 
recent upgrade of Wikibase extension to fceb8a5 
<https://github.com/wikimedia/mediawiki-extensions-Wikibase/commit/fceb8a581c3eceaeb4e15a2a5f22280740176005>,
 I found all the properties links are rendered without labels, while the 
entities are rendered correctly. I'm not sure whether this is caused by a bug 
in the extension, or some mis-configuration of my MW site.
  
  I'm not using any special cache settings. After digging in the code, I think 
the problem is related to `useNormalizedPropertyTerms` being enabled. However, 
I'm not sure about the next step to resovle the problem.
  
  Actual Results:
  https://crystalpool.cxuesong.com/wiki/Special:AllPages?namespace=122
  F31671060: image.png <https://phabricator.wikimedia.org/F31671060>
  https://crystalpool.cxuesong.com/wiki/Item:Q37
  F31671276: image.png <https://phabricator.wikimedia.org/F31671276>
  
  Expected Results:
  I should be able to see the property names, rather than IDs only.
  
  Steps to Reproduce:
  
  - After debugging into the source code, I found the root cause is when 
constructing `SimpleCacheWithBagOStuff` instance in 
SingleEntitySourceServices::getPrefetchingTermLookup, L429 
<https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/fceb8a581c3eceaeb4e15a2a5f22280740176005/data-access/src/SingleEntitySourceServices.php#L429>,
 [//Stack trace 1//] 
`MediaWikiServices::getInstance()->getLocalServerObjectCache()` returns 
EmptyBagOStuff 
<https://github.com/wikimedia/mediawiki/blob/a50432f78c6986389fb75e20fc9ce1edf1d37015/includes/libs/objectcache/EmptyBagOStuff.php>,
 which is a dummy implementation that actually does nothing.
- This will eventually cause `SimpleCacheWithBagOStuff::setMultiple` throw 
the received items (`$values`) into oblivion, [//Stack trace 2//] and returns 
nothing when calling `SimpleCacheWithBagOStuff::getMultiple`.
- Consequently `EntityIdLabelFormatter::getLabel` returns nothing, so no 
property label is rendered.
  
  Stack traces for reference:
  
  n.b. The line number may offset a bit, as I've inserted some snippets for 
debugging. But basically you may get something from the function names.
  
  Stack trace 1: SimpleCacheWithBagOStuff::__construct
  
/mw_root/extensions/Wikibase/lib/includes/SimpleCacheWithBagOStuff.php:45
Stack trace:
#0 
/mw_root/extensions/Wikibase/data-access/src/SingleEntitySourceServices.php(431):
 Wikibase\Lib\SimpleCacheWithBagOStuff->__construct(Object(EmptyBagOStuff), 
'wikibase.prefet...', 'f2d7ceb7bd23b6a...')
#1 
/mw_root/extensions/Wikibase/data-access/src/MultipleEntitySourceServices.php(112):
 Wikibase\DataAccess\SingleEntitySourceServices->getPrefetchingTermLookup()
#2 
/mw_root/extensions/Wikibase/data-access/src/MultipleEntitySourceServices.php(204):
 Wikibase\DataAccess\MultipleEntitySourceServices->getPrefetchingTermLookup()
#3 /mw_root/extensions/Wikibase/repo/includes/WikibaseRepo.php(1159): 
Wikibase\DataAccess\MultipleEntitySourceServices->getTermBuffer()
#4 /mw_root/extensions/Wikibase/repo/includes/WikibaseRepo.php(1152): 
Wikibase\Repo\WikibaseRepo->getPrefetchingTermLookup()
#5 /mw_root/extensions/Wikibase/repo/includes/WikibaseRepo.php(506): 
Wikibase\Repo\WikibaseRepo->getTermLookup()
#6 /mw_root/extensions/Wikibase/repo/includes/WikibaseRepo.php(487): 
Wikibase\Repo\WikibaseRepo->newWikibaseValueFormatterBuilders(Array)
#7 /mw_root/extensions/Wikibase/repo/WikibaseRepo.datatypes.php(101): 
Wikibase\Repo\WikibaseRepo::getDefaultValueFormatterBuilders()
#8 [internal function]: {closure}('text/x-wiki', 
Object(ValueFormatters\FormatterOptions))
#9 
/mw_root/extensions/Wikibase/lib/includes/Formatters/OutputFormatValueFormatterFactory.php(159):
 call_user_func(Object(Closure), 'text/x-wiki', 
Object(ValueFormatters\FormatterOptions))
#10 
/mw_root/extensions/Wikibase/lib/includes/Formatters/OutputFormatValueFormatterFactory.php(139):
 
Wikibase\Lib\Formatters\OutputFormatValueFormatterFactory->buildDefinedFormatters('text/x-wiki',
 Object(ValueFormatters\FormatterOptions))
#11 /mw_root/extensions/Wikibase/repo/includes/WikibaseRepo.php(1465): 
Wikibase\Lib\Formatters\OutputFormatValueFormatterFactory->getValueFormatter('text/x-wiki',
 Object(ValueFormatters\FormatterOptions))
#12 /mw_root/extensions/Wikibase/repo/includes/WikibaseRepo.php(1436): 
Wikibase\Repo\WikibaseRepo->getMessageParameterFormatter()
#13 /mw_root/extensions/Wikibase/repo/includes/WikibaseRepo.php(1724): 
Wikiba

[Wikidata-bugs] [Maniphest] [Commented On] T182573: action=wbsetclaim cannot create new claim as stated in the documentation

2017-12-11 Thread CXuesong
CXuesong added a comment.
I see. Thanks for your explanation, Thiemo!

Actually I'm currently working on a Wikibase API client library. This library used to edit the entities via wbeditentity requests, and now I'm 
trying to break down the edits so that more detailed edit summary would be left in the edit history.

I did met with an error when trying to create a new claim with wbsetclaim, setting claim parameter to the serialized claim content. At that time, I didn't provide any GUID for the claim, thinking Wikibase might automatically assign one for this new claim, just as what would be done if I feed wbeditentity with claims that doesn't have GUID. But then I found out there is no way I can specify the subject entity via a request parameter, nor did the Wikibase server accepted my request that neglected the GUID.

Actually I ended up with wbcreateclaim, wbsetqualifier and wbsetreference invocations. But later I might switch to assigning a new GUID locally before calling wbsetclaim.TASK DETAILhttps://phabricator.wikimedia.org/T182573EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: CXuesongCc: thiemowmde, CXuesong, Aklapper, Lahi, Gq86, GoranSMilovanovic, Ivana_Isadora, Soteriaspace, Jayprakash12345, JakeTheDeveloper, QZanden, Zoranzoki21, NavinoEvans, Wikidata-bugs, aude, Dinoguy1000, TheDJ, Mbch331, Jay8g___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Created] T182573: action=wbsetclaim cannot create new claim as stated in the documentation

2017-12-11 Thread CXuesong
CXuesong created this task.CXuesong added a project: MediaWiki-extensions-WikibaseClient.Herald added a subscriber: Aklapper.Herald added a project: Wikidata.
TASK DESCRIPTIONAs stated in the API documentation, wbsetclaim can Creates or updates an entire Statement or Claim, but there is no id parameter that is necessary for creating an claim. I guess the documentation needs a fix.

Btw, it would be really helpful if I can specify the whole serialized claim data when creating a claim. But for now it seems that I can only do so when editing. instead of creating a claim.TASK DETAILhttps://phabricator.wikimedia.org/T182573EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: CXuesongCc: CXuesong, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Closed] T177269: Is `altitude` in `globe-coordinate` still in use?

2017-10-14 Thread CXuesong
CXuesong closed this task as "Resolved".CXuesong claimed this task.
TASK DETAILhttps://phabricator.wikimedia.org/T177269EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: CXuesongCc: CXuesong, Aklapper, GoranSMilovanovic, QZanden, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177269: Is `altitude` in `globe-coordinate` still in use?

2017-10-14 Thread CXuesong
CXuesong added a comment.
Jeroen De Dauw replied in the mailing list:

It is not in use and never really was. (Code indicating it is not in use:
 https://github.com/DataValues/Geo/blob/2d8e852d04318b13bd0db39b24afe7c56c61dc3e/src/Values/GlobeCoordinateValue.php#L193-L195
 )

I'm not entirely sure why it is still in the API output and what the plans
 with it are, but my guess is that it is still there for compatibility
 reasons and that there is no intention of using this key in the future. If
 I where creating an API client I'd just ignore this key.

Okay so I guess I will just ignore this field.TASK DETAILhttps://phabricator.wikimedia.org/T177269EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: CXuesongCc: CXuesong, Aklapper, GoranSMilovanovic, QZanden, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T177269: Is `altitude` in `globe-coordinate` still in use?

2017-10-03 Thread CXuesong
CXuesong added a comment.

In T177269#3653161, @Aklapper wrote:
I'm not quite sure where I should go if I were to have some general Wikibase (API) questions. Could you please give me some guidance? Thanks :-)

Please see the "Contact" section on https://www.wikidata.org/wiki/Wikidata:Main_Page


Oops. Haven't even thought of that before. Thanks Aklapper.TASK DETAILhttps://phabricator.wikimedia.org/T177269EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: CXuesongCc: CXuesong, Aklapper, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs