Last modified: 2013-06-18 15:07:40 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 T29559, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27559 - Preserve tab selection after submit in [[Special:Preferences]]
Preserve tab selection after submit in [[Special:Preferences]]
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
unspecified
All All
: High enhancement with 2 votes (vote)
: ---
Assigned To: Pavel Selitskas [wizardist]
: patch
: 28907 (view as bug list)
Depends on: 29672
Blocks: 32811
  Show dependency treegraph
 
Reported: 2011-02-19 14:45 UTC by Fomafix
Modified: 2013-06-18 15:07 UTC (History)
7 users (show)

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


Attachments
PoC patch of this functionality (1.92 KB, patch)
2011-12-05 23:05 UTC, Derk-Jan Hartman
Details

Description Fomafix 2011-02-19 14:45:00 UTC
Bug 16013 (fixed in r81573) enabled to link the tabs (sections) in [[Special:Preferences]].

When I press Save the next page is http://en.wikipedia.org/w/index.php?title=Special:Preferences&success on the first tab.

It would be nice to continue on the same tab. When I am on the [[Special:Preferences#preftab-9]] the next page should be http://en.wikipedia.org/w/index.php?title=Special:Preferences&success#preftab-9
Comment 1 Krinkle 2011-02-20 13:37:02 UTC
The <form> element's action attribute could be given the hash value via JavaScript when submitting it,

ie.
<form action="http://en.wikipedia.org/wiki/Special:Preferences" method="post" 

would become:
<form action="http://en.wikipedia.org/wiki/Special:Preferences#preftab-9" method="post" 

However it is impossible to read the hash value from PHP, thus when PHP directs the client to &success or something it won't preserve the hash tag.

Marking as LATER, perhaps one day PHP will be able to do this.
Comment 2 Krinkle 2011-02-20 13:40:48 UTC
Reopening this one.

Although PHP can't read it from the address, it could be submitted as a paramter:


would become:
<form action="http://en.wikipedia.org/wiki/Special:Preferences?hash=preftab-9" method="post"

Then php can take that and convert it internally (back) to #hash.

JavaScript would hook into submit-event and append:

<input type="hidden" name="hash" value=" (attribute escape!) window.location.hash "/>

and in PHP, where it redirects the client append (if not empty) '#' . $params['hash'].



A small note though:
One can change settings of multiple panels of the preferences (ie. changing something under Editing, then General, then Gadgets) and click save on Gadgets will save them all.
Comment 3 Niklas Laxström 2011-02-20 16:04:57 UTC
(In reply to comment #2)
> A small note though:
> One can change settings of multiple panels of the preferences (ie. changing
> something under Editing, then General, then Gadgets) and click save on Gadgets
> will save them all.

That too is usability issue, although a different one from this bug.
Comment 4 Fomafix 2011-02-21 15:22:19 UTC
Maybe it's possible to save the settings via Ajax and do not change the location.
Comment 5 Brion Vibber 2011-05-10 17:33:49 UTC
*** Bug 28907 has been marked as a duplicate of this bug. ***
Comment 6 Brion Vibber 2011-05-10 17:34:34 UTC
Updated summary to clarify what it's about.
Comment 7 Derk-Jan Hartman 2011-12-05 23:05:01 UTC
Created attachment 9618 [details]
PoC patch of this functionality

So something like this.

TODO: escape request value -> queryparam value.

Still looks a bit clumsy...
don't really see another way though, with the redirect stripping fragments on most browsers.
Comment 8 Fomafix 2012-08-30 06:38:54 UTC
Since I0d6c654a7354ba77e65e338423952a6a78c1150f it should be possible to change the preferences via API and it should be possible to save the settings without leaving the page.
Comment 9 Pavel Selitskas [wizardist] 2013-01-12 01:26:44 UTC
I submitted a patch into gerrit: I7b7f14a6, although it works via sessionStorage (working with cookies made me cry with blood this night).

(In reply to comment #8)
> Since I0d6c654a7354ba77e65e338423952a6a78c1150f it should be possible to
> change
> the preferences via API and it should be possible to save the settings
> without
> leaving the page.

Perhaps, saving via API should be implemented in Special:Preferences (and without a Save button!).
Comment 10 Nemo 2013-02-11 09:15:15 UTC
Merged by Nikerabbit.
HTML5-only: support for old browsers is WONTFIX'ed I guess (after all they've lived with it for so many years).

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


Navigation
Links