# |
Apr 23rd 2017, 07:46 |
appnerd |
hey in cakephp how come when save fails it is ending my controller and showing the view |
# |
Apr 23rd 2017, 07:44 |
theaxiom |
Because the whitelist/blacklist only applies to the sidebar navigation. When I am viewing a user record it is still trying to generate a link to Muffin/Tokenize tokens |
# |
Apr 23rd 2017, 07:43 |
theaxiom |
Or is that not a feature of CakePHP 3? |
# |
Apr 23rd 2017, 07:43 |
theaxiom |
Regardless, is there a way to remove associations on the fly? |
# |
Apr 23rd 2017, 07:34 |
theaxiom |
I guess I should RTFM :) |
# |
Apr 23rd 2017, 07:31 |
theaxiom |
It is generating links based on associations |
# |
Apr 23rd 2017, 07:31 |
theaxiom |
https://github.com/FriendsOfCake/crud-view/blob/master/src/Template/Element/view/related/has_many.ctp#L20 |
# |
Apr 23rd 2017, 07:30 |
theaxiom |
https://github.com/FriendsOfCake/crud-view/blob/master/src/Template/Element/view/related.ctp#L2 |
# |
Apr 23rd 2017, 07:29 |
theaxiom |
the problem is, when generating the views it is throwing up an exception for a missing route |
# |
Apr 23rd 2017, 07:29 |
theaxiom |
@admad I wasn't aware of that, thanks |
# |
Apr 23rd 2017, 07:19 |
admad |
Crud view has option to blacklist/whitelist associations |
# |
Apr 23rd 2017, 07:17 |
admad |
How does model association affect routing? |
# |
Apr 23rd 2017, 06:40 |
theaxiom |
CakePHP 2 had unbindModel() |
# |
Apr 23rd 2017, 06:38 |
theaxiom |
Therefore I am getting a missing route. |
# |
Apr 23rd 2017, 06:37 |
theaxiom |
The problem I am having is with the crud-view plug-in, since all views are being generated dynamically it wants a route to the Muffin/Tokenize controller. |
# |
Apr 23rd 2017, 06:37 |
theaxiom |
:slightly_smiling_face: |
# |
Apr 23rd 2017, 06:37 |
theaxiom |
Please? |
# |
Apr 23rd 2017, 06:33 |
theaxiom |
How do I remove a model association on the fly? |
# |
Apr 23rd 2017, 01:12 |
hiromi2424 |
dereuromark thanks to notice it. I will look into it :slightly_smiling_face: |
# |
Apr 22nd 2017, 17:03 |
dereuromark |
I mainly want a few people to help me out, and I can give them easy access via rbac to the backend |
# |
Apr 22nd 2017, 17:03 |
dereuromark |
a few of the main benefits over normal po editing are outlined in the root readme |
# |
Apr 22nd 2017, 16:47 |
admad |
Just improving the translations if needed? |
# |
Apr 22nd 2017, 16:46 |
admad |
But if you can get po files done why use db? |
# |
Apr 22nd 2017, 16:43 |
dereuromark |
Currently playing around with some free APIs to auto translate, gonna be interesting how accurate those are for auto-suggestions and alike |
# |
Apr 22nd 2017, 16:43 |
dereuromark |
Yeah, I think it is a bridge solution between the extremes somewhere |
# |
Apr 22nd 2017, 16:35 |
admad |
If that suits your use case sounds fine. Extracting to pot/po and then to db is not something i need |
# |
Apr 22nd 2017, 16:27 |
dereuromark |
OK. My thoughts: https://github.com/dereuromark/cakephp-translate/tree/master/docs#translation-strategies |
# |
Apr 22nd 2017, 16:26 |
admad |
I never had to worry about syncing updated translations to live server. Have only used it for smallish apps where translations are directly added to live server through webui |
# |
Apr 22nd 2017, 16:25 |
dereuromark |
Was wondering about translation strategy, when doing direct extract and read via DB and deployment. So the translations are available on the live server. |
# |
Apr 22nd 2017, 16:24 |
dereuromark |
hah ok :slightly_smiling_face: |
# |
Apr 22nd 2017, 16:24 |
admad |
@dereuromark on mobile :) |
# |
Apr 22nd 2017, 16:01 |
dereuromark |
@admad Are you around? I have seen your i18n extractor and reader. |
# |
Apr 22nd 2017, 15:25 |
chrisso |
`Argument 1 passed to Cake\ORM\Behavior::__construct() must be an instance of Cake\ORM\Table, none given, called in /home/vagrant/Apps/tools.dev/tests/TestCase/Model/Behavior/CsvImportBehaviorTest.php on line 28 and defined in [/home/vagrant/Apps/tools.dev/vendor/cakephp/cakephp/src/ORM/Behavior.php, line 152]` |
# |
Apr 22nd 2017, 15:23 |
chrisso |
I have buildt anything into the testcase yet, just baked it so far. |
# |
Apr 22nd 2017, 15:22 |
chrisso |
I had, but don't need it. Any thought why I still get errors on __construct() ? |
# |
Apr 22nd 2017, 15:22 |
chrisso |
When I run ImportBehavior test, it keeps telling me __construct() has to be an instance of Cake/ORM/Table. I don't have __construct() in my behavior class. |
# |
Apr 22nd 2017, 15:06 |
chrisso |
I see @jojomartius ;) |
# |
Apr 22nd 2017, 14:23 |
jojomartius |
and it cake2 it was easy to load data from a second database, cake3 can only load db structur from a second database :S |
# |
Apr 22nd 2017, 14:22 |
jojomartius |
mh yes, that worked for me some time, but some day i saw that for me its easier if i've one database that containing the test data and my cake3 and my older cake2 app can run against the same set of data |
# |
Apr 22nd 2017, 14:21 |
chrisso |
I'm working with a test app now to do some test codes. Trying to make faker work. |
# |
Apr 22nd 2017, 14:20 |
chrisso |
I'm just at the beginning of testing, so has no experience with it. I guess using actual data might save time, but you are able to produce the same fixture with the TestFixture |