vandres / craft-matrix-extended

Adds functionality to the native Matrix field type
Other
3 stars 0 forks source link

canAddMoreEntries setting does not seem to update on block deletion event. #11

Closed sandrodunkel closed 3 months ago

sandrodunkel commented 3 months ago

I have a matrix with a max entries setting of 1. When deleting this one block to add another type, the add-buttons are correctly displayed again, but I can't actually add another block. I first have to reload the page and only then I'm able to create a new block again. It seems like you need to update the canAddMoreEntries-thingy when deleting a block.

vandres commented 3 months ago

On it now...

vandres commented 3 months ago

https://github.com/vandres/craft-matrix-extended/assets/1436383/d29c2dcf-4619-4cbc-936e-6916a44a1dcb

@sandrodunkel Can you please give me more details. I tried a very simple example, and it seems to work. With either delete buttons

sandrodunkel commented 3 months ago

I'm inside a global set, maybe this has something to do with it? Although I can't really imagine that that's the problem. Is there anything I could show you in the backend debug bar that could help you?

https://github.com/vandres/craft-matrix-extended/assets/102292752/85c45392-c52a-4e4d-8f45-0e9151fe0c47

vandres commented 3 months ago

I will try your use case with the global sets. I would stongly recommend though, to not use Category and GlobalSet anymore.

sandrodunkel commented 3 months ago

Clients seem to like the separation of entries and globals. Also, there have been talks of getting rid of them since late Craft 3. I believe it, when I see it^^

vandres commented 3 months ago

I can reproduce it in Global Sets

vandres commented 3 months ago

@sandrodunkel Can you confirm, that it also happens, without the plugin being enbaled? Looks like a core bug

sandrodunkel commented 3 months ago

@vandres Can confirm! I will open an issue in the craftcms repo. Since this has nothing to do with your plugin, I will close this issue. Thanks.

sandrodunkel commented 3 months ago

https://github.com/craftcms/cms/issues/15158