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

[5.x]: Matrix with a minimum of 1 and maximum of 1, blocks can be deleted #14904

Closed
BAM-Dennis opened this issue Apr 30, 2024 · 4 comments
Closed
Assignees
Labels

Comments

@BAM-Dennis
Copy link

What happened?

Description

The block appears, but i am able to delete it

Steps to reproduce

  1. create a matrix field with a minimum of 1 block and maximum of 1 block
  2. associate it to some entry
  3. create a new entry of this kind
  4. delete matrix block
  5. dead end. i now can no longer add a new block nor can i save the entry. Only thing i can do is reload

Expected behavior

if i can delete the block, i should be able to add a new one OR
i cannot delete it (compared to a static matrix field like in a supertable)

Actual behavior

i can delete it and i can't add a new block

Craft CMS version

5.05

PHP version

8.2

Operating system and version

linux

Database type and version

pgsql

Image driver and version

No response

Installed plugins and versions

@BAM-Dennis BAM-Dennis added the bug label Apr 30, 2024
@BAM-Dennis BAM-Dennis changed the title [5.x]: Matrix with a minimum of 1 and maximum of one can be deleted [5.x]: Matrix with a minimum of 1 and maximum of 1 can be deleted Apr 30, 2024
@BAM-Dennis BAM-Dennis changed the title [5.x]: Matrix with a minimum of 1 and maximum of 1 can be deleted [5.x]: Matrix with a minimum of 1 and maximum of 1, blocks can be deleted Apr 30, 2024
@brandonkelly
Copy link
Member

What view mode is your Matrix field set to?

@ttempleton
Copy link

I can reproduce this using inline blocks on 5.1.0.

Screenshot 2024-05-01 at 10-48-00 (First draft)
Screenshot 2024-05-01 at 10-49-00 (First draft)

@i-just i-just self-assigned this May 1, 2024
@i-just
Copy link
Contributor

i-just commented May 1, 2024

Hi, thanks for reporting! I raised a PR for this.

@brandonkelly
Copy link
Member

Craft 5.1.1 is out with that fix. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants