https://bugzilla.wikimedia.org/show_bug.cgi?id=35240
Web browser: ---
Bug #: 35240
Summary: Module state changes from server response should
trigger handlePending
Product: MediaWiki
Version: 1.17
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Resource Loader
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
This rarely happens in production, but if a module is loaded that doesn't exist
(or can't be returned through load.php because it's private), then the server
will (or should) respond with a mw.loader.setState() call.
It currently does this in 2 scenarios:
* When using only=scripts (usually setting 'ready')
* When the module doesn't exist (setting state missing')
The former has a work around currently, but the latter is a problem. getState
only sets the state in the registry, doesn't cause pending callbacks to be
handled.
When outright requesting a random inexisting module, all will be fine because
the client loader has a registry and won't try to request it if it doesn't
exist. But if a module existed at time the startup module was cached but not at
time of calling, then the server will (because ResourceLoader does account for
this case) respond with setState(.., 'missing').
This case is accounted for because it is very easy to trigger during a
deployment:
* startup module is generated and cached, with the 2x 5 minute overlap this
could be about a 10 minutes overlap
* Aside from the possibility for module changes between generation of startup
module and client visiting another page, there's also a natural time lapse when
modules are loaded on demand. A user can visit a page, read it and have it open
for an hour (or longer) and then click something that lazy-loads a module. That
module can potentially no longer exist (we've seen this during the 1.19
deployment where jquery.mwPrototypes was renamed to jquery.mwExtension).
This bug is a reminder to Roan and I, we originally came across while doing a
very in-depth evaluation over the client loader code. Forgot to file earlier.
We should try to get this into 1.19.0
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l