mainSavannah Administration - Support: sr #109694, replace SV_THEME cookie with db...

 
 

sr #109694: replace SV_THEME cookie with db stored user preference

Submitter:  Peter Liscovius <peterdd>
Submitted:  Thu 06 Jun 2019 08:17:30 AM UTC
   
 
Category:  Savannah website Priority:  3 - Low
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  ineiev
Operating System:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 24 Jun 2019 09:27:33 AM UTC, comment #5: 

Done. I didn't completely eliminate cookies, so inconsistencies are still possible.

Ineiev <ineiev>
Site Administrator
Fri 21 Jun 2019 08:27:11 AM UTC, comment #4: 

If we provide a way to select themes for anonymous users (e.g. as an accessibility feature), we may have to use cookies.

What we could do is override cookies when the user is logged in, and set the cookies to consistent values.

Ineiev <ineiev>
Site Administrator
Wed 19 Jun 2019 07:51:10 PM UTC, comment #3: 

Yea, extra themes in addition to a default theme is not important.

Netherless it is still very confusing together with the SV_THEME cookies on both domains savannah.gnu.org and savannah.nongnu.org
as each stores cookie in browser separate value for the duration of the session.

Try:

1. Clear browser cookies (or retest later without clearing them in a second test)
2. Login on savannah.gnu.org with login to 'brother nongnu' checked box.
3. Go straight 'My Account Conf' https://savannah.gnu.org/my/admin/ (watch gnu/nongnu)
4. Change theme dropdown, click 'Update'. (Looks ok, it looks like savannah, also SV_THEME of savannah.gnu.org cookie changes to Savannah)
5. Follow link to the brother site, like clicking 'Get support' for going to https://savannah.nongnu.org/support/?group=administration
   BAM! The savannah.nongnu.org shows a different theme and SV_THME cookie of savannah.nongnu.org is the other theme name.
6. Click 'My Account Conf' https://savannah.nongnu.org/my/admin/ (watch the diiference to point 3.!)
7. Change theme dropdown to 'DarkSlate', click .Update'. (Looks like DarkSlate, SV_THEME of savannah.nongnu.org cookie changed to DarkSlate)
8. Click left bottom link 'Gnu Savannah' savannah.gnu.org .
   BAM! Then savannah.gnu.org shows not the DarkSlate, but the Savannah theme.

As both sites use the same database, it is IMHO not necessary to set any SV_THEME cookie or read any SV_THEME cookie, as the information can be read from savane user database (and probably possible without the cost of an extra sql query because user info must be read in any case from database?)

Peter Liscovius <peterdd>
Thu 06 Jun 2019 09:28:59 AM UTC, comment #2: 

SV_THEME is stored in user preferences; in fact, you can only handle it (with Savannah UI) when logged-in.

Yes, having Siamese twin websites *.gnu.* and *.nongnu.* results in inconsistencies, but I don't think this is important.

Ineiev <ineiev>
Site Administrator
Thu 06 Jun 2019 08:17:30 AM UTC, comment #1: 

This item has been reassigned from the project Savannah Administration task tracker to your tracker.

The original report is still available at task #15298

Following are the information included in the original report:

[field #0]                  Item ID: 15298

[field #1]                 Group ID: 5802

[field #2]              Open/Closed: Open

[field #3]                 Severity: 3 - Normal

[field #4]                  Privacy: Public

[field #8]                         : Unknown task Field Display Type

[field #9]                 Category: Approved Projects to be Reviewed

[field #10]             Submitted by: peterdd

[field #11]              Assigned to: None

[field #12]             Submitted on: Thu 06 Jun 2019 01:14:59 AM UTC

[field #13]                  Summary: replace SV_THEME cookie with db stored user preference

[field #14]      Original Submission: My web browser is intentional configured to delete all cookies when closed.

This makes setting a theme cookie in savannah quite useless for such dudes like me.

Also savannah.nongnu.org and savannah.gnu.org store each their own SV_THEME cookie, so setting the theme on one site does not apply to the other site.

A solution to this would be storing the theme setting in a database field of the user.

Also while watching the cookies in web develeoper tools I saw the SV_THEME cookie was sometimes stored with different Domain range:

Name     Domain
SV_THEME .savannah.nongnu.org
SV_THEME savannah.nongnu.org


[field #16]               Item Group: None

[field #17]                   Status: None

[field #18]        Component Version: None

[field #19]         Operating System: None

[field #20]          Reproducibility: None

[field #21]               Size (loc): None

[field #22]            Fixed Release: None

[field #23]          Planned Release: None

[field #24]                   Effort: 0.00

[field #28]                 Priority: 3 - Low

[field #29]          Should Start On: Wed 05 Jun 2019 10:00:00 PM UTC

[field #30]    Should be Finished on: Wed 05 Jun 2019 10:00:00 PM UTC

[field #31]         Percent Complete: 0%

[field #33]                  Release: None

[field #58]     Custom Select Box #1: None

[field #59]     Custom Select Box #2: None

[field #60]     Custom Select Box #3: None

[field #61]     Custom Select Box #4: None

[field #62]     Custom Select Box #5: None

[field #63]     Custom Select Box #6: None

[field #64]     Custom Select Box #7: None

[field #65]     Custom Select Box #8: None

[field #66]     Custom Select Box #9: None

[field #67]    Custom Select Box #10: None


Ineiev <ineiev>
Site Administrator
Thu 06 Jun 2019 08:17:30 AM UTC, original submission:  

My web browser is intentional configured to delete all cookies when closed.

This makes setting a theme cookie in savannah quite useless for such dudes like me.

Also savannah.nongnu.org and savannah.gnu.org store each their own SV_THEME cookie, so setting the theme on one site does not apply to the other site.

A solution to this would be storing the theme setting in a database field of the user.

Also while watching the cookies in web develeoper tools I saw the SV_THEME cookie was sometimes stored with different Domain range:

Name     Domain
SV_THEME .savannah.nongnu.org
SV_THEME savannah.nongnu.org

Peter Liscovius <peterdd>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ineiev (Updated the item)
  • -email is unavailable- added by peterdd (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-06-24 ineiev StatusIn Progress Done
        Open/ClosedOpen Closed
    2019-06-20 ineiev StatusNeed Info In Progress
        Open/ClosedClosed Open
    2019-06-10 ineiev Open/ClosedOpen Closed
    2019-06-06 ineiev StatusIn Progress Need Info
    2019-06-06 ineiev CategoryNone Savannah website
        StatusNone In Progress
        Assigned toNone ineiev
    2019-06-06 ineiev Reassign itemSavannah Administration, task #15298 Savannah Administration, sr #109694

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code