Recover deleted categories

AI-generated summary

Recover deleted categories

TechGeek is looking for a way to recover or undelete deleted categories. pfaffman responded that there’s no automated way to do this, and instead suggested creating the categories again either through the UX or the Rails console using Category.create. TechGeek asked for clarification on using Category.create to recover deleted categories, which pfaffman confirmed is not possible and that deleted categories are gone unless restored from a backup. TechGeek thanked pfaffman for the confirmation.

Is there any way to recover/undelete deleted categories? List of deleted categories can be found from /admin/logs/staff_action_logs?filters=%7B"action_name"%3A"delete_category"%2C"action_id"%3A27%7D

I don’t believe there’s an automated way to do that. If you have dozens of them then you should likely automate it at the rails console, but it’s likely easier to do it at the ux unless there Ara lots of them. You can type

    Category.create

To see the fields a category has and then something like

  Category.create (name: 'the title'......)

And supply enough information for the command to succeed. There is also Administrative Bulk Operations that might have clues.

Is there a way to do it via UI?

Is it to create new categories or recover deleted categories?

You cannot undelete them. They are gone (unless you have a backup you want to restore). You will just have to create them again. Whether you do it in the ux or the console is up to you.

Thanks for confirmation.