WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#27338 closed defect (bug) (duplicate)

Widget Customizer: Autosave sometimes prevents changing widget titles

Reported by: DrewAPicture Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Widgets Keywords:
Focuses: javascript Cc:

Description

The problem:

Seems like there's a sort of autosave race condition going on with setting widget titles. This may very well apply to other widget controls though I haven't tested for it.

The act of typing in a new widget title triggers the autosave, which then cuts you off from typing and collapses the widget container. Once the container is collapsed, it seems like it can't be re-expanded, rendering the widget controls inn inaccessible. Sometimes the new widget title gets sent to the preview, sometimes not.

Screencast to illustrate: http://screencast.com/t/mJkgGwIznF

To reproduce:

  1. Visit the Customizer
  2. Add a widget to a sidebar
  3. Attempt to change the title

Change History (8)

#1 @westonruter
7 years ago

I also noticed this issue and reported it on #27112:

if I make a change to a widget, say its title, leaving focus in the input and then immediately click "Save & Publish" the setting does not get saved, even though I can see it in the preview. If I first click out of the input (blur) and then click "Save & Publish", the setting gets updated as expected. It sticks. I'll do more investigation.

https://core.trac.wordpress.org/ticket/27112#comment:13

#2 follow-up: @westonruter
7 years ago

@DrewAPicture: I just looked at your screencast, and actually the issue you are describing where the fields in the widget control go away when you try to update them was reported in #27291. I have a patch on that ticket which resolves this issue. Can you confirm that it address that primary issue you observed when adding a new widget and updating it?

The other issue I mentioned above is relatively minor in comparison to the issue you reported here.

#3 in reply to: ↑ 2 ; follow-up: @DrewAPicture
7 years ago

Replying to westonruter:

@DrewAPicture: I just looked at your screencast, and actually the issue you are describing where the fields in the widget control go away when you try to update them was reported in #27291. I have a patch on that ticket which resolves this issue. Can you confirm that it address that primary issue you observed when adding a new widget and updating it?

The other issue I mentioned above is relatively minor in comparison to the issue you reported here.

To be honest, it was my impression that it was autosave that was triggering the widget controls to go away. So if that's being dealt with in #27291 we can probably close this here, unless I'm missing something.

#4 in reply to: ↑ 3 @westonruter
7 years ago

Replying to DrewAPicture:

To be honest, it was my impression that it was autosave that was triggering the widget controls to go away. So if that's being dealt with in #27291 we can probably close this here, unless I'm missing something.

It was indeed autosave, but every widget update is handled with autosave. The issue in #27291 is just that any update to a newly-added widget would cause the widget control form to go away, since the customizer filters weren't getting added properly for previewing newly added widgets.

#5 @westonruter
7 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #27291.

I'll open a separate issue for the specific issue I found regarding the race condition, because you're right, it's really not what you originally reported here.

#6 @helen
7 years ago

  • Milestone 3.9 deleted

#7 @tberneman
7 years ago

#27415 was marked as a duplicate.

#8 @westonruter
7 years ago

#27415 was marked as a duplicate.

Note: See TracTickets for help on using tickets.