Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking add block to matrix does not work set to maximum of 1 in inline editable format when Smith is installed #11

Open
akukral opened this issue Sep 4, 2024 · 6 comments
Labels
bug report status: confirmed A bug report that has been reproduced by the maintainer(s), but has not yet been fixed bug report

Comments

@akukral
Copy link

akukral commented Sep 4, 2024

Bug Description

Description

In element view on a structured entries page editing multiple entries at once unable to change or edit Link Field type entries that are as URL in selection dropdown.

Operating system and version

Mac Sonoma 14.6.1 / DDEV version v1.23.2

Database type and version

MySQL 8.0.36

Image driver and version

Imagick 3.7.0

Installed plugins and versions

  • Amazon S3: 2.2.1
  • Batch Actions: 2.0.1
  • Blitz: 5.7.1
  • BlurHash: 3.0.0
  • CKEditor: 4.2.0
  • Control Panel CSS: 3.0.0
  • Embedded Assets: 5.1.2
  • Environment Label: 5.0.0
  • Feed Me: 6.3.0
  • Freeform: 5.5.8
  • Matrix Extended: v3.5.0
  • Minify: 5.0.0
  • Reverse Relations: 3.0.0
  • SEOmatic: 5.1.2
  • Smith: 3.1.0
  • Sprig: 3.5.0

Steps to reproduce

  1. Create matrix field with at least one entry type
  2. Not Required
  3. Minimum entries: empty
  4. Maximum entries: 1
  5. View Mode: inline editable block

image

  1. Add field to entry
  2. Add a block to matrix field

image

Expected behavior

Clicking add block will show editable entry type of choice.

Actual behavior

Nothing appears when clicking on buttons. Clicking the button does work if the matrix field is set to Cards or Element Index or Batch Actions is disabled.

Batch Actions version

2.0.1

Craft CMS version

5.4.0.1

@ttempleton
Copy link
Contributor

Do any errors appear in the browser console?

@ttempleton ttempleton added the bug report status: unconfirmed A bug report that has not yet been reproduced by the maintainer(s), and more information is required label Sep 5, 2024
@akukral
Copy link
Author

akukral commented Sep 5, 2024

No errors in the console that I can see associated with the plugin or the matrix field.

@ttempleton
Copy link
Contributor

Try disabling your other plugins and confirming that Batch Actions is working at that point, then re-enabling them one-by-one to see when it stops working. I'm guessing one of them (possibly Matrix Extended?) is conflicting with Batch Actions.

@akukral
Copy link
Author

akukral commented Sep 9, 2024

Turns out it's a conflict with the Smith Plugin from Verbb. If Matrix Extended is enabled but Smith is disabled batch actions still works and I get the benefits of Batch actions and Matrix Extended with copy, paste, clone.

@ttempleton ttempleton added bug report status: confirmed A bug report that has been reproduced by the maintainer(s), but has not yet been fixed and removed bug report status: unconfirmed A bug report that has not yet been reproduced by the maintainer(s), and more information is required labels Sep 23, 2024
@ttempleton
Copy link
Contributor

Thanks for that extra info, I'm now able to reproduce it. It's happening because of the kind of hacky way we need to hook into Smith's functionality - it involves adding an empty <div> to the start of the Matrix blocks' container element as a dummy block, and then creating a Smith menu on that block. Since Craft checks if new blocks can be added based on the number of child elements the container element has, our dummy block has already maxed out the count. Unfortunately I don't think we can work around that, but I'll keep this open in case I can figure out a solution in the future.

@ttempleton ttempleton changed the title Clicking add block to matrix does not work set to maximum of 1 in inline editable format Clicking add block to matrix does not work set to maximum of 1 in inline editable format when Smith is installed Sep 23, 2024
@akukral
Copy link
Author

akukral commented Sep 23, 2024

Hopefully something works out. Thank you for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report status: confirmed A bug report that has been reproduced by the maintainer(s), but has not yet been fixed bug report
Projects
None yet
Development

No branches or pull requests

2 participants