Log message #4213122

# At Username Text
# Nov 12th 2019, 15:54 pieceof i bet yes, atomic to false otherwise atomic`: If true (default), will attempt to save all records in a single transaction. (cake2)
# Nov 12th 2019, 15:48 peter349 $this->saveMany($orders) goes through before save for each entry?
# Nov 12th 2019, 15:47 peter349 Hi
# Nov 12th 2019, 15:47 pieceof $this->paginate = [ 'limit' => 99999999999, 'maxLimit' => 99999999999 ]; yeeehaa .P
# Nov 12th 2019, 15:39 pieceof cant find a way to set pagination to give all results in one page, i just want to be able to sort,direction,limit, some times shows only 1 record , others ~20, limit => -1, limit => 'all' dont works
# Nov 12th 2019, 14:27 josbeir it should return correct in beforeRender etc
# Nov 12th 2019, 14:27 josbeir @massimoi that function will return the path but not in the initialize() callback
# Nov 12th 2019, 14:25 slackebot1 https://github.com/dereuromark/cakephp-tools/blob/master/docs/I18n/I18n.md or https://github.com/ADmad/cakephp-i18n
# Nov 12th 2019, 14:25 tobse @massimoi In Cake3 themes are handled like plugins (https://book.cakephp.org/3/en/views/themes.html). Sorry but I don't remember how this was handled in Cake2. I think I even didn't use them. For calling separate template-files depending on your locale you could render a specific template in your controller (https://book.cakephp.org/3/en/controllers.html#rendering-a-specific-template). Or take a look at
# Nov 12th 2019, 14:12 pieceof k, ty sir
# Nov 12th 2019, 14:11 admad @pieceof if you want to be able to use to order using `?sort=tile` for e.g. then yes `Paginator` can do that for you
# Nov 12th 2019, 14:08 admad if you use foc/search plugin it will handle it for you :slightly_smiling_face:
# Nov 12th 2019, 14:08 pieceof do i need to load paginator in order to get orderable api json response?
# Nov 12th 2019, 14:07 devito thanks
# Nov 12th 2019, 14:07 devito ill give it a shot
# Nov 12th 2019, 14:06 devito mm
# Nov 12th 2019, 14:06 pieceof i use to set a default if are not set, (first page load) (cake2)
# Nov 12th 2019, 14:04 devito do I need to handle the query params in the controller afterwards?
# Nov 12th 2019, 14:03 admad `$this->Paginator->options(['url' => ['?' => $this->request->getQuery()]])`
# Nov 12th 2019, 14:01 devito I hae a form i use to search which goes to a results page with pagination. how do i persist the search params between pages?
# Nov 12th 2019, 13:17 conehead Okay thank you. Will have to look for it recursively then
# Nov 12th 2019, 13:17 massimoi this is what I did in Cake2, but how can I get the path of the view in Cake3? If I do $this->viewBuilder()->getTemplatePath( ); I always get a empty string
# Nov 12th 2019, 13:16 admad @conehead then there's no way to get all the children in a single query
# Nov 12th 2019, 13:16 slackebot1 array_unshift($path,$locale); }
# Nov 12th 2019, 13:16 massimoi @tobse not sure to have understood... what I see is localization, meaning I can edit single strings in the page. But how do I choose a different .ctp when the language is different? if ($this->theme) { $theme_path = DS . 'Themed' . DS . $this->theme ; } if ($locale andand file_exists(APP . 'View' . $theme_path . DS . $this->viewPath . DS . $locale .DS. implode('/', $path) . $this->ext )) {
# Nov 12th 2019, 13:15 conehead Ah. Seems to be for Tree-Behavior. I am not using that behavior...just threaded data :S
# Nov 12th 2019, 13:15 conehead I will have a look thanks. Never have seen `for`
# Nov 12th 2019, 13:14 admad `->find('children', [for =>id])->find('threded')`
# Nov 12th 2019, 13:13 conehead Which does not seem to be a nice solution :P
# Nov 12th 2019, 13:13 conehead And just chain them like 20 times
# Nov 12th 2019, 13:13 conehead this won't get me all children. Could do ``` 'contain' => [ 'Children' => [ 'Children' => [ ... ], ], ]; ```
# Nov 12th 2019, 13:11 dereuromark contain => Chhildren?
# Nov 12th 2019, 13:09 conehead Hm is there a simple way to find all threaded data from a specific node? Simple `->where(['id' => $id])` will always return only the one result as the children are filtered as well
# Nov 12th 2019, 12:38 dereuromark you shouldnt do that. but if you do, best to use the whitelist, instead of forceEnable as global one
# Nov 12th 2019, 12:37 rsteenge How can i active the DebugKit toolbar outside of the local environment? I tried the following command in my bootstrap.php : Configure::write('DebugKit.forceEnable', true);
# Nov 12th 2019, 12:08 tobse For a simple language switcher you just need to edit the content of your static pages. Use the language functions and define the locale like described here. https://book.cakephp.org/3/en/core-libraries/internationalization-and-localization.html#changing-the-locale-at-runtime If you have larger content-blocks you can use switch-case for each language-version in your ctp-file
# Nov 12th 2019, 12:01 pieceof edit config/routes.php
# Nov 12th 2019, 11:59 pieceof web ui -> localization L10n, content -> internazionalization i18n
# Nov 12th 2019, 11:55 massimoi Hi, can anybody help me with this simple problem. I'm used to CakePHP 2.x and I'm new to CakePHP3. I need a simple thing: I need elements and static pages to be in different languages. In 2.x I edited the path of the page in the PagesController, but new I don't understand how to do it. Can you help? Thanks
# Nov 12th 2019, 11:32 development Played with it a bit. It's unfortunate that I develop on Windows (no symlinks), but what I wanted to achieve works. Thanks for the quick reply!
# Nov 12th 2019, 11:31 slackebot1 $validator->isArray('semestershelves') ->requirePresence('semestershelves') ->notEmptyArray('semestershelves', __('Please choose at least one entry.'); ``` Or do I have to run the validation manually before building the entity in the controller? Or put the validation into the associated model? Thanks for any advice.