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

Getting Invalid Field Layout Error in CP #876

Closed
brianrivet-tilt opened this issue Apr 5, 2024 · 1 comment
Closed

Getting Invalid Field Layout Error in CP #876

brianrivet-tilt opened this issue Apr 5, 2024 · 1 comment

Comments

@brianrivet-tilt
Copy link

Bug Description

I tried to clone a block as a start point for another block. I made the clone and adjusted the field layout. When I tried to save the field, it wouldn't save, but when I tried to access the new block type which was the one showing an error, nothing was shown in either the settings tab or the field layout tab (both were completely blank showing no fields, no labels, etc.). I then tried deleting the block type using the delete option in the gear dropdown, and it let me delete it. I saved the field afterward, and then instead of reloading the Neo field settings, I'm getting an error screen saying "Invalid field layout ID: 63". I can provide a link to a database backup an d the necessary composer files to help troubleshoot.

Steps to reproduce

  1. I cloned a block
  2. made changes to field layout on the cloned block and changed settings like the block type handle, etc.
  3. tried to save and got a message saying the block couldn't be saved.
  4. couldn't access any settings or layout on the cloned block, so deleted using the gear dropdown.
  5. tried to dave field after deleting new block
  6. Got error screen.

Expected behaviour

No response

Neo version

4.x-dev as 4.0.8

Craft CMS version

4.8.7

What is the affected Neo field's propagation method?

No response

Does this issue involve templating, and if so, is eager-loading used?

This is not a templating issue

@ttempleton
Copy link
Contributor

Firstly - the bug with the new block type's settings and field layout designer not loading is now fixed in 4.1.1, thanks for pointing that out.

Regarding the invalid field layout ID error - this has come up recently (#862), and I'm not really sure what's caused it, other than if this is another effect of the previous issue you opened in that deleting one block type using a shared field layout deletes the layout for the other block type(s). I can't reproduce the error myself, though, so I'm not sure if the sharing of field layouts is an active bug now, or was a bug in the past that is still causing some after-effects. But if sharing of field layouts is involved, then running php craft neo/block-types/fix-field-layouts should fix that.

If the error still occurs after running that, please let me know in #862 and I'll follow up from there.

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

No branches or pull requests

2 participants