NO BUG: Autosave does not save components

Hi @cdeweerdt,

Thanks for the report.

I noticed that you created the same report in two topics (the other one being here: WAIT: Saved component no longer exists - #26 by cdeweerdt). To keep the investigation easier to follow, let’s continue in one place only.

Based on your description, the important part here is not really autosave itself, but the fact that multiple users were editing components/templates in the builder at the same time.

Components are global data. They are not stored only inside the individual page/template where they are used. The page/template stores the component instance/reference, while the actual component definition is stored globally. So even if each developer is working on a different template, component changes can still affect the same shared global components data.

This means that if two or more builders have component data loaded at the same time, one user may be working with stale component data. A later save from that builder can potentially overwrite newer component changes made by another user. That could explain why components appear disconnected or no longer exist, even though they were previously saved.

Autosave/revisions can only help with the current page/template canvas. They cannot reliably restore the global component definition itself. So if a revision brings back a component instance, but the global component definition no longer exists, the instance may still point to a missing component ID. This is also covered in the Save & Publish docs: Save & Publish | Bricks Academy

For recovery, the realistic options are:

  1. Restore the database/site from a backup created before the components were lost.
  2. Re-import the components from a previously exported components JSON file. (documented here: Components | Bricks Academy)
  3. Rebuild the missing components manually.

For multi-developer workflows, we recommend treating components as shared/global data:

  • Avoid editing components in parallel.
  • Make sure components are saved explicitly after creating or editing them.
  • Refresh/reopen the builder after another developer makes component changes.
  • Export components before larger changes or before multiple developers work on component-heavy parts of the site.
  • Avoid keeping the builder open for a long time while other users are also editing components.

If the components were definitely saved (and it’s not possible that somebody would override them), and then disappeared later, please check whether the missing component still exists in the bricks_components option, from where you can restore it.

Thank you,
Matej