Make WordPress Core

Opened 5 years ago

Closed 2 years ago

#45438 closed enhancement (fixed)

All Settings page (options.php), message when saved

Reported by: ishitaka's profile ishitaka Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.0 Priority: normal
Severity: minor Version:
Component: Options, Meta APIs Keywords: good-first-bug needs-testing has-patch
Focuses: Cc:


Even if saving fails beyond the number of items limit (max_input_vars) in the All Settings page (/wp-admin/options.php), it will be displayed as "Settings saved." It is necessary to display an error message.

(Related to the discussion in #25939)

Attachments (3)

45438.patch (1.2 KB) - added by ishitaka 5 years ago.
45438.2.patch (888 bytes) - added by ishitaka 5 years ago.
45438.diff (1012 bytes) - added by peterwilsoncc 2 years ago.

Download all attachments as: .zip

Change History (14)

#1 @jorbin
5 years ago

  • Keywords needs-patch good-first-bug added; 2nd-opinion removed
  • Milestone changed from Awaiting Review to Future Release

It would be great to get this fixed. Once there is a patch to discuss, we should move it into the relevant milestone.

5 years ago

5 years ago

#2 @ishitaka
5 years ago

  • Keywords needs-testing added

Sorry, 45438.patch is a mistake.

#3 @maguijo
5 years ago

Trunk still has a pre-gutenberg version so I think I should wait until it updates to test this?

While I'm waiting, as a newbie, may I ask how I'm going to get a save error in order to test that your patch works properly? Or do I just need to edit and save a post a few times to be sure it doesn't cause problems?

#4 @maguijo
5 years ago

  • Keywords has-patch added; needs-patch removed

#5 @SergeyBiryukov
5 years ago

  • Milestone changed from Future Release to 5.1
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#6 @pento
5 years ago

  • Milestone changed from 5.1 to Future Release

Needs testing and review.

This ticket was mentioned in Slack in #core by sergey. View the logs.

2 years ago

#8 @SergeyBiryukov
2 years ago

  • Milestone changed from Future Release to 6.0

2 years ago

#9 @peterwilsoncc
2 years ago

45438.2.patch looks good, 45438.diff is identical with a minor coding standards fix.

Testing notes

WordPress 6.0-alpha-52448-src

PHP Config: max_input_vars set to 10.


  • Saving wp-admin/options.php shows as successful
  • Database did not update due to exceeding max_input_vars


  • Saving wp-admin/options.php shows an error message
  • Behaviour unchanged after removing change to max_input_vars

✓ working as expected

This ticket was mentioned in Slack in #core by chaion07. View the logs.

2 years ago

#11 @peterwilsoncc
2 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 53151:

Options: Show error when updating all options exceeds max_input_vars.

On sites with a large number of options, the number of inputs when saving all options via the /wp-admin/options.php page may exceed PHP's max_input_vars setting, this will prevent saving.

An error is now shown if this is the case.

Props ishitaka, jorbin, maguijo, pento, sergeybiryukov.
Fixes #45438.

Note: See TracTickets for help on using tickets.