Topic on Extension talk:Semantic Forms Inputs

"style module should define its position explicitly" when used with 1.26alpha (776aee4)

11
Summary by Kc5vcx

Datepicker was fixed and transferred to SemanticForms 3.4.3. It was removed from SFI 0.10.

Jongfeli (talkcontribs)

The datepicker input type stopped working under SMW-1.26alpha. The form loads but the datepicker does not. This warning is shown:

Warning: OutputPage::getModuleStyles: style module should define its position explicitly: jquery.ui.datepicker ResourceLoaderFileModule 
[Called from OutputPage::getModuleStyles in C:\Apache\htdocs\mediawiki\includes\OutputPage.php at line 621] in 
C:\Apache\htdocs\mediawiki\includes\debug\MWDebug.php on line 300

Warning: OutputPage::getModuleStyles: style module should define its position explicitly: ext.semanticformsinputs.datepicker ResourceLoaderFileModule 
[Called from OutputPage::getModuleStyles in C:\Apache\htdocs\mediawiki\includes\OutputPage.php at line 621] in 
C:\Apache\htdocs\mediawiki\includes\debug\MWDebug.php on line 300

In the console:

Uncaught ReferenceError: jQuery is not defined

I can find a lot of references on style module should define its position explicitly but I don't know how to fix this. There is no SFI_Datepicker.css in the skins directory. Regards.

88.130.78.137 (talkcontribs)

For the style module should define its position explicitly the solution is this:

Go to the skins.json or extension.json file of the skin or extension, which defines the jquery.ui.datepicker module.

Then in the configuration of that module, add an entry for its position. E.g.

	"ResourceModules": {
		"jquery.ui.datepicker.styles": {
			"position": "top",
			"styles": {
				...
CayceP (talkcontribs)

What do I do if I get this on a custom skin that does not have a skins.json?

Kc5vcx (talkcontribs)

I'm also having the issue with datepicker in MW 1.26.0 and not sure how to fix it, getting these messages in debugger console...

Warning OutputPage::getModuleStyles: style module should define its position explicitly: ext.semanticformsinputs.datepicker ResourceLoaderFileModule OutputPage::getModuleStyles
Warning OutputPage::getModuleStyles: style module should define its position explicitly: jquery.ui.datepicker ResourceLoaderFileModule OutputPage::getModuleStyles
Kc5vcx (talkcontribs)

For anybody else having this problem, it's in resources/Resources.php. This works now.

'jquery.ui.datepicker' => array(

    'position' => 'top',

    'scripts' => 'resources/lib/jquery.ui/jquery.ui.datepicker.js',

       

Topic:Sthbopqp2podznfo

Ralfk (talkcontribs)

Hm, datapicker does also not work for me any more after updating to MW 1.26 (stable). Even the workaround with '''position' => 'top'" does not help.

Ralfk (talkcontribs)

Oh, just wait - after a while (even though I restarted Apache and reloaded the form different times) the datepicker appears now. The workaround seemed to fix it in deed.

Kc5vcx (talkcontribs)

I'm actually still having intermittent issues with mine too, in cases with multiple instances some work and some don't. In chrome inspector I see this error "Uncaught ReferenceError: jQuery is not defined", looking at the html source it doesn't appear that the jquery script includes are at the very top of the list.

Kc5vcx (talkcontribs)
F.trott (talkcontribs)

Datepicker was fixed and transferred to SemanticForms 3.4.3. It was removed from SFI 0.10.

Kc5vcx (talkcontribs)

Updated and after a quick check looks fixed, thanks!