Bug Report #4644

Nothing said about adding Cookie::$salt to bootstrap in install docs but app will crash without this

Added by Valeriy Volkov almost 2 years ago. Updated about 1 year ago.

Status:ClosedStart date:11/01/2012
Priority:NormalDue date:
Assignee:Lorenzo Pisani% Done:

100%

Category:Web Site
Target version:3.3.1
Resolution:fixed Points:1

Description

Nothing said about adding Cookie::$salt to bootstrap in
http://kohanaframework.org/3.3/guide/kohana/install
install docs but app will crash without this.
Need to add.


Related issues

Related to Kohana v3.x - Bug Report #4643: No Cookie::$salt in bootstrap.php New 11/01/2012

Associated revisions

Revision ab4f1ebf
Added by Lorenzo Pisani over 1 year ago

reword the install.md documentation page (refs #4723 refs #4644)

Revision 0517f2fb
Added by Lorenzo Pisani over 1 year ago

Merge pull request #357 from rjd22/3.3/bugfix/cookie_salt_message

Make Cookie Salt exception message more informative.
Refs #4644

Revision c4d54fbb
Added by Lorenzo Pisani over 1 year ago

Better Cookie::$salt docs (refs #4723 refs #4644)

Revision dc325e45
Added by Lorenzo Pisani over 1 year ago

Fix documentation typo for Cookie::$salt docs (refs #4723 refs #4644)

History

#1 Updated by Lorenzo Pisani almost 2 years ago

  • Status changed from New to Assigned
  • Assignee set to Lorenzo Pisani
  • Target version set to 3.3.1

#2 Updated by Jeremy Bush almost 2 years ago

  • Status changed from Assigned to Closed
  • Resolution set to wontfix

It's already in the docs: http://kohanaframework.org/3.3/guide/kohana/cookies

You don't need this set to "install" a fresh kohana codebase, as long as you don't have any local cookies on your machine. I do not think we should be duplicating any documentation.

#3 Updated by Valeriy Volkov almost 2 years ago

If you download and install clean kohana.
And try to run "hello world" using http://kohanaframework.org/3.3/guide/kohana/install
you will get error "A valid cookie salt is required. Please set Cookie::$salt"
if your browser has any cookie to domain on which you install this kohana.
Which can happen often because developers can use different apps on their dev domains.

#4 Updated by Jeremy Bush almost 2 years ago

Right, and setting the cookie salt is already documented. Duplicating a documentation item is stupid.

It's been discussed to check for cookies in install.php, that's about as far as I would take this.

#5 Updated by Lorenzo Pisani almost 2 years ago

The documentation definitely needs updating. It's simply not good right now.

#6 Updated by Jeremy Bush almost 2 years ago

The documentation says exactly what to do:

http://kohanaframework.org/3.2/guide/kohana/cookies#cookies

The only way you'd miss this is if you didn't read the documentation.

#7 Updated by Lorenzo Pisani almost 2 years ago

That page isn't even correct… we need to fix the Cookie documentation… I don't care of it's part of the install page or the Cookie pages.

#8 Updated by Lorenzo Pisani almost 2 years ago

Nothing stops you from using $_COOKIE like normal

That isn't correct.

#9 Updated by Valeriy Volkov almost 2 years ago

Jeremy Bush wrote:

The documentation says exactly what to do:

http://kohanaframework.org/3.2/guide/kohana/cookies#cookies

The only way you'd miss this is if you didn't read the documentation.

I downloaded fresh 3.3 kohana and open Getting Started http://kohanaframework.org/3.3/guide/kohana/install
After i finish all steps described there i receive above error.
Why to confuse users with any problems. I spent extra 10 inutes to analalyse source code and docs trying to understand where this must be initialized.

#10 Updated by Lorenzo Pisani almost 2 years ago

  • Status changed from Closed to Assigned
  • Resolution deleted (wontfix)

Had a long discussion on IRC and I will be looking into how to improve documenting this issue. We will also add a more forceful exception to our code but that can be a different ticket. We also plan on fixing this properly in 3.4 because we can make some small API changes to make this functionality much clearer and friendlier.

#11 Updated by Robert-Jan Dreu -rjd22- over 1 year ago

I've added a pull request for this:

- Added documentation on the cookie salt to the docs
- Made the error more explicit telling them to add it to bootstrap.php en referencing them to the documentation.

https://github.com/kohana/core/pull/353

#12 Updated by Robert-Jan Dreu -rjd22- over 1 year ago

I've added a pull request for this:

- Added documentation on the cookie salt to the docs
- Made the error more explicit telling them to add it to bootstrap.php en referencing them to the documentation.

https://github.com/kohana/core/pull/353

#13 Updated by Robert-Jan Dreu -rjd22- over 1 year ago

I've added a pull request for this:

- Added documentation on the cookie salt to the docs
- Made the error more explicit telling them to add it to bootstrap.php en referencing them to the documentation.

https://github.com/kohana/core/pull/353

#14 Updated by Robert-Jan Dreu -rjd22- over 1 year ago

I've added a pull request for this:

- Added documentation on the cookie salt to the docs
- Made the error more explicit telling them to add it to bootstrap.php en referencing them to the documentation.

https://github.com/kohana/core/pull/353

#15 Updated by Robert-Jan Dreu -rjd22- over 1 year ago

I've added a pull request for this:

- Added documentation on the cookie salt to the docs
- Made the error more explicit telling them to add it to bootstrap.php en referencing them to the documentation.

https://github.com/kohana/core/pull/353

#16 Updated by Robert-Jan Dreu -rjd22- over 1 year ago

I've added a pull request for this:

- Added documentation on the cookie salt to the docs
- Made the error more explicit telling them to add it to bootstrap.php en referencing them to the documentation.

https://github.com/kohana/core/pull/353

#17 Updated by Lorenzo Pisani over 1 year ago

I've already added a mention to the cookie salt in the install docs. I'm not sure the exception has to be changed for this (exceptions are not documentation).

#18 Updated by Robert-Jan Dreu -rjd22- over 1 year ago

I think it should since it's an install requirement. People can easily trigger this by trying out Kohana and get confused by the whole problem of getting it to work. So we do best to tell them where cookie salt should be added and send them to the documentation.

#19 Updated by Lorenzo Pisani over 1 year ago

Fair enough… it's our fault that Kohana requires a salt in 3.3 (we're fixing this in 3.4) so if you just fix the pull request I'll merge it in. I left you details on IRC :)

For reference, I made a PR where I will be rewriting a lot of documentation: https://github.com/kohana/core/pull/355 feel free to leave comments or even send PRs for documentation to that feature branch!

#20 Updated by Lorenzo Pisani about 1 year ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100
  • Resolution set to fixed

Merged my documentation changes so I think this is good to close.

Also available in: Atom PDF