verbb / smith

A Craft CMS plugin to add copy, paste and clone functionality to Matrix blocks.
MIT License
25 stars 9 forks source link

Doesn't work with Donkeytail plugin. #26

Closed belkin closed 1 year ago

belkin commented 1 year ago

Describe the bug

I'm getting 'A server error occurred.' error when duplicating matrix block with Donkeytail field inside of it.

Steps to reproduce

  1. Create matrix block with donkeytail field
  2. Try to copy/clone block with donkeytail field

Craft CMS version

3.7.61

Plugin version

1.2.3

Multi-site?

Yes

Additional context

Donkeytail (2.0.7): https://plugins.craftcms.com/donkeytail?craft3

engram-design commented 1 year ago

Are you able to check your log files for more detail of the error? Or check the network request response review for more detail on the error? Cloning Matrix blocks with a Donkeytail field seems to work flawlessly on my end.

belkin commented 1 year ago

Hi, thanks for the fast reply. I'm getting this error on network tab: {name: "Error", message: "A server error occurred.", code: 0, error: "A server error occurred."} And in the logs following: yii\base\ErrorException: Unknown: Input variables exceeded 10000. To increase the limit change max_input_vars in php.ini. in .....

But something weird happening in the POST:

    'field' => 'content_blocks'
    'namespace' => ''
    'blocks' => [
        0 => [
            'type' => 'hotspots'
            'enabled' => '1'
            'fields' => [
                'block_title' => ''
                'text' => ''
                'first_group' => [
                    'canvasId' => [
                        0 => '19205'
                    ]
                    'pinIds' => [
                        0 => '17261'
                        1 => '17262'
                        2 => '17263'
                    ]
                    'meta' => [
                        0 => ''
                        1 => ''
                        2 => ''
                        3 => ''
                        ......
                        9987 => ''
                        9988 => ''
                        9989 => ''
                        9990 => ''

That meta info goes to almost 10000 without any info. So I'm not sure now if this is related to Smith or Donkeytail itself.

engram-design commented 1 year ago

Ah, so that is slightly unrelated, but you'll need to adjust your max_input_vars PHP setting. Essentially, the amount of data sent to the controller that we need to duplicate the block is too large to handle by default. What sort of field is meta and/or first_group? It's strange that it's that large!

belkin commented 1 year ago

Yea, after seeing the logs I thought the same. first_group is the Donkeytail field and everything inside is it's content I guess. So this empty meta values are not related to Smith. I'm going to close the ticket because is unrelated to Smith ..

Thanks for help!