# |
Apr 3rd 2019, 13:59 |
kieran.bowler |
Hi all, I'm having an issue on my production server. I'm just getting it setup now - works fine locally but on prod I'm getting: That file does exist though :S |
# |
Apr 3rd 2019, 13:59 |
isaiah |
please how can i do it |
# |
Apr 3rd 2019, 13:58 |
admad |
or in your view check the boolean value and show text value accordingly |
# |
Apr 3rd 2019, 13:58 |
admad |
don't use boolean if you want to save text label |
# |
Apr 3rd 2019, 13:57 |
isaiah |
it saves as 0 in the database i will like to save as the label instead of 0 because the user will not understand what 0 means they want to see the value they checked |
# |
Apr 3rd 2019, 13:56 |
admad |
@development route priority depends on the order in which routes are connected |
# |
Apr 3rd 2019, 13:55 |
admad |
isaiah: change to what value and why? |
# |
Apr 3rd 2019, 13:25 |
isaiah |
so how can i change it to the value because the user will not understand |
# |
Apr 3rd 2019, 13:22 |
ricksaccous |
boolean in cakephp is just 0 or 1 in the database but when loaded into an entity it's recognized as true or false |
# |
Apr 3rd 2019, 13:20 |
neon1024 |
*ja`z hands* |
# |
Apr 3rd 2019, 13:20 |
neon1024 |
Boolean! |
# |
Apr 3rd 2019, 13:19 |
neon1024 |
Then it’ll save a 1 |
# |
Apr 3rd 2019, 13:19 |
neon1024 |
Click it |
# |
Apr 3rd 2019, 13:14 |
isaiah |
How can i change the value of cakephp checkbox its saves as 0 in my database |
# |
Apr 3rd 2019, 13:14 |
development |
I'll just check if the user is inside the plugin for now. I can see that with Router::url(). |
# |
Apr 3rd 2019, 13:13 |
isaiah |
hi |
# |
Apr 3rd 2019, 12:23 |
development |
Hi, I want to add a Router::redirect for file.xml in my app/Config/routes.php but I have a routes.php file in one of my plugins which contains Router::parseExtensions('xml'); and this seems to interfere with my app/Config/routes.php. Does anyone have an idea on how to handle this? Can I give the file.xml rule in app/Config/routes.php priority? Cake 2 by the way. |
# |
Apr 3rd 2019, 12:05 |
challgren |
@livia.scapin yep use $this->loadPlugins() in your testcase |
# |
Apr 3rd 2019, 11:59 |
slackebot2 |
really need in the test cases in which I really need them (which is actually just 2 because I'm mocking a lot in there, the other test cases where I don't use mocks seem to load everything just fine) Am I correct that loadPlugins() is the recommended way to go? |
# |
Apr 3rd 2019, 11:59 |
livia.scapin |
So I can either just bootstrap the application in the tests/bootstrap.php file somewhat like this: `$app = new \App\Application(dirname(__DIR__) . DS . 'config'); $app->bootstrap(); $app->pluginBootstrap();` Or bootstrap a TestApplication like the CakeDC users plugin, but that seems a lot of redundant code to me, which is why I figured I could just bootstrap the 'real' Application instead... Or use loadPlugins() for the plugins I |
# |
Apr 3rd 2019, 11:45 |
admad |
Might need a wee bit knowledge of rst syntax buy can figure it out by seeing other pages |
# |
Apr 3rd 2019, 11:44 |
admad |
Can also simply click the edit icon on the manual site and use the GitHub editor |
# |
Apr 3rd 2019, 11:43 |
admad |
Building the docs yourself is not required. Just commit a fix and send PR |
# |
Apr 3rd 2019, 11:43 |
admad |
Huh? You don't need docker just to contribute changes to doc. |
# |
Apr 3rd 2019, 11:42 |
challgren |
Ok I’ll have to mess around, I looked at the codebase for cakephp/docs but required setting up docker and looked time consuming |
# |
Apr 3rd 2019, 11:41 |
admad |
https://api.cakephp.org/3.7/class-Cake.TestSuite.TestCase.html#_loadPlugins |
# |
Apr 3rd 2019, 11:41 |
admad |
Then a chance for someone to contribute :slightly_smiling_face: |
# |
Apr 3rd 2019, 11:40 |
challgren |
@admad no doc on that at all https://book.cakephp.org/3.0/en/development/testing.html |
# |
Apr 3rd 2019, 11:37 |
admad |
@livia.scapin there's loadPlugins() method available in test cases |
# |
Apr 3rd 2019, 11:31 |
nico946 |
Hi everyone, how is going? I have a quick question, I need to send a post request from a controller to another and I getting "Missing CSRF token cookie", is there any part of the doc you can link me to solve this problem? |
# |
Apr 3rd 2019, 10:51 |
snake-venom |
got it. |
# |
Apr 3rd 2019, 10:45 |
neon1024 |
You’ll have to write that route yourself, or stick to the conventions |
# |
Apr 3rd 2019, 10:45 |
neon1024 |
So you’re getting a 404 because ’saveData` isn’t a method mapped by the resource routes |
# |
Apr 3rd 2019, 10:44 |
neon1024 |
https://book.cakephp.org/3.0/en/development/routing.html#resource-routes |
# |
Apr 3rd 2019, 10:44 |
neon1024 |
Well you’re using `->resources()` which I think only maps CRUD |
# |
Apr 3rd 2019, 10:40 |
neon1024 |
its working for add() method but why its not working with custom mapped url ? and how to make it working also ? |
# |
Apr 3rd 2019, 10:37 |
snake-venom |
example.com/api/leads/saveData.json -- > In APi folder/ Leads Controller/ SaveData() method |
# |
Apr 3rd 2019, 10:36 |
snake-venom |
no no .. |
# |
Apr 3rd 2019, 10:36 |
snake-venom |
yes same |
# |
Apr 3rd 2019, 10:35 |
neon1024 |
I would expect `example.com/api/leads.json` |
# |
Apr 3rd 2019, 10:35 |
neon1024 |
What url are you trying? |