verbb / tablemaker

A user-definable table field type for Craft CMS
MIT License
40 stars 32 forks source link

Undefined array key "heading" #45

Closed DenyEs closed 7 months ago

DenyEs commented 7 months ago

Describe the bug

Deleteting a matrix or supertable field containing a table created with Table Maker results in an error when you try to access the entry in the CMS

Steps to reproduce

  1. Create a matrix field
  2. Add a block and crate a table maker field
  3. Create an entry
  4. Add table field
  5. Save an entry
  6. Go back and remove the field
  7. Try to access the entry again

https://github.com/verbb/tablemaker/assets/18517642/35f807dc-4680-40b8-a067-5ba72d960d78

Craft CMS version

4.8.9

Plugin version

4.0.10

Multi-site?

No

Additional context

No response

engram-design commented 7 months ago

I can't seem to replicate that with your steps, and it seems odd that Table Maker is throwing an error when there's no instance of it, once the Matrix block has been deleted. Still, I can handle that error.

Fixed for the next release. To get this early, run composer require verbb/tablemaker:"dev-craft-4 as 4.0.10".

DenyEs commented 7 months ago

Makes me wonder if this is Crafts issue more than Table Makers. When I got the error, I tried to disable to plugin to see what's happening when I access the entry in the CMS and it was showing unsaved changes which is weird as I am sure I saved it and came back with no validation errors. This would explain why the instance of Table Maker technically still exists.

The fixed has worked tho! Cheers Josh

engram-design commented 7 months ago

Fixed in 4.0.11