# |
Dec 13th 2017, 18:47 |
leon |
69/5000 Thanks to your help, I took a closer look at this part. |
# |
Dec 13th 2017, 18:46 |
leon |
I did not create an entity file for the articles. |
# |
Dec 13th 2017, 18:45 |
bravo-kernel |
@leon what was the cause? |
# |
Dec 13th 2017, 18:45 |
bravo-kernel |
woot? |
# |
Dec 13th 2017, 18:45 |
leon |
@bravo-kernel it works now!! yipiie! |
# |
Dec 13th 2017, 18:45 |
bravo-kernel |
@leon I have made https://github.com/alt3/cakephp-ember-api public |
# |
Dec 13th 2017, 18:44 |
mlignjatovic |
I have a strange problem, when I call $this->Flash->something, Phpstorm wont stop indexing. When I comment it, everything is ok. |
# |
Dec 13th 2017, 18:41 |
mlignjatovic |
Hi guys, I'm new to cakephp and I really like it! |
# |
Dec 13th 2017, 18:26 |
leon |
The error still appears. |
# |
Dec 13th 2017, 18:26 |
leon |
Damn, unfortunately this is NOT the problem. I deleted all relationships in model an database. |
# |
Dec 13th 2017, 18:19 |
leon |
Ok, i will check. |
# |
Dec 13th 2017, 18:14 |
bravo-kernel |
in other words when Articles hasOne Author and `Authors` is not in the `API_RESOURCES` array |
# |
Dec 13th 2017, 18:13 |
bravo-kernel |
I remember the same error when the resource has a relationship (table) that is not in the `API_RESOURCES` array |
# |
Dec 13th 2017, 18:13 |
bravo-kernel |
@leon |
# |
Dec 13th 2017, 18:09 |
bravo-kernel |
let me see if I can reproduce |
# |
Dec 13th 2017, 18:08 |
bravo-kernel |
the neomerx error is always table related, I'm unsure why it's failing though |
# |
Dec 13th 2017, 18:07 |
bravo-kernel |
looking at my test-api right now |
# |
Dec 13th 2017, 18:07 |
bravo-kernel |
There really isn't much more to this |
# |
Dec 13th 2017, 18:07 |
leon |
Yes. :,( |
# |
Dec 13th 2017, 18:02 |
bravo-kernel |
Last check: did you include `Articles`in your API_RESOURCES array in `config/routes.php`? |
# |
Dec 13th 2017, 17:52 |
leon |
File uploaded https://cakesf.slack.com/files/U1G9WJU4Q/F8F98PP4P/yes__with_the_crud_config_it_works_.php / https://slack-files.com/T053DPNCM-F8F98PP4P-40d8c1a524 |
# |
Dec 13th 2017, 17:50 |
bravo-kernel |
And.. if you are using the the .json extension.. you should not, the header is enough |
# |
Dec 13th 2017, 17:49 |
bravo-kernel |
Does your Articles table and entity exist? |
# |
Dec 13th 2017, 17:44 |
leon |
File uploaded https://cakesf.slack.com/files/U1G9WJU4Q/F8DM861ND/-.php / https://slack-files.com/T053DPNCM-F8DM861ND-c6f2ba9e6a |
# |
Dec 13th 2017, 17:43 |
leon |
Hey. I read your tutorial. Thanks for that. When I implement it it works with crud, but when i try it with crud-json-api Plugin, i always get an error: |
# |
Dec 13th 2017, 17:42 |
bravo-kernel |
@Leon Ofcourse, 3.5.7 no problem at all |
# |
Dec 13th 2017, 17:41 |
leon |
Hello. Is somebody here who succesfully used FriendsOfCake/crud-json-api with cake 3.5? |
# |
Dec 13th 2017, 17:19 |
meowcate |
The cookbook says a lot about "how to get others languages", I though that see easy, but there is not so much about "how to come back to the original after that". |
# |
Dec 13th 2017, 17:18 |
meowcate |
So my defaultLocale is currently *en_US*. If I call `I18n::setLocale('en_US');`, it should use the content of my `articles` table, and not checking the `i18n` one ? |
# |
Dec 13th 2017, 17:16 |
meowcate |
@hmic `defaultLocale`, I see, thanks. First time I'm working on a multilang app. |
# |
Dec 13th 2017, 16:57 |
hmic |
meowcate: App.language probably? |
# |
Dec 13th 2017, 16:56 |
meowcate |
I see this example from the Translate behavior in cookbook, `I18n::setLocale('en'); // reset for illustration`, but I have no idea where this `'en'` comes from. |
# |
Dec 13th 2017, 16:56 |
kailas |
@hmic - nevermind, I was looking at the wrong entity. you were right! it was the accessible bit.. |
# |
Dec 13th 2017, 16:53 |
meowcate |
I have a question about the Translate behavior. I see you can use `I18n::setLocale('es');` for example to get next results translated, but how can I restore the default language ? The original datas from my `Articles` table, which is not in there `i18n` table, how can I go back to it ? |
# |
Dec 13th 2017, 16:52 |
kailas |
wait, ok, in the entity , _accessible[‘*’=>true]. however, when i look at the $x3order object at runtime, there’s a ‘accessible’ element, and ‘requested_delivery_date’ is not in the array |
# |
Dec 13th 2017, 16:50 |
kailas |
ok, will try deleting the cache |
# |
Dec 13th 2017, 16:49 |
kailas |
hrm |
# |
Dec 13th 2017, 16:49 |
hmic |
- i suppose the requested_delivery_date field has been added lately |
# |
Dec 13th 2017, 16:49 |
hmic |
if so, delete the orm cache |
# |
Dec 13th 2017, 16:49 |
hmic |
check the patched entity before saving, is the data in there? |
# |
Dec 13th 2017, 16:49 |
hmic |
thats the typical problem with fields beeing ignored by patchentity |