# |
Jul 22nd 2021, 12:00 |
paolo.bragagni |
something wrong in my config |
# |
Jul 22nd 2021, 11:59 |
kevin.pfeifer |
this creates the table `checklist_types` with the columns id, name, created and modified with 3 entries |
# |
Jul 22nd 2021, 11:59 |
paolo.bragagni |
should include checklist_types table? |
# |
Jul 22nd 2021, 11:46 |
slackebot2 |
```bin/cake migrations migrate``` |
# |
Jul 22nd 2021, 11:46 |
slackebot2 |
$checklist_types_table->addColumn( 'modified', 'datetime', [ 'default' => 'CURRENT_TIMESTAMP', 'null' => false, ] ); $checklist_types_table->create(); $checklist_types_table->insert( [ 'name' => 'Wordpress' ] ); $checklist_types_table->insert( [ 'name' => 'Drupal' ] ); $checklist_types_table->insert( [ 'name' => 'WooCommerce' ] ); $checklist_types_table->saveData();``` execute |
# |
Jul 22nd 2021, 11:46 |
kevin.pfeifer |
```bin/cake bake migration MySuperMigration``` open confg/Migrations/<DATE>_MySuperMigration.php insert into `change()` function ``` $checklist_types_table = $this->table( 'checklist_types' ); $checklist_types_table->addColumn( 'name', 'string' ); $checklist_types_table->addColumn( 'created', 'datetime', [ 'default' => 'CURRENT_TIMESTAMP', 'null' => false, ] ); |
# |
Jul 22nd 2021, 11:46 |
dereuromark |
you can execute seeds for demo data afterwards |
# |
Jul 22nd 2021, 11:42 |
paolo.bragagni |
trying.. I'd like only to create some tables (users, roles, ..) and fill with default values.. |
# |
Jul 22nd 2021, 11:18 |
dereuromark |
migrations? |
# |
Jul 22nd 2021, 11:02 |
paolo.bragagni |
what is the cakephp 4 corresponding to 'cake schema' ? I'd like to insert some tables in default DB |
# |
Jul 22nd 2021, 10:25 |
paolo.bragagni |
thanks! |
# |
Jul 22nd 2021, 08:54 |
paolo.bragagni |
(thanks ndm) |
# |
Jul 22nd 2021, 08:53 |
paolo.bragagni |
probably is only a theme problem |
# |
Jul 22nd 2021, 08:45 |
ndm |
Sure, but select2 already supports that, hence your question was unclear. |
# |
Jul 22nd 2021, 08:36 |
paolo.bragagni |
if I erroneusly select something and I want to clear it |
# |
Jul 22nd 2021, 07:58 |
paolo.bragagni |
so probably is only a bug in Select2 bootstrap theme |
# |
Jul 22nd 2021, 07:58 |
paolo.bragagni |
an x that 'clear' the input |
# |
Jul 22nd 2021, 07:58 |
paolo.bragagni |
|
# |
Jul 22nd 2021, 07:57 |
paolo.bragagni |
if I remove that I see this |
# |
Jul 22nd 2021, 07:57 |
paolo.bragagni |
humm probably it is the 'bootstrap4' theme |
# |
Jul 22nd 2021, 07:55 |
ndm |
@paolo.bragagni Why would the "empty" entry stay once you've made a selection? |
# |
Jul 22nd 2021, 07:45 |
ndm |
@dpaleria Debug your values to figure what exactly they look like (`debug($id); debug($params);`), it's very likely not a type issue, but the value that you are passing is not numeric. |
# |
Jul 22nd 2021, 07:44 |
paolo.bragagni |
no more 'Vuoto' (Empty) |
# |
Jul 22nd 2021, 07:44 |
paolo.bragagni |
|
# |
Jul 22nd 2021, 07:43 |
paolo.bragagni |
it shows, but if I enter something it disappares |
# |
Jul 22nd 2021, 07:43 |
paolo.bragagni |
when it is Empty (Vuoto) |
# |
Jul 22nd 2021, 07:40 |
ndm |
@val There's no dedicated method for it, but you can append the existing order to your input and then overwrite the order, like: ```$query->order( ['field' => 'ASC', $query->clause('order')], true );``` |
# |
Jul 22nd 2021, 07:21 |
val |
hi, is is possible to prepend an `order by` clause to the existing `order by` clauses in 3.x (instead of appending it to the end)? |
# |
Jul 22nd 2021, 06:30 |
paolo.bragagni |
if the field is already empty Select2 shows the placeholder, otherwise no |
# |
Jul 22nd 2021, 06:25 |
paolo.bragagni |
in add the 'allowClear' and placeholder do the works |
# |
Jul 22nd 2021, 06:25 |
paolo.bragagni |
no way to insert empty selection using Select2 in edit |
# |
Jul 22nd 2021, 05:42 |
slackebot2 |
`'conditions' => array('artifact_id' => $arti_id)` `));` `$this->set(compact('abc'));` `return $this->redirect(['action'=>'view', $abc['id']]);` `}` But I'm unable to access the params from url. Which gives me the below error: I'm pretty sure that error is not of any data type instead it is a mistake in my function but I'm unable to find the mistake. Any idea on this ? Thanks ! |
# |
Jul 22nd 2021, 05:42 |
dpaleria |
hey everyone, I'm accessing this url `http://localhost:2354/images/get-imageid/111223` and now I'm using params to access the number `1112233` and put that as an input for a function in the controllers. This is how the controllers look like: `public function getImageid($id=null)` `{` `$params=$this->request->getParam('pass');` `$arti_id=$params[0];` `$abc = $this->Images->get($id, array(` |
# |
Jul 22nd 2021, 00:21 |
dereuromark |
best to create then a record per entry, this way the queue can run those in parallel even if that's possible/desired |
# |
Jul 22nd 2021, 00:20 |
dereuromark |
ah that was a different person |
# |
Jul 22nd 2021, 00:20 |
dereuromark |
and again, you can just run the reset functionality over your records, it will batch process them all without memory issues etc. |
# |
Jul 22nd 2021, 00:19 |
dereuromark |
the payload is too big, make sure to use only references, not whole objects here |
# |
Jul 21st 2021, 23:09 |
tyler.adam.lazenby |
@dereuromark any ideas on how to troubleshoot that? |
# |
Jul 21st 2021, 23:08 |
tyler.adam.lazenby |
2021-07-21 17:08:32 Notice: Notice (8): unserialize(): Error at offset 64025 of 65535 bytes in [C:\xampp\htdocs\ezBusinessManag er\vendor\dereuromark\cakephp-queue\src\Queue\Processor.php, line 187]\ |
# |
Jul 21st 2021, 23:08 |
tyler.adam.lazenby |
I ALMOST had it.... almost then this started to get spat out |
# |
Jul 21st 2021, 22:20 |
tyler.adam.lazenby |
maybe if I split up the jobs into groups of records |