Last modified: 2014-05-17 08:58:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56886, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54886 - Print/export default state is now indeterminate: *Settings.php problem?
Print/export default state is now indeterminate: *Settings.php problem?
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.22.0
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
: browser-test-bug
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-02 16:49 UTC by Chris McMahon
Modified: 2014-05-17 08:58 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
print/export and expand/collapse issues (157.89 KB, image/png)
2013-10-02 16:49 UTC, Chris McMahon
Details
firefox javascript console log when the test passes - print/export is expanded (6.19 KB, text/plain)
2013-10-09 15:17 UTC, Željko Filipin
Details
firefox javascript console log when the test fails - print/export is collapsed (7.62 KB, text/plain)
2013-10-09 15:18 UTC, Željko Filipin
Details

Description Chris McMahon 2013-10-02 16:49:57 UTC
Created attachment 13424 [details]
print/export and expand/collapse issues

This may be a result of https://gerrit.wikimedia.org/r/#/c/83591/

Seen on beta labs as of Oct 2. 

See browsers in screenshot displaying from left to right: 

* Print/export collapsed on initial page load
* Print/export expanded on initial page load
* Expand/collapse navigation controls not loaded in page
Comment 1 Jon 2013-10-02 16:55:58 UTC
The screenshot has me a little confused.. what exactly is wrong? When I visit http://en.wikipedia.beta.wmflabs.org/w/index.php?title=Main_Page&mobileaction=toggle_view_desktop I see the collapsed print/export section.
If I open it and refresh page it remains open.

I'm not seeing what exactly is the bug here? Does it effect a certain browser only?
Comment 2 Chris McMahon 2013-10-02 17:05:33 UTC
I just reproduced the issue manually in Firefox by doing this: 

* create five empty tabs
* into the address bar of each tab paste http://en.wikipedia.beta.wmflabs.org/wiki/Special:Random
* hit ENTER on all five tabs quickly

Some of the resulting pages have the Print/export dialog open, some have them closed. 

When doing this with automated tests in particular, I also often see a case where the expand/collapse styling is not loaded at all.  We have broken this before in similar ways.
Comment 3 Jon 2013-10-02 17:22:22 UTC
I just tried this various times and it always seems to work for me...
If they are not collapsed at all that sounds like the JavaScript isn't executing for some reason - either due to a JavaScript exception somewhere or the JavaScript not running.

You will get inconsistent behaviour with the print/export between tabs if in any of those tabs a menu is toggled open or closed as the menu's are supposed to be sticky.
Comment 4 Chris McMahon 2013-10-02 17:43:10 UTC
See screen shot at bottom of the page from the end of the automated test: https://saucelabs.com/jobs/160816806c254073ad48cca43849400d.  The expand/collapse javascript is not in the page. 

This test with the result above ran today in beta labs for Firefox:  https://wmf.ci.cloudbees.com/job/browsertests-en.wikipedia.beta.wmflabs.org-linux-firefox/360/testReport/(root)/Print_Export%20menu%20Expand%20and%20Collapse/Print_export_section_collapses_after_it_is_expanded/

At no time in any of these screen shots or repros has the user clicked on Print/export.  I can reproduce this manually, and in the automated tests, and we have a history of breaking the expand/collapse functions.
Comment 5 Gerrit Notification Bot 2013-10-02 19:29:19 UTC
Change 87198 had a related patch set uploaded by Cmcmahon:
Print/export open by default on test2wiki. see Bug 54886 for beta

https://gerrit.wikimedia.org/r/87198
Comment 7 Gerrit Notification Bot 2013-10-03 15:09:48 UTC
Change 87198 merged by Zfilipin:
Print/export open by default on test2wiki. see Bug 54886 for beta

https://gerrit.wikimedia.org/r/87198
Comment 8 Željko Filipin 2013-10-09 14:42:22 UTC
I was able to reproduce this on my machine.

I have executed this test 5 times:

$ bundle exec cucumber features/print_export_menu.feature:4

4/5 times it broke because the print/export menu was collapsed.

$ bundle exec cucumber features/print_export_menu.feature:4
Using the default profile...
.F

(::) failed steps (::)

expected visible? to return true, got false (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/print_export_menu_steps.rb:13:in `block (2 levels) in <top (required)>'
./features/step_definitions/print_export_menu_steps.rb:11:in `/^Print\/export section should be expanded$/'
features/print_export_menu.feature:6:in `Then Print/export section should be expanded'

Failing Scenarios:
cucumber features/print_export_menu.feature:4 # Scenario: Check for Print/export section Expanded

1 scenario (1 failed)
2 steps (1 failed, 1 passed)
0m7.363s

1/5 times it passed, because print/export menu was expanded:

$ bundle exec cucumber features/print_export_menu.feature:4
Using the default profile...
..

1 scenario (1 passed)
2 steps (2 passed)
0m8.831s

I will post the results from the javascript console.
Comment 9 Željko Filipin 2013-10-09 15:17:38 UTC
Created attachment 13453 [details]
firefox javascript console log when the test passes - print/export is expanded
Comment 10 Željko Filipin 2013-10-09 15:18:19 UTC
Created attachment 13454 [details]
firefox javascript console log when the test fails - print/export is collapsed
Comment 11 Željko Filipin 2013-10-09 15:19:10 UTC
I have uploaded two firefox javascript console logs, when the test passes and when the test fails. Let me know if anything else would be useful.
Comment 12 Greg Grossmeier 2013-10-09 21:38:44 UTC
(patched linked was 'just' a browsertest change)
Comment 13 Greg Grossmeier 2013-10-10 17:24:14 UTC
Jon: Do Zeljko's javascript console logs help you diagnose this?
Comment 14 Jon 2013-10-10 19:39:34 UTC
One theory - is the Vector extension still deployed on that server? If so it should probably be removed as the functionality was removed from it to here and if this code exists twice it in the instance you are testing against it will indeed break.

I'm still unable to replicate this and nope the console logs shed no light...
Comment 15 Chris McMahon 2013-10-11 14:46:29 UTC
do the Settings.php files need updating?

/config/mediawiki-config/wmf-config$ grep -r 'Vector' *
CommonSettings.php:	require( "$IP/extensions/Vector/Vector.php" );
CommonSettings.php:		$wgVectorFeatures['collapsiblenav'] =
CommonSettings.php:	$wgVectorFeatures['simplesearch'] = array( 'global' => true, 'user' => false );
CommonSettings.php:	$wgVectorFeatures['expandablesearch'] = array( 'global' => false, 'user' => false );
CommonSettings.php:	$wgVectorUseSimpleSearch = true;
CommonSettings.php:	if ( $wmgVectorSectionEditLinks ) {
CommonSettings.php:		$wgVectorFeatures['sectioneditlinks'] = array( 'global' => false, 'user' => true );
CommonSettings.php:		$wgVectorSectionEditLinksBucketTest = true;
CommonSettings.php:		$wgVectorSectionEditLinksLotteryOdds = 1;
CommonSettings.php:		$wgVectorSectionEditLinksExperiment = 2;
CommonSettings.php:if ( !$wmgEnableVector ) {
CommonSettings.php:if ( $wmgUseMicroDesign || $wmgUseVectorFooterCleanup ) {
CommonSettings.php:	$wgVectorFeatures['footercleanup']['global'] = true;
extension-list:$IP/extensions/Vector/Vector.php
InitialiseSettings.php:'wmgEnableVector' => array(
InitialiseSettings.php:'wgVectorUseIconWatch' => array(
InitialiseSettings.php:'wgVectorShowVariantName' => array(
InitialiseSettings.php:'wmgVectorSectionEditLinks' => array(
InitialiseSettings.php:'wmgUseVectorFooterCleanup' => array(
Comment 16 Bartosz Dziewoński 2013-10-11 14:54:12 UTC
They should not need updating (but I submitted a patch to clean them up a few days ago at https://gerrit.wikimedia.org/r/#/c/87731/).
Comment 17 Gerrit Notification Bot 2013-10-18 14:04:14 UTC
Change 90547 had a related patch set uploaded by Cmcmahon:
only run on test2 until Bug 54886 resolved

https://gerrit.wikimedia.org/r/90547
Comment 18 Gerrit Notification Bot 2013-10-18 14:42:37 UTC
Change 90547 merged by Zfilipin:
only run on test2 until Bug 54886 resolved

https://gerrit.wikimedia.org/r/90547
Comment 19 Bartosz Dziewoński 2013-12-19 15:42:55 UTC
Is this still happening?
Comment 20 Chris McMahon 2013-12-20 20:52:07 UTC
(In reply to comment #19)
> Is this still happening?

a cursory glance shows that the Print/export menu is (for me as anon at least)

* expanded on test2wiki
* collapsed on mediawiki.org
* expanded on beta labs

I haven't really investigated what controls this, or why Print/export is different than other left-side nav menus.
Comment 21 Bartosz Dziewoński 2013-12-22 22:29:39 UTC
I can't reproduce. Are you visiting these pages with cleared cookies? (Or in private browsing mode?)

The behavior should be the same on all sites:
* First portlet has no header, is always expanded and non-collapsible
* Second portlet is collapsible, but expanded by default
* The remaining portlets are collapsible and collapsed
Comment 22 Bartosz Dziewoński 2013-12-22 22:30:07 UTC
(And the collapse state is remembered across page visits in cookies.)
Comment 23 Nemo 2014-05-17 08:58:42 UTC
Looks solved by bug 39035.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links