Make WordPress Core

Opened 12 months ago

Closed 4 months ago

Last modified 4 months ago

#63124 closed defect (bug) (invalid)

Background Color/Image Selection Issue & Recommendation for Improvement

Reported by: churchjunction's profile churchjunction Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.7.2
Component: Posts, Post Types Keywords: reporter-feedback
Focuses: Cc:

Description

Subject: Background Color/Image Selection Issue & Recommendation for Improvement
Issue Description:

We encountered an issue with the background color/image selection feature in WordPress. Specifically, the following problems were observed:

When creating a new post or page, the background color or image settings were not automatically checked.

Once a background color/image was selected, unchecking it was not an option. This forced users to always select a color/image, even if they intended not to have a background.
If no background color or image was selected, the page could not be saved, leading to PHP warnings and errors in the site’s debug log.

Steps Taken to Resolve the Issue:
Code Update: We modified the style.php file to ensure the background was applied correctly, handling both color and image in the custom code.
Database Update: We ran a SQL query to update all posts and pages, standardizing the background color to #f7f7f7 in the wp_postmeta table, which ensured consistency across the site.

Code Reversion: After resolving the issue, we reverted the style.php file back to its original form to avoid any further issues with styling.

Debugging and Testing:
We reviewed the debug output, and the issue was resolved with no further errors being logged. The background color and image are now functioning as expected across all posts/pages.

Proposed Improvement for Future Versions:
We recommend that WordPress improve the background color/image settings in the post/page editor to avoid forcing users to always set a background. Specifically:

On/Off Option for Background: Implement an on/off toggle for the background setting, allowing users to remove the background color or image if they don't want one.
This would prevent issues where users inadvertently cannot save a page unless a background is selected, making the user interface more intuitive and flexible.

Why This Change Is Needed:
User Experience: The current toggle system leads to confusion and errors. Users should be able to choose whether or not to set a background, without being forced to select one.
Error Prevention: Allowing a "no background" option would avoid unnecessary errors in saving pages and posts.

Consistency: Standardizing the background color across the site (such as using #f7f7f7 as a default) helps maintain consistency, but the toggle should be more flexible.

Action Request:
Could you please consider implementing the on/off toggle for background color/image settings in future WordPress updates? It would enhance the flexibility of the page editor and improve overall site functionality.

Closing:
Thank you for your attention to this matter. Please let me know if you need any further clarification or additional information regarding this issue. We appreciate your efforts in improving the WordPress platform.

Best regards,
Dr. Blunt
ChurchJunction.com

Change History (5)

#1 @joedolson
12 months ago

This sounds like it may be an issue with a 3rd party theme or plugin. Can you reproduce the issue with all plugins disabled and a default theme, like Twenty Twenty or Twenty Twenty Five installed?

#2 @joedolson
12 months ago

  • Keywords reporter-feedback added

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


4 months ago

#4 @SirLouen
4 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

This was reported long time ago and no feedback has been provided since then

I'm going to close this for now. @churchjunction in case you could provide additional information as @joedolson asked, feel free to comment here, and I will be happy to test it with the new information and reopen and in case is reproducible, proceed with the next steps to solve the issue

#5 in reply to: ↑ description @khushdoms
4 months ago

Thanks for keeping this ticket moving! I've conducted reproduction testing on a clean WordPress environment per @joedolson's request.

Test Environment

  • WordPress Version: 6.9 RC2
  • Theme: Twenty Twenty-Five (Active) - default theme
  • Plugins: Only Akismet Anti-spam (Active), WordPress Beta Tester (Inactive)
  • Setup: Clean, minimal configuration

Testing Steps

  1. Created new post with title "Test Background Issue"
  2. Accessed Block settings > Color > Background option
  3. Opened background color picker (showing theme colors and custom options)
  4. Attempted to close color picker without selecting a background color
  5. Saved post as draft without any background color selection

Test Results

✓ Post saved successfully as draft
✓ No PHP warnings appeared in editor or logs
✓ No save errors encountered
✓ Background color settings work without requiring a color selection
✓ "Clear" button is available in color picker for resetting background

Conclusion

I cannot reproduce the reported issue on WordPress 6.9 RC2 with Twenty Twenty-Five theme and minimal plugins. The background color/image selection feature works without forcing users to select a color or triggering PHP warnings.

This suggests the issue may be:

  • Theme or plugin-specific (related to custom implementations)
  • Already resolved in the current RC version
  • Reproducible only with specific post types or custom configurations

Would be happy to test with additional information from the original reporter (churchjunction) if they can provide details about their specific theme, plugins, or post type setup where the issue occurs.

Note: See TracTickets for help on using tickets.