# |
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 |
# |
Dec 13th 2017, 16:48 |
kailas |
I can’t figure out why date would work and the other datetime wouldn’t work… |
# |
Dec 13th 2017, 16:48 |
kailas |
well, ‘*’ i true, and only ‘id’ is false |
# |
Dec 13th 2017, 16:47 |
kailas |
yes |
# |
Dec 13th 2017, 16:47 |
kailas |
lemme chck |
# |
Dec 13th 2017, 16:47 |
hmic |
check the entity class |
# |
Dec 13th 2017, 16:47 |
kailas |
I don’t see any validation errors either, after creating the entity |
# |
Dec 13th 2017, 16:47 |
hmic |
kailas: is the property accessible? |
# |
Dec 13th 2017, 16:46 |
kailas |
I have a model X3Orders with two datetime fields, date and requested_delivery_date. when patchEntity with [‘date’=>’2017-01-01 01:00,‘requested_delivery_date’=>‘2017-01-01 01:00’], the value for ->date is set, but not for ->requested_delivery_date . i don’t have useLocaleParser set. any ideas what could be going on? |
# |
Dec 13th 2017, 15:44 |
salewilliam09 |
Difficult for customize QueryBuilder. |
# |
Dec 13th 2017, 15:42 |
salewilliam09 |
@hmic (IRC) Yes, we need change "alias" for Tags. |
# |
Dec 13th 2017, 15:39 |
hmic |
salewilliam09: alias them differently |
# |
Dec 13th 2017, 15:31 |
slackebot |
as pt WHERE pt.tag_id IN(Tags.id) OR pt.tag_id IN (SELECT id FROM tags t WHERE t.parent_id = Tags.id)) > 0 ORDER BY Tags.order_NO asc We changed alias table Tags is tags,t,ect..., after all alias replace only one "tags" or "t" Thanks, |
# |
Dec 13th 2017, 15:31 |
salewilliam09 |
Dear all, We have small issue under Cake\ORM\Query, how to execute 2 or 3 same table in once QueryBuilder. Original query: SELECT Tags.id AS "Tags__id", Tags.value AS "Tags__value", ( SELECT count(pt.paper_id) FROM paper_tags as pt WHERE pt.tag_id IN(Tags.id) OR pt.tag_id IN (SELECT id FROM tags t WHERE t.parent_id = Tags.id)) as totalTags FROM tags tags WHERE (Tags.parent_id) IS NULL AND ( SELECT count(pt.paper_id) FROM paper_tags |