Skip to content

Cake v4 issues and workaround. #86

@alanapplyby

Description

@alanapplyby

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions