silverstripe / silverstripe-widgets

Widgets subsystem for Silverstripe CMS
http://silverstripe.org
BSD 3-Clause "New" or "Revised" License
38 stars 55 forks source link

Widgets randomly disapearing #136

Closed torleif closed 7 years ago

torleif commented 8 years ago

I've had two instances of this happening, a CMS editor makes a change to a widget, clicks save draft and loses all the content.

One was on Mac OS X / chrome, the second Windows 7 / firefox.

I suspect there must be a scenario in saveInto(...) in WidgetAreaEditor.php where it will cause all the widgets to be deleted.

I think a fix should be to use javascript to explicitly tell the widget editor to delete widgets.

dhensby commented 8 years ago

I think a fix should be to use javascript to explicitly tell the widget editor to delete widgets.

I think this could be difficult to achieve.

Are you suffering from the issue where more than one page is related to the same WidgetArea? (this can happen when you duplicate a page in the CMS).

torleif commented 8 years ago

@dhensby sadly no, in both cases each CMS editor claimed to have just been editing the single widget on each page.

dhensby commented 8 years ago

So they were editing one widget and they all disappeared or they were editing one widget and it disappeared?

Are the widgets bespoke? Is there any kind of custom logic around them that could result in this? Are the widgets actually being deleted or just un-linked from the widget area?

Is this something you can reproduce on a fresh install?

torleif commented 8 years ago

The were editing a single widget and the entire widget area was cleared.

The widgets are all customised, they're mostly text fields, htmltext fields etc. I'll have a detailed look and see if I can see if they've been unlinked or deleted tomorrow.

torleif commented 8 years ago

It looks like the widget areas were retained, but the widgets themselves were deleted.

dhensby commented 8 years ago

Hmm, so the widgets are definitely being deleted.

It's hard to really know how or why this is happening without seeing it. Is it something you're prepared to investigate?

torleif commented 7 years ago

Because I can't reproduce this issue, I'll close it.

I'll be using the 'strips' for this sort of functionality going forward in the future, as I'm worried more people will lose data.