Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Column Cookies are set to expire on browser close #5014

Closed
2 tasks done
qlove72 opened this issue Feb 14, 2018 · 9 comments
Closed
2 tasks done

Table Column Cookies are set to expire on browser close #5014

qlove72 opened this issue Feb 14, 2018 · 9 comments
Milestone

Comments

@qlove72
Copy link

qlove72 commented Feb 14, 2018

Expected Behavior (or desired behavior if a feature request)

When selecting/deselecting column preferences, the options set are stored in a cookie. When the browser closes, Snipe reads the cookie and restores column preferences.


Actual Behavior

The cookie is set during the current browser session, but is set to expire once that browsing session ends. Upon closing and reopening any browser, the column preferences are reverted back to defaults.


Please confirm you have done the following before posting your bug report:


Provide answers to these questions:

  • Is this a fresh install or an upgrade? Upgrade (3.6.2 -> 4.1.10)
  • Version of Snipe-IT you're running v4.1.10
  • Version of PHP you're running 7.0.22-0ubuntu0.16.04.1
  • Version of MySQL/MariaDB you're running MySQL 5.7.19
  • What OS and web server you're running Snipe-IT on Ubuntu 16.04.3 / nginx/1.10.3
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) Docker
  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error No errors
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error Reproducible on any table that has modifiable columns
  • If a stacktrace is provided in the error, include that too. No errors
  • Any errors that appear in your browser's error console. No errors
  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo. Yes, reproducible on Demo page
  • Include any additional information you can find in storage/logs and your webserver's logs.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database No

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

https://snipe-it.readme.io/docs/getting-help

Screenshot of cookie in Google Chrome (Note expiry date at the bottom)
screen shot 2018-02-14 at 7 02 54 am

@snipe
Copy link
Owner

snipe commented Feb 14, 2018

The expiration date is set to 2 years

@qlove72
Copy link
Author

qlove72 commented Feb 14, 2018

Yes, that seems to be the expected behavior. However as you can see in my screenshot, the cookie that is set does not expire in two years. Rather, it expires once the browser session has ended.

@snipe
Copy link
Owner

snipe commented Feb 14, 2018

I don't even see that cookie in my Chrome session. :-/

screen shot 2018-02-14 at 7 26 44 am

@qlove72
Copy link
Author

qlove72 commented Feb 14, 2018

In my brief testing, it appears that the cookie is only set if you make a change to the columns.

For example, if you go to https://demo.snipeitapp.com/hardware and add/remove any of the options, the "hardware.index.bs.table.columns" cookie is then set. If you go to /users, the "users.index.bs.table.columns" cookie is set. It appears to set one for every table that is modified, all of which expire once the browser closes.

@snipe
Copy link
Owner

snipe commented Feb 14, 2018

Yeah, I was testing locally by turning columns off and on.

I did see this issue in the bootstrap tables library, but I haven't seen others complaining about this on their repo.

@snipe
Copy link
Owner

snipe commented Feb 14, 2018

Okay, I think I have this working locally. Still testing. Will check back.

@snipe
Copy link
Owner

snipe commented Feb 14, 2018

screen shot 2018-02-14 at 8 51 20 am

@qlove72
Copy link
Author

qlove72 commented Feb 14, 2018

That's strange. I just got finished standing up a fresh install of the most recent build on a Vagrant box and have the same table preferences problem.

Is there anything else I might be doing wrong?

image

@snipe
Copy link
Owner

snipe commented Feb 14, 2018

No, as I said, I almost have a fix for it. Was a bug in the JS library, I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants