https://bugzilla.wikimedia.org/show_bug.cgi?id=34538

       Web browser: ---
             Bug #: 34538
           Summary: ext.vector.collapsibleNav does not initialise
                    correctly with
                    $wgResourceLoaderExperimentalAsyncLoading
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Vector
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---


Created attachment 10048
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=10048
Flush and sleep in skins/Vector.php to give time for RL to finish before the
main document finishes loading

With $wgResourceLoaderExperimentalAsyncLoading enabled, modules are loaded from
the <head> rather than from the end of the <body>. This causes the modules to
be loaded simultaneously with the main HTML, and under certain conditions,
module execution may occur before the #mw-panel element appears in the DOM. 

ext.vector.collapsibleNav in particular does not register a $(document).ready()
callback, it just tries to modify the DOM at the file level of the module. No
errors are logged, $( '#mw-panel' ) just returns an empty list and the styling
is not applied. Other modules may have similar issues with
$wgResourceLoaderExperimentalAsyncLoading. 

Bug 34450 may possibly be related but there were a lot of issues mixed in there
without any reproduction procedure so I decided to file a new bug. 

Whether or not you see the issue depends on the browser, page length, network
speed and cache timing details, but it's possible to reliably reproduce it by
slowing down page delivery with the attached flush/sleep patch, and setting
MW_NO_OUTPUT_BUFFER in LocalSettings.php:

define( 'MW_NO_OUTPUT_BUFFER', 1 );

Using that method, I can reproduce it every time in Firefox or Chrome.

-- 
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

Reply via email to