Mistakes and Bugs in the Book

Or at least my misunderstandings!

I’ve read through the whole book pretty much, with specific focus on things I’ll be using.
As the book[s] is so well technically written I wondered if you’d want the errors/misunderstandings I came across. So here’s my list: -

https://book.cakephp.org/4/en/orm/retrieving-data-and-resultsets.html#custom-finder-methods
I think I’m missing something significant here.
The code refers to finding the owner but the text is about finding published articles. Should the code be something like: -

use Cake\ORM\Query;
use Cake\ORM\Table;

class ArticlesTable extends Table
{
    public function findPublished(Query $query, array $options)
    {
        return $query->where(['published' => true]);
    }
}

$query = $articles->find('published');

(Although I do appreciate the example of how to pass options as an associative array as the exclamation states.)


https://book.cakephp.org/4/en/core-libraries/security.html#hashing-data
Typo: algorithmn


https://book.cakephp.org/4/en/tutorials-and-examples/cms/authorization.html#checking-authorization-in-the-articlescontroller
From: -
“The AuthorizationComponent::authorize() method will use the current controller action name”
To: -
“The $this->Authorization->authorize() method will use the current controller action name”


https://book.cakephp.org/4/en/core-libraries/text.html#wrapping-text
Why are the words “This” in italics after the // Returns?


https://book.cakephp.org/4/en/index.html
What is Elasticsearch? It is a dead link. (Last Plugin on left menu.)


Thanks so much for an amazing product and such excellent documentation.
Now I’ll be starting to use it soon, so expect more grief from me!! :slight_smile:

Cheers
Jonathan

1 Like

Hi Jonathan,

Thank you so much for taking the time to report these - would you mind adding them as issues on the Cookbook repository? https://github.com/cakephp/docs (so that the team can track and comment on them)

You are also more than welcome to open up pull requests fixing these issues - we value, encourage and welcome users of CakePHP to be involved and contribute!

Happy baking!

Megan
CakePHP Community manager

I’ll do that thanks.

Though it really does seem so awfully presumptuous for me to be making corrections, I know so little and fear I am misunderstanding significant aspects. But obviously if that’s the best way to make it easier for those running this project then I’ll do all I can to help there. As long as the smart folks verify any change I attempt I’ll feel more comfortable :slight_smile:

1 Like

It’s also ok to just post an issue if you’re not comfortable making a change. But, please be clear about the issue. We have a lot of documentation written by many many people.

2 Likes