[Wikidata-bugs] [Maniphest] [Commented On] T185437: wgWikibaseItemId should be available on the edit page

2020-01-26 Thread Aschroet
Aschroet added a comment.


  Is there any workaround?

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

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

To: Aschroet
Cc: Aschroet, AS, valerio.bozzolan, putnik, Aklapper, 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] [Commented On] T185437: wgWikibaseItemId should be available on the edit page

2018-08-03 Thread valerio.bozzolan
valerio.bozzolan added a comment.
I've found where this variable is defined:

Wikbase repository / client/ClientHooks.php:

/**
 * Add the connected item prefixed id as a JS config variable, for gadgets etc.
 *
 * @param OutputPage $out
 * @param Skin $skin
 */
public static function onBeforePageDisplayAddJsConfig( OutputPage $out, Skin $skin ) {
$prefixedId = $out->getProperty( 'wikibase_item' );

if ( $prefixedId !== null ) {
$out->addJsConfigVars( 'wgWikibaseItemId', $prefixedId );
}
}

That method is attached to the BeforePageDisplay hook, as far I can see:

Wikibase repository / client/WikibaseClient.php:

$wgHooks['BeforePageDisplay'][] = '\Wikibase\ClientHooks::onBeforePageDisplayAddJsConfig';

So I think that the problem is that it should be hooked also to one other hook listed here: Manual:Hooks.

The most notable hook I think it's AlternateEdit:

This hook gets called at the beginning of ="" before any user permissions are checked or any edit checking is performed.TASK DETAILhttps://phabricator.wikimedia.org/T185437EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: valerio.bozzolanCc: valerio.bozzolan, putnik, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, 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] T185437: wgWikibaseItemId should be available on the edit page

2018-08-02 Thread valerio.bozzolan
valerio.bozzolan added a comment.
Hoping to give additional visibility to this problem, I've documented this variable here:

https://www.mediawiki.org/wiki/Manual:Interface/_javascript_#Page-specific_(Wikibase)TASK DETAILhttps://phabricator.wikimedia.org/T185437EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: valerio.bozzolanCc: valerio.bozzolan, putnik, Aklapper, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, Wikidata-bugs, aude, Mbch331___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs