# |
Jul 9th 2017, 18:53 |
manuweg |
foolish me |
# |
Jul 9th 2017, 18:52 |
admad |
do you admin and non admin controller classes have proper namespace? |
# |
Jul 9th 2017, 18:50 |
manuweg |
Any ideas? |
# |
Jul 9th 2017, 18:49 |
manuweg |
the line that is quoted for causing the error is at the very end of the controller |
# |
Jul 9th 2017, 18:48 |
manuweg |
I am not redeclaring the class |
# |
Jul 9th 2017, 18:48 |
manuweg |
Fatal error: Cannot redeclare class Shop\App\Controller\ProductsController in /Users/wegmershaus/Dropbox/Websites/public_html/cttpcake/plugins/Shop/src/Controller/ProductsController.php on line 38 |
# |
Jul 9th 2017, 18:47 |
manuweg |
I get a fatal error for the non-admin controller functions |
# |
Jul 9th 2017, 18:47 |
manuweg |
sorry the other way around - the admin methods work fine |
# |
Jul 9th 2017, 18:47 |
manuweg |
the non-admin methods that I have baked work fine |
# |
Jul 9th 2017, 18:47 |
manuweg |
I have a plugin which has admin and non-admin methods |
# |
Jul 9th 2017, 16:34 |
smarty24 |
Hi CakePHPers, I would like to know how many parameters does the GET method from the AppController take? I am trying to return an ID and Token |
# |
Jul 8th 2017, 19:35 |
bordplate |
``` class UsersControllerTest extends IntegrationTestCase { public function setUp() { parent::setUp(); } public function testIndex() { $this->get('/'); $this->assertResponseOk(); } } ``` This is the test I’m trying to run. |
# |
Jul 8th 2017, 19:35 |
bordplate |
I tried that. And yeah, it’s the exact same content. |
# |
Jul 8th 2017, 19:30 |
admad |
@bordplate does tests boostrap look similar to this https://github.com/cakephp/app/blob/master/tests/bootstrap.php ? |
# |
Jul 8th 2017, 19:29 |
admad |
define the constant in your tests bootstrap |
# |
Jul 8th 2017, 19:10 |
slackebot |
/var/www/html/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestCase.php:371 /var/www/html/tests/TestCase/Controller/UsersControllerTest.php:20 ``` Anyone familiar with this? The constant is used in Cake libraries, so I can’t really change that code. |
# |
Jul 8th 2017, 19:10 |
bordplate |
I’m trying to add some simple unit tests to our webapp, but tests spit out this warning (error?): ``` Use of undefined constant TMP - assumed 'TMP' /var/www/html/vendor/cakephp/cakephp/src/Network/Session.php:143 /var/www/html/vendor/cakephp/cakephp/src/Network/Session.php:97 /var/www/html/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestCase.php:545 /var/www/html/vendor/cakephp/cakephp/src/TestSuite/IntegrationTestCase.php:452 |
# |
Jul 8th 2017, 16:47 |
spencdev |
Lol... just had to create an index for the columns in mysql. whoops. |
# |
Jul 8th 2017, 16:39 |
spencdev |
If I do inner joins, it always returns as record not found as either one associated table will be null, or the other one will be null |
# |
Jul 8th 2017, 16:32 |
spencdev |
My left joins are taking like 21000ms while inner joins 62ms... I'm trying to do two associations, either it can be associated with one table, or another table depending on a value in the 1st table. So I can't really do inner joins |
# |
Jul 8th 2017, 15:26 |
obinoob |
I've found it ;) thank you anyway |
# |
Jul 8th 2017, 15:08 |
obinoob |
I can't see an example in here https://book.cakephp.org/3.0/en/core-libraries/form.html#creating-html-with-formhelper |
# |
Jul 8th 2017, 15:07 |
obinoob |
any idea |
# |
Jul 8th 2017, 15:06 |
obinoob |
Hi I'm using a modeless form and everything works fine except for the errors that actually I can spot at _errors array index from debug kit I wonder how can I make them available in the view form? I would like to avoid pass the errors with the function set... |
# |
Jul 8th 2017, 12:32 |
dereuromark |
obinoop: you can try "dev-master as x.y" as concrete version |
# |
Jul 8th 2017, 11:33 |
admad |
"..but these conflict with your requirements or minimum-stability" errors tell you what the problem is |
# |
Jul 8th 2017, 11:32 |
admad |
you can't use "dev-master" of a lib since you have "minimium-stability": "stable" in your composer config |
# |
Jul 8th 2017, 10:46 |
obinoob |
Hi after composer update I getting this: Your requirements could not be resolved to an installable set of packages. please take a look at here: https://gist.github.com/fccpt/4cae4d4d30bb1ba9f5a9723b324e82cc |
# |
Jul 8th 2017, 10:12 |
birdy247 |
Where is the redirect query string built? |
# |
Jul 8th 2017, 09:59 |
rudy1976s |
when building relations on the fly I forgot to set the className with the original plugin.class name |
# |
Jul 8th 2017, 09:57 |
rudy1976s |
found my problem |
# |
Jul 8th 2017, 09:57 |
birdy247 |
Is there a helper class to build a redirect url? |
# |
Jul 8th 2017, 09:56 |
birdy247 |
The Auth.redirect session variable is no longer used. Instead a query string parameter is used to store the redirect URL. This has the additional effect of removing the ability to store a redirect URL in the session outside of login scenarios. |
# |
Jul 8th 2017, 09:39 |
rudy1976s |
in my controller I would expect to use Attributes in contain array isn’t it ? |
# |
Jul 8th 2017, 09:38 |
rudy1976s |
when make query I have error in contain because it search for a table attributes while the table in db is posts_attributes and set in initialize method too |
# |
Jul 8th 2017, 09:37 |
rudy1976s |
‘Attributes’ => [ ‘className’ => ‘Acm3Core.PostsAttributes’, ‘foreignKey’ => ‘post_id’, ‘dependent’ => true ], |
# |
Jul 8th 2017, 09:37 |
rudy1976s |
I have a post table associated with many PostsAttributes |
# |
Jul 8th 2017, 09:37 |
birdy247 |
example? |
# |
Jul 8th 2017, 09:37 |
rudy1976s |
cake 3.x |
# |
Jul 8th 2017, 09:36 |
rudy1976s |
A question: does contain in query support Table aliasing ? |
# |
Jul 8th 2017, 09:36 |
rudy1976s |
Hello good morning ! |