[wp-hackers] Requesting advice regarding comments form errors, accessibility and patch for http://core.trac.wordpress.org/ticket/4332

Bjorn Wijers burobjorn at gmail.com
Wed Feb 24 13:00:31 UTC 2010


Jeremy,

I completely agree with your view on Wordpress and the need for better
error reporting and this is certainly one of those issues which would
benefit from it. Yet I have no idea how we can get this going. I'm more
than willing to help out and write code, but I'm afraid our efforts
might be in vain if we cannot get one or more core comitters interested
in this and make sure it gets landed in the wordpress core.

Can somebody help us out with this?

All the best,
BjornW





> FWIW I think this could be one of the uses of an improved WP_Error
> system overhaul. While looking into the WP_Error class to maybe use it
> in the Settings API I realized that it and its uses are very haphazard
> and based on specific uses rather than a holisitic plan for Errors in
> WordPress.
> 
> This ticket is about the show_message() function, which should be part
> of WP_Error but isn't http://core.trac.wordpress.org/ticket/12254
> 
> I think that if we can get all error-related stuff into the class and
> build it up as a real one-stop-shop for adding, manipulating, fetching
> and displaying errors (as well as adding error 'types' so it can
> support red/yellow/green styles) then a lot of new uses will suddenly
> appear for them. They also need some external helper functions that
> make it easy to add errors into a specific error object without
> globalizing it, something like:
> 
> add_error('comment_form', $code, $message, $data);
> 
> Which would find the WP_Error instance associated with 'comment_form'
> and add the error to it.
> 
> IMHO WP should try to set up all systems to make it easy to add errors
> in admin/plugin code that will then be displayed automatically in the
> right place (i.e. your added error shows in 'admin_notices'
> automatically rather than you adding a whole hook just for that).
> 
> One last thought is that, in terms of adding the errors into the theme
> world which is admittedly a pretty big mess since so many people will
> need to edit their themes to accommodate, it wouldn't be that hard to
> achieve the right CSS as long as we stick to a simple paradigm of css
> class names similar to what is used in the admin, where 'updated' is
> yellow and 'error' is red. It would mean adding like 3 quick
> definitions to your theme's css that would cover it, and in many cases
> (like on my main site) there is already a .error class that would just
> work out of the box ;)
> 


-- 

met vriendelijke groet,
Bjorn Wijers

* b u r o b j o r n .nl *
digitaal vakmanschap | digital craftsmanship

Concordiastraat 68-126
3551 EM Utrecht
The Netherlands

phone: +31 6 49 74 78 70
http://www.burobjorn.nl


More information about the wp-hackers mailing list