Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Jonathan Schofield
@urlyman@mastodon.social  ·  activity timestamp 4 months ago

Rebuilding a thing in #CraftCMS 5 (it needed a rebuild anyway).

And getting my head more clearly round how https://craftcms.com/docs/5.x/system/fields.html#multi-instance-fields plays out *before* I start pouring loads of content in.

Just as well, because my dev work has already fallen foul of a variant of this: https://craftcms.com/docs/5.x/system/fields.html#field-layout-elements

Take care when removing a field from a layout: Craft stores field content using each instance’s UID. Re-adding a field (whether or not it uses the same handle) will give it a new UID, meaning it will no longer be associated with existing content! By relegating these changes to a development environment, your live data is typically insulated from major loss—if you do mistakenly remove a field, you can always roll back the corresponding project config changes via git before deploying.

Moving field layout elements between tabs, however, is nondestructive.
Take care when removing a field from a layout: Craft stores field content using each instance’s UID. Re-adding a field (whether or not it uses the same handle) will give it a new UID, meaning it will no longer be associated with existing content! By relegating these changes to a development environment, your live data is typically insulated from major loss—if you do mistakenly remove a field, you can always roll back the corresponding project config changes via git before deploying. Moving field layout elements between tabs, however, is nondestructive.
Take care when removing a field from a layout: Craft stores field content using each instance’s UID. Re-adding a field (whether or not it uses the same handle) will give it a new UID, meaning it will no longer be associated with existing content! By relegating these changes to a development environment, your live data is typically insulated from major loss—if you do mistakenly remove a field, you can always roll back the corresponding project config changes via git before deploying. Moving field layout elements between tabs, however, is nondestructive.
  • Copy link
  • Flag this post
  • Block
Jonathan Schofield
@urlyman@mastodon.social replied  ·  activity timestamp 4 months ago

…I hadn’t “removed” a field per se. I had created a new entry type but not assigned all the same field handles to its layout as its sibling entry type, and then ended up with duplicate fields with the same handles across layouts 🤦‍♂️

So the outcome was, I presume, *as if I had* removed and reinstated fields.

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.21 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login