WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 3 months ago

#20770 closed defect (bug)

Introduce AJAX response message — at Version 2

Reported by: alexvorn2 Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.4
Component: Widgets Keywords: has-patch needs-refresh
Focuses: Cc:

Description (last modified by SergeyBiryukov)

when clicking on Save button of a widget, a error should appear if the user is logged out.

So after clicking the button the wpspin animated images disappears and nothing happens. This can be a problem if the current user think he is logged in and he is not, the settings just will not be saved.

Sometimes the server is not working.

Need to adjust the javascript code and php:
in php we can use die function : die('1') or die('success');

in javascript something like this:

$.post(ajaxurl, data, function(response){
   if (response === 'success') {} else { alert('Fail to save'); } 
});

http://wpimpact.com/wp-content/uploads/2012/05/Untitled-4.png

Change History (4)

kurtpayne2 years ago

Replace widget controls with "You are logged out!" message

comment:1 kurtpayne2 years ago

  • Cc kpayne@… added
  • Keywords has-patch added; needs-patch removed

This needs a look by one of the UX engineers, but I think the ticket raises a valid question. WordPress alerts when a draft can't be saved because a user is logged out, shouldn't widgets follow the same pattern? 20770.patch replaces the controls with a "You are logged out!" message. The message needs some padding (UI, help?) but it works.

comment:2 SergeyBiryukov2 years ago

  • Description modified (diff)
  • Keywords ui-feedback added

helenyhou2 years ago

Note: See TracTickets for help on using tickets.