Hi,
I’m finally moving from cakePhp2 to Cakephp4
So I’ve decided to follow the CMS tutorial, and when adding the virtual field tag_string, there is something I don"t understand. (https://book.cakephp.org/4/fr/tutorials-and-examples/cms/tags-and-users.html)
In the beforeFilter function I’ve debug the $entity.
In this entity I can see the field ‘tag_string’ with the updated value (coming from the form), and if I try to debug $entity->tag_string, I can see the ‘old’ version of it, not the dirty version.
It seems it’s due to the protected function _getTagString that detect $this->_properties[‘tag_string’] as null.
So what am I missing?
I thought this function was really usefull, but I can’t seem to make it work.
I’ve checked on the Bookmark tuto as well, and it’s exactly the same code.
Thanks if someone comes by and help me
edit : I’ve tried changing the function _getTagString() to _getTagString($tag_string), and this way I can access the $tag_string (updated version) and it seems to be working.
Hope it can help someone else.
regards
Max