silverstripe / silverstripe-userforms

UserForms module provides a visual form builder for the Silverstripe CMS. No coding required to build forms such as contact pages.
BSD 3-Clause "New" or "Revised" License
135 stars 226 forks source link

Re-ordering fields does not work #1055

Closed torleif closed 3 years ago

torleif commented 3 years ago

Steps to reproduce:

  1. create a page with 10 or so fields
  2. reorder a field
  3. the reorder fails and times out

Our production system times out when someone reorders an item (by drag and dropping it in the CMS)

While on dev mode, I've got this response time:

image

this is on a modest page with about 10 or so form fields. I've taken a xdebug profile of a reorder, so i might be able to give some more insight into why it's failing

torleif commented 3 years ago

After a bit of digging, i've found:

  1. this does not affect a fresh install. It looks like it's one our extensions causing it (most likely a CWP extension, none of our codebase is being called after a profile)
  2. I've managed to address the issue by overriding modifying GridFieldEditableColumns.php handleSave() to use $item->write(false, false, false, false); as it seems to be one component on the page
  3. i don't know what component it is at the moment
emteknetnz commented 3 years ago

It looks like it's one our extensions causing it

Is that an officially supported CWP extension? or one defined in your custom code base?

torleif commented 3 years ago

@emteknetnz I've tried it on a fresh CWP install. It does not appear to be affected.

So i guess the offending code is in our code base, or an extension we've got. feel free to close this. i think it warrants more investigation on our end

brynwhyman commented 3 years ago

Based on the above I'll close this issue. We can re-open it if a problem is found with a supported extension.

torleif commented 3 years ago

We're getting more angry CMS admins not being able to edit user forms. From what I can tell this is a duplicate of #773

brynwhyman commented 3 years ago

We're getting more angry CMS admins not being able to edit user forms. From what I can tell this is a duplicate of...

Hi @torleif, are your replication steps still the same of creating a page with 10 or so fields on a production system? You've mentioned using the CWP recipe, if that's the case I'm not sure how related to #773 it would be. For me, running the following can be done in under 7 seconds on a small CWP stack:

torleif commented 3 years ago

@brynwhyman yes the steps were the same, a modest 10 or so fields. though a key step was re-ordering one or more of the fields

brynwhyman commented 3 years ago

Sorry forgot to mention that, I also tried replacing the 'Save the page' step with 'Re-order a field' and saw the same result of completing within ~7 seconds.