craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.22k stars 626 forks source link

Feature request: Improve behaviour for automatic resaving of entries when saving an entry type #3482

Closed mmikkel closed 5 years ago

mmikkel commented 5 years ago

Description

In Craft 3, saving an Entry Type's settings (e.g. in order to add a new field to its field layout) triggers a resave of all entries belonging to that section/entry type.

Sometimes a resave is necessary – e.g. if you change the URL format – but if you've a lot of entries, the re-save can be a problem, due to the time and resources it takes to actually resave all of the entries. Also, a lot of the time (more often than not, from my perspective) a resave isn't even needed – such as when you simply re-arrange the fields in the field layout.

It'd be great if

  1. There was a config setting to disable the automatic re-save (could/should be true by default, i.e. keeping the current behaviour intact). Developers would then be able to implement their own strategies for dealing with changes to an entry type, whenever a re-save is actually needed.

  2. If automatic re-save is enabled (or the config setting isn't implemented), Craft could be smarter about when to actually do it (i.e. changes to the URL format should trigger a re-save; simply re-arranging the fields in the field layout should not).

  3. A native feature for manually triggering bulk resaving of entries belonging to a particular section or entry type would be awesome.

Additional info

jamesmacwhite commented 5 years ago

@mmikkel That would seem to be the best option from everything mentioned. I'll look at doing that. Thanks for advice.

Sorry for adding more fuel to the fire here! It was not my intention.