[Wikidata-bugs] [Maniphest] [Commented On] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-16 Thread Jarekt
Jarekt added a comment.


  I purged all the files in Category:Pages_with_script_errors 
 and 
there are no more errors in file namespace.

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

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

To: matthiasmullie, Jarekt
Cc: Keegan, Multichill, Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, 
Aklapper, Lea_Lacroix_WMDE, Liuxinyu970226, darthmon_wmde, Nandana, JKSTNK, 
Lahi, Gq86, Ramsey-WMF, GoranSMilovanovic, Jayprakash12345, QZanden, 
LawExplorer, _jensen, rosalieper, Scott_WUaS, 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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-16 Thread gerritbot
gerritbot added a comment.


  Change 558039 **merged** by jenkins-bot:
  [mediawiki/extensions/WikibaseMediaInfo@wmf/1.35.0-wmf.10] Override 
getSitelink in mediainfo table, instead of removing it
  
  https://gerrit.wikimedia.org/r/558039

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

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

To: gerritbot
Cc: Keegan, Multichill, Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, 
Aklapper, Lea_Lacroix_WMDE, Liuxinyu970226, Hook696, Daryl-TTMG, RomaAmorRoma, 
0010318400, E.S.A-Sheild, darthmon_wmde, Meekrab2012, joker88john, CucyNoiD, 
Nandana, NebulousIris, JKSTNK, 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, 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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-16 Thread gerritbot
gerritbot added a comment.


  Change 558039 had a related patch set uploaded (by Lucas Werkmeister (WMDE); 
owner: Matthias Mullie):
  [mediawiki/extensions/WikibaseMediaInfo@wmf/1.35.0-wmf.10] Override 
getSitelink in mediainfo table, instead of removing it
  
  https://gerrit.wikimedia.org/r/558039

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

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

To: gerritbot
Cc: Keegan, Multichill, Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, 
Aklapper, Lea_Lacroix_WMDE, Liuxinyu970226, darthmon_wmde, Nandana, JKSTNK, 
Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, _jensen, 
rosalieper, Scott_WUaS, 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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-16 Thread gerritbot
gerritbot added a comment.


  Change 556981 **merged** by jenkins-bot:
  [mediawiki/extensions/WikibaseMediaInfo@master] Override getSitelink in 
mediainfo table, instead of removing it
  
  https://gerrit.wikimedia.org/r/556981

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

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

To: gerritbot
Cc: Keegan, Multichill, Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, 
Aklapper, Lea_Lacroix_WMDE, Liuxinyu970226, Hook696, Daryl-TTMG, RomaAmorRoma, 
0010318400, E.S.A-Sheild, darthmon_wmde, Meekrab2012, joker88john, CucyNoiD, 
Nandana, NebulousIris, JKSTNK, 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, 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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-16 Thread matthiasmullie
matthiasmullie added a comment.


  > Can we just keep `getSitelink` method, and make it return //nil// when 
applied to MediaInfo entities?
  
  Yes - bringing it back as a no-op (for now at least)
  
  > The difference between the two files is that the first one has SDC 
statements and labels and the second one does not. So it seems like only files 
with SDC statements are affected by this issue.
  
  Yes, it appears that as soon as a MediaInfo entity gets created, the code to 
delete `getSitelink` gets run and has the unfortunate side-effect from deleting 
it in the parent metatable as well...

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

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

To: matthiasmullie
Cc: Keegan, Multichill, Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, 
Aklapper, Lea_Lacroix_WMDE, Liuxinyu970226, Hook696, Daryl-TTMG, RomaAmorRoma, 
0010318400, E.S.A-Sheild, darthmon_wmde, Meekrab2012, joker88john, CucyNoiD, 
Nandana, NebulousIris, JKSTNK, 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, 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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-13 Thread Jarekt
Jarekt added a comment.


  After my yesterday change to `Module:Wikidata label`, the 30k files affected 
got fixed. Now the only files in Category:Pages_with_script_errors 
 are 
couple hundred Gauguin paintings. Lets not "fix" those files so we can keep on 
diagnosing the issue. I did try to isolate the issue and found the following:
  
  - `{{#invoke:Cite|cite|item=Q15088284}}` added to File:Gauguin Stillleben mit 
Fruchtschale und Zitronen.jpg 

 causes the issue F31474759: New Picture (9).jpg 

  - `{{#invoke:Cite|cite|item=Q15088284}}` added to File:Gauguin 1882 Carrière 
aux environs de Pontoise.jpg 

 does not cause the issue
  
  The difference between the two files is that the first one has SDC statements 
and labels and the second one does not. So it seems like only files with SDC 
statements are affected by this issue.

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

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

To: Jarekt
Cc: Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, Aklapper, Lea_Lacroix_WMDE, 
Liuxinyu970226, Hook696, Daryl-TTMG, RomaAmorRoma, 0010318400, E.S.A-Sheild, 
darthmon_wmde, Meekrab2012, joker88john, DannyS712, CucyNoiD, Nandana, 
NebulousIris, JKSTNK, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, 
Adrian1985, Cpaulf30, Lahi, Gq86, Af420, Darkminds3113, Bsandipan, Lordiis, 
GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, 
LawExplorer, WSH1906, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, 
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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-13 Thread Jarekt
Jarekt added a comment.


  In T240563#5738558 , 
@matthiasmullie wrote:
  
  > I believe that whatever I ended up doing to remove the `getSitelink` method 
from MediaInfo entities, accidentally took it away from the parent class as 
well. Am looking into it!
  
  Can we just keep `getSitelink` method, and make it return //nil// when 
applied to MediaInfo entities?

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

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

To: Jarekt
Cc: Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, Aklapper, Lea_Lacroix_WMDE, 
Liuxinyu970226, Hook696, Daryl-TTMG, RomaAmorRoma, 0010318400, E.S.A-Sheild, 
darthmon_wmde, Meekrab2012, joker88john, DannyS712, CucyNoiD, Nandana, 
NebulousIris, JKSTNK, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, 
Adrian1985, Cpaulf30, Lahi, Gq86, Af420, Darkminds3113, Bsandipan, Lordiis, 
GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, 
LawExplorer, WSH1906, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, 
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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-13 Thread gerritbot
gerritbot added a comment.


  Change 556981 had a related patch set uploaded (by Matthias Mullie; owner: 
Matthias Mullie):
  [mediawiki/extensions/WikibaseMediaInfo@master] Only remove methods in 
mediainfo table, not in parent wikibase table
  
  https://gerrit.wikimedia.org/r/556981

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

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

To: gerritbot
Cc: Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, Aklapper, Lea_Lacroix_WMDE, 
Liuxinyu970226, darthmon_wmde, DannyS712, Nandana, JKSTNK, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-12 Thread matthiasmullie
matthiasmullie added a comment.


  I believe that whatever I ended up doing to remove the `getSitelink` method 
from MediaInfo entities, accidentally took it away from the parent class as 
well. Am looking into it!

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

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

To: matthiasmullie
Cc: Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, Aklapper, Lea_Lacroix_WMDE, 
Liuxinyu970226, darthmon_wmde, DannyS712, Nandana, JKSTNK, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-12 Thread Jarekt
Jarekt added a comment.


  I "fixed" the immediate line causing errors, and that seems to fix the pages. 
However the explanation still does not make much sense as the entities the 
module was operating on were Wikidata entities and not SDC's MediaInfo  
entities,  and we should be able to look up sitelinks for them.

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

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

To: Jarekt
Cc: Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, Aklapper, Lea_Lacroix_WMDE, 
Liuxinyu970226, darthmon_wmde, DannyS712, Nandana, JKSTNK, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-12 Thread Jarekt
Jarekt added a comment.


  matthiasmullie and Lucas_Werkmeister_WMDE thanks for reply. I think I 
understand it now, so in the past we had the code with the same interface, 
documented in  mw:Extension:Wikibase Client/Lua 
,  that supported 
both processing of wikidata and SDC entities, and now we are moving in a now 
direction of having two different codes with different functions. That will 
make writing libraries that work with both Wikidata and SDC much harder.

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

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

To: Jarekt
Cc: Jarekt, Lucas_Werkmeister_WMDE, matthiasmullie, Aklapper, Lea_Lacroix_WMDE, 
Liuxinyu970226, darthmon_wmde, DannyS712, Nandana, JKSTNK, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-12 Thread matthiasmullie
matthiasmullie added a comment.


  Yes, it looks like the removal of `getSitelink` for MediaInfo entities 
probably caused this.
  There's already a discussion about this on the module's talk page: 
https://commons.wikimedia.org/wiki/Module_talk:Wikidata_label#Lua_error_in_Module:Wikidata_label_at_line_24:_attempt_to_call_method_'getSitelink'_(a_nil_value).

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

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

To: matthiasmullie
Cc: Lucas_Werkmeister_WMDE, matthiasmullie, Aklapper, Lea_Lacroix_WMDE, 
Liuxinyu970226, darthmon_wmde, DannyS712, Nandana, JKSTNK, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
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] T240563: broken Lua's mw.wikibase.entity:getSitelink function

2019-12-12 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment.


  Module:Wikidata label 
’s `getSitelink` 
function (permalink 
)
 assumes that any entity has a `getSitelink` method:
  
-- use different sitelink call depending if you already have an entity or 
not
local function getSitelink(item, entity, lang)
if entity then -- if we have entity than use it
return entity:getSitelink(lang .. 'wiki') 
else -- if no entity than use different function
return mw.wikibase.sitelink( item, lang .. 'wiki' )
end
end
  
  With the new MediaInfo module, that’s no longer a valid assumption. (Come to 
think of it, we should probably remove the `getSitelink` method for Lexeme 
entities too, but that’s unrelated.) I’m not sure if the fix is an additional 
“does the method exist” check, though, or if `getSitelink` shouldn’t be called 
with a MediaInfo entity at all (as far as I understand, it would eventually 
have to return `nil` anyways).
  
  Either way, I suspect this will have to be fixed on-wiki by the community 
editors, but they can’t very well do that when the new Lua module for MediaInfo 
entities hasn’t even been announced yet as far as I’m aware :)

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

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

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