Page MenuHomePhabricator

Port SemanticMediaWiki to ResourceLoader
Closed, ResolvedPublic

Description

Firebug sometimes says:

addOnloadHook(smw_sortables_init); is not defined

Appears when a query result of format table is on the page.

Need to figure out, why exactly, and remove the bug.


Version: unspecified
Severity: normal

Details

Reference
bz25381

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:22 PM
bzimport set Reference to bz25381.

With the new resource loader or without?

The two MediaWikis in question have both been rather recent versions from SVN trunk, so if resource loader is installed by deafult on them, then yes.

Try updating your semantic extensions, AFAIK addonloadhook has been removed from core because resource loader handles that, and I'm pretty sure the extensions have been updated to handle that.

It's not removed yet, but it is loader later. I think jQuery's ready() method is suitable replacement.

(In reply to comment #4)

It's not removed yet, but it is loader later. I think jQuery's ready() method
is suitable replacement.

Yes and yes. Use $(document).ready(function() { code here} );

I see several commits in this folder related to resource loader fixes. Are the errors still appearing / are there any components yet to be fixed due to changes by resourceloader ?

Removing dependancy on ResourceLoader 1.0 implementation. This is a seperate issue.

(In reply to comment #6)

I see several commits in this folder related to resource loader fixes. Are the
errors still appearing / are there any components yet to be fixed due to
changes by resourceloader ?

*bumping* the above question.

I think this can be closed. SMW no longer has its own copy of the sorting tables script and it is well integrated with ResourceLoader in general.