SemanticMediaWiki / SemanticCite

Allows to manage citation resources using semantic annotations
https://www.semantic-mediawiki.org/wiki/Extension:Semantic_Cite
Other
24 stars 13 forks source link

mediawiki.api.parse is deprecated #70

Closed Krinkle closed 4 years ago

Krinkle commented 5 years ago

FYI:

The mw.Api parse method(s) are part of the mediawiki.api module bundle as of MW 1.31 MW 1.32, leaving mediawiki.api.parse as deprecated alias, to be removed in MW 1.33.

(Found via Codesearch.)

kghbln commented 5 years ago

Thanks for reporting!

kghbln commented 5 years ago

In contrast to the original report the alias was only added in MW 1.32.

  • In MW 1.31 and earlier, methods like mw.Api#parse existed in mediawiki.api.parse.
  • In MW 1.32, these were merged into mediawiki.api. With mediawiki.api.parse as alias. Using either works on this release, and one should migrate toward mediawiki.api.
  • In MW 1.33, the deprecated aliases were removed, and mediawiki.api must be used instead.

This means that we have to revert all respective changes. Is the same way of resolving this keeping the module until we no longer support MW 1.31 and later and drop it as soon as we switch to MW 1.35 as minimum support.

@mwjames @JeroenDeDauw Since I am not a programmer. What happens with MW 1.33 and 1.34 were we still have the module? Will this cause pain, meaning that we have to add some shim for compatibility.

bescheid commented 4 years ago

I just installed SMW cite 2.1.0 on a MW1.31.1. Everthing seems OK but js.tooltips do not work. The console reports:

VM5333:239 Uncaught TypeError: api.parse is not a function

See an example at https://www.univie.ac.at/rel_jap/an/Sandkiste2/SCI_example

Does this mean upgrade MW? Other solutions?

JeroenDeDauw commented 4 years ago

Your MW version is too new for Semantic Cite

bescheid commented 4 years ago

Thank you... Any clue for a workaround?

kghbln commented 4 years ago

Fixed with #71 which will ship with SCI 2.1.1