verbb / smith

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

Paste/Duplicate, not working on Craft 3.2 #1

Closed webrgp closed 3 years ago

webrgp commented 5 years ago

Description

I have a Matrix field with a complex block that I can't past or duplicate. Other "simpler" blocks still function as expected.

{
  "require": {
    ...
    "craftcms/cms": "3.2.1",
    "verbb/super-table": "2.1.20",
    "fruitstudios/linkit": "1.1.11",
    "craftcms/redactor": "2.3.3.2",
    ...
}

Steps to reproduce

  1. Create a matrix field and add a block with the following:
    • SuperTable Field "Cards"
      • Assets Field "Card Picture"
      • Text Field "Card Heading"
      • Redactor Field "Card Content"
      • LinkIt Field "Card Link"
  2. Add the field to a section
  3. Create a block
  4. Duplicate that block

Additional info

webrgp commented 5 years ago

So, apparently the issue is related to max_input_vars (which is capped at 1000). The entry in question had lots of blocks, and while debugging the Ajax call while trying to clone a block, I saw the error.

I've bumped the max_input_vars in php.ini to 3000 and that did the trick, but it's probably a good idea to investigate ways to post the block structure as a son string instead of posting vars.

webrgp commented 5 years ago

This issue still persisting, in some random entries. Bumping max_input_vars helped, but a deeper look into it is needed.

brandonkelly commented 5 years ago

@webrgp This is going to be a Craft issue, not Smith. We plan on switching all form submits over to Ajax requests in Craft 4 with JSON bodies, which will solve these sorts of issues.

webrgp commented 5 years ago

And when that might be ;-) ?

sbossarte commented 3 years ago

This also seems to be because Smith is trying to include config information about the field, which includes a list of blocks, by ID, for every block of that matrix field across the whole site. See this bit from the Firefox dev console showing the contents of the request:

image

That config continues on for about 13000 blocks, in this particular site's case.

engram-design commented 3 years ago

These issues should be all fixed in 1.1.9