Opened 9 years ago
Closed 4 years ago
#35155 closed defect (bug) (fixed)
Error messages still get covered over by wp admin menu.
Reported by: | EmpireOfLight | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 5.5 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Administration | Keywords: | has-patch has-screenshots |
Focuses: | ui, administration | Cc: |
Description
This is a follow-up to #26312. See attached.
Attachments (7)
Change History (21)
#2
@
9 years ago
PHP error messages can output before the wp-admin application drops an <html>
tag, what can we do here?
#3
@
9 years ago
For a long time I had some CSS in a mu-plugin which shifted xDebug styled errors into the visible display area, but it'd still render the admin menu hidden.
I'm curious if a JS solution could be used to detect the broken view, and add the correct top-offsets to make it mostly appear below the PHP error output..
#4
@
9 years ago
Would using error_get_last()
be safe? Then it would be as simple as printing out a body CSS class and use some styling:
if ( error_get_last() ) { $admin_body_class .= ' php-error'; }
#5
@
9 years ago
- Component changed from Customize to Administration
- Focuses ui added
- Keywords has-patch has-screenshots added
#6
@
9 years ago
- Keywords dev-feedback added
The plugin is an example how to use the set_error_handler
, that plugin add a wrapper in case if the error is showed in the admin backend.
In that case add the message error
class to the wrapper with that have the same styles of the error in WordPress.
The plugin also include 2 fake error for testing.
I think that we can convert that as a patch but I don't think that is complete and I have no idea what is the ideal file.
Maybe I can create a plugin for the Wordpress repo.
#7
@
9 years ago
I uploaded that plugin on gist to manage as a real plugin https://gist.github.com/Mte90/c869ed85661d65b8c1b0
#9
@
4 years ago
- Keywords dev-feedback removed
- Owner set to audrasjb
- Status changed from new to accepted
Hi,
I'd prefer the body class approach as we don't absolutely need to have design on those error/warning notices. We just want to make them visible.
35155.1.diff
refreshes the old patch and uses em
margin. See screenshot above.
Should be safe to go in WP 5.5. Any thought on this @SergeyBiryukov?
Cheers,
Jb
#10
@
4 years ago
I like this. Simple but effective.
What does this behaviour look like when there's an error but display_errors is false?
@
4 years ago
Administration: Print a CSS class when display_errors is enabled to make PHP errors visible in WP-Admin
Shows errors covered by menu. When wp_debug is set to true in wp-config.php