# |
Jun 23rd 2018, 19:07 |
mamchenkov |
hmm ... maybe it actually works and it's my phpunit that freaks out ... cakephp 1.2 was so much simpler :) |
# |
Jun 23rd 2018, 18:49 |
mamchenkov |
in CakePHP 3.6, I need either a controller without a model, or a model without a database table ... I tried setting $uses=false in controller and $this->modelClass=false in initialize() .. but neither worked .. any suggestions? |
# |
Jun 23rd 2018, 18:48 |
mamchenkov |
hello |
# |
Jun 23rd 2018, 17:17 |
HumanG33k |
It’s look like my FK field name is too long. How can i shortcut it and always follow cake conventions |
# |
Jun 23rd 2018, 17:16 |
HumanG33k |
Me again. |
# |
Jun 23rd 2018, 14:49 |
HumanG33k |
and i follow that doc https://book.cakephp.org/3.0/en/migrations.html |
# |
Jun 23rd 2018, 14:48 |
HumanG33k |
i try bin/cake bake migration_snapshot Initial |
# |
Jun 23rd 2018, 14:48 |
HumanG33k |
PHP Fatal error: Uncaught InvalidArgumentException: The plugin class `Migrations\Plugin` cannot be found. Ensure your autoloader is correct. |
# |
Jun 23rd 2018, 14:48 |
HumanG33k |
but i have an error |
# |
Jun 23rd 2018, 14:47 |
HumanG33k |
i try to use migration plugin |
# |
Jun 23rd 2018, 14:47 |
HumanG33k |
Hello |
# |
Jun 23rd 2018, 14:39 |
saeideng |
:+1: |
# |
Jun 23rd 2018, 14:39 |
akkaweb |
Ok.. thanks for your input. I will continue researching |
# |
Jun 23rd 2018, 14:39 |
saeideng |
you must load all helpers under `CMS.` for all pages |
# |
Jun 23rd 2018, 14:38 |
akkaweb |
if I go to a page mydomain.net/pages/about-us than all is good |
# |
Jun 23rd 2018, 14:38 |
akkaweb |
I will continue researching anyway |
# |
Jun 23rd 2018, 14:38 |
akkaweb |
the moment I go mydomain.net/login which uses a 3rd Party plugin, then my help is no longer found. |
# |
Jun 23rd 2018, 14:37 |
akkaweb |
It is. But I really think it is an issue because if I go to mydomain.net than everything is good |
# |
Jun 23rd 2018, 14:25 |
saeideng |
and no needed to issue on github :) |
# |
Jun 23rd 2018, 14:25 |
saeideng |
it is not bug then :slightly_smiling_face: |
# |
Jun 23rd 2018, 14:25 |
saeideng |
so you need to load it before using it |
# |
Jun 23rd 2018, 14:24 |
saeideng |
it is from other plugin ? |
# |
Jun 23rd 2018, 14:24 |
saeideng |
why `CMS.`? |
# |
Jun 23rd 2018, 14:24 |
saeideng |
:+1: |
# |
Jun 23rd 2018, 14:24 |
akkaweb |
Thank you! That will solve the problem for now |
# |
Jun 23rd 2018, 14:23 |
akkaweb |
Your suggestion works though. So I added '$this->viewBuilder()->helpers(['CMS.CmsBlocks']);` to my Application beforeRender() function. |
# |
Jun 23rd 2018, 14:23 |
saeideng |
or waiting for other members to tell you it is possible to use helper in an overridden element or not |
# |
Jun 23rd 2018, 14:23 |
akkaweb |
I will open a bug issue |
# |
Jun 23rd 2018, 14:23 |
akkaweb |
I really think that is a bug because it only fails when using a 3rd party plugin |
# |
Jun 23rd 2018, 14:22 |
saeideng |
if you are sure for your problem , you can Open an Issue on github |
# |
Jun 23rd 2018, 14:21 |
saeideng |
do you read the book about this |
# |
Jun 23rd 2018, 14:18 |
saeideng |
I prefer to load helper in` beforeRender` Callback |
# |
Jun 23rd 2018, 14:18 |
akkaweb |
Ok.. .I can try that |
# |
Jun 23rd 2018, 14:18 |
saeideng |
yes , you can |
# |
Jun 23rd 2018, 14:17 |
akkaweb |
in my AppController? |
# |
Jun 23rd 2018, 14:17 |
saeideng |
and see result |
# |
Jun 23rd 2018, 14:17 |
saeideng |
load your helper in controller before using |
# |
Jun 23rd 2018, 14:17 |
saeideng |
so ' i'm not sure |
# |
Jun 23rd 2018, 14:16 |
saeideng |
I never used helper in these cases |
# |
Jun 23rd 2018, 14:16 |
akkaweb |
I know... I am pulling my hair. Is it my mistake somewhere or a bug? |
# |
Jun 23rd 2018, 14:16 |
saeideng |
`load('CakeDC/Users.Cm...')` |