verbb / super-table

Super-charge your Craft workflow using Super Table.
MIT License
316 stars 47 forks source link

Uninstall fails with "The table does not exist: {{%supertableblocktypes}}" with Super Table fields removed at same time #548

Open mandrasch opened 9 months ago

mandrasch commented 9 months ago

Describe the bug

Hi,

I remove some super table fields in "Settings > Fields"

AND

after that I followed this guide (https://craftcms.com/docs/4.x/plugins.html#uninstalling-a-plugin)

image

and disabled Super Table in Settings > Plugins.

I deployed it (without changing composer yet). I commited this as one commit and craft project-config/apply on deploy fails with:

- removing superTableBlockTypes.8501032d-bdd4-4752-8f85-48f10445f092.fields.b9da0952-12d4-4f46-a1a7-1323191e2925.settings.options.0.__assoc__.0 ... 
error: The table does not exist: {{%supertableblocktypes}}
  - removing superTableBlockTypes.8501032d-bdd4-4752-8f85-48f10445f092 ...  

image

I just thought afterwards that this might be a bad idea at same time 😉

Re-deploying it worked fine the second time, no errors on craft project-config/apply.

Steps to reproduce

  1. Delete existing super table fields in Settings > Fields
  2. Uninstall Plugin in dashboard
  3. Commit both these changes as one deployment
  4. Run apply command --> fails
  5. Run apply command second time --> works

Craft CMS version

4.5.9

Plugin version

3.0.12

Multi-site?

No

Additional context

Just wanted to let you know this happens, maybe edge case. Please close if irrelevant.

Thanks very much for providing this plugin while we waited for matrix-in-matrix in core. 👏

mandrasch commented 9 months ago

Okay sorry, turns out I also still had a Super Table field within a Matrix Field - maybe this caused trouble as well.

mandrasch commented 8 months ago

Just noticed the same behavior on another plugin - is this a general craft issue? 🤔

image