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

Invalid field layout ID: 319 (Changing a field in one layout block, changes the other) #862

Open
JonnyBR12 opened this issue Mar 6, 2024 · 4 comments
Labels
bug status: unconfirmed A bug report that has not yet been reproduced by the maintainer(s), and more information is required bug

Comments

@JonnyBR12
Copy link

Bug Description

When visiting an entry that contains a Neo field, we're getting an internal server error which, when in dev mode, shows:

Invalid field layout ID: 319
in /home/XXXXXX/public_html/_stage/vendor/spicyweb/craft-neo/src/assets/InputAsset.php at line 215– yii\base\Component::__call('getFieldLayout', [])

When disabling Neo, the site works as expected. Can't think of anything that's updated or been changed since yesterday that could have caused this. Have you seen this before? Any help would be awesome.

Steps to reproduce

  1. Create an entry with a Neo field
  2. Create new entry
  3. Invalid field layout ID: 319 (or internal server error when live)

Expected behaviour

We'd expect the Neo field to load successfully with all blocks editable as always.

Neo version

4.0.6

Craft CMS version

4.8.1

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

@JonnyBR12 JonnyBR12 added the bug label Mar 6, 2024
@JonnyBR12
Copy link
Author

This morning, we noticed that updating one Neo block changed the fields of another which was unrelated. We then deleted one of the Neo and tried to recreate which is when we got the internal server errors.

@JonnyBR12 JonnyBR12 changed the title Invalid field layout ID: 319 Invalid field layout ID: 319 (Changing one Mar 7, 2024
@JonnyBR12 JonnyBR12 changed the title Invalid field layout ID: 319 (Changing one Invalid field layout ID: 319 (Changing a field in one layout block, changes the other) Mar 7, 2024
@JonnyBR12
Copy link
Author

Just to update on this, we've rolled the site back before this issue and it all comes down to two blocks created in Neo.

To try and explain, we had a block 'Featured Cars' with a couple of text fields and a textarea in it. We cloned that and renamed it 'New Car Models'. When we then change a field in either, the field changed in the other block too. Deleting either of these results in internal server error.

To replicate:

  1. Create a block with a couple of fields in
  2. Clone that block
  3. Change a field in either and they both change
  4. Deleting either of these fields now result in an internal server error with 'Invalid field layout ID'

ttempleton added a commit that referenced this issue Mar 8, 2024
@ttempleton
Copy link
Contributor

Thanks for reporting this - I can't reproduce this error or the described behaviour, but I have just released 4.0.7 which fixes some other buggy behaviour affecting cloned block types which I'm hoping also fixes this. Could you please upgrade to 4.0.7 and let me know if that resolves your issue?

@JonnyBR12
Copy link
Author

Thanks for getting back to me on this. I'm back in on Tuesday, so we'll upgrade to 4.0.7 and report back.

@ttempleton ttempleton added the bug status: unconfirmed A bug report that has not yet been reproduced by the maintainer(s), and more information is required label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status: unconfirmed A bug report that has not yet been reproduced by the maintainer(s), and more information is required bug
Projects
None yet
Development

No branches or pull requests

2 participants