5

I have a site with a hundred+ or so entries. I've added a new field to my entry template, but it won't take effect until it's been activated by a onSaveEntry event.

I've gone through maybe 15 entries or so now and resaved them manually, but it's proving to be a long and painstaking process.

Is there a way for me to batch resave all enabled entries in order to trigger this onSaveEntry event?

12

If you re-save the section(s) that your entries are in, it should re-trigger a save of all of the entries.

Hope that helps!

  • 1
    This is the correct answer, I don't see why it was down voted. Go to "Settings > Sections" and then the section containing your entries and hit save. This will trigger a bulk re-save of all of the entries. – Fyrebase Jan 10 '17 at 0:02
  • 1
    ¯_(ツ)_/¯ - got my upvote. – Brad Bell Jan 10 '17 at 0:38
  • This did in fact resave all entries (there was a task that ran in my sidebar confirming as much: cl.ly/221m2V0p2i41). Didn't seem to trigger the onSaveEntry event though; my field's values have gone unchanged. Is this intentional or am I missing something? – Rob Erskine Jan 10 '17 at 14:32
  • 2
    I have this exact problem with 2000+ entries, how did you eventually manage to do this? Re saving the section doesn't work – Branko Sep 1 '17 at 10:02
  • 2
    Two-year-ago Jake, you beauty. Thanks! Works great in Craft 3. – Jay Jan 14 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.