Open alanapplyby opened 3 years ago
I have noted a few users have reported an issue when using this plugin with Cake v4. I have done a little investigation my side side and found the following.
The following line seems to cause an issue:
$js .= $this->Html->scriptBlock($code, ['block' => true]);
Specifically the block true param. Changing this to false fixes the issue, or else leaving it as true then in the template:
<?= $this->DataTables->table('requests', $options, ['class' => 'table table-striped']); ?> <?= $this->fetch('script'); ?>
It is not clear to me why this works though and if it is an acceptable approach - hope this helps.
I have noted a few users have reported an issue when using this plugin with Cake v4. I have done a little investigation my side side and found the following.
The following line seems to cause an issue:
$js .= $this->Html->scriptBlock($code, ['block' => true]);
Specifically the block true param. Changing this to false fixes the issue, or else leaving it as true then in the template:
It is not clear to me why this works though and if it is an acceptable approach - hope this helps.