5

I'm a developer of a private Wp plugin that has been running for 3+ yrs. The plugin displays in table format users custom information. I just upgraded to v 4.4 and now I'm getting a fatal error: Fatal error: Call to undefined method stdClass::render_screen_reader_content() in .../wp-admin/includes/class-wp-list-table.php on line 760

This is from $myclassextention->display();

If I look at earlier versions the public display function is completely different now from the earlier versions.

I'm not sure what to do...apparently I'm not the only one ... https://wordpress.org/support/topic/fatal-error-in-admin-pages-after-upgrading-to-wordpress-44

Any thoughts? I was thinking of building the table in Bootstrap...and need to get this resolved ASAP...I have over 1100 users using this. The support tickets will start rolling in soon.

BTW this is on a multi-site and rollback is not an option.

Thanks for looking.

PS...I can't post to WordPress tag because I don't have enough points? Really! That's just weird!

EDIT: Here is the format I'm using ...I can't show the exact code.

I tried posting the code and turned into a big mess...here is the template I based it on https://wordpress.org/plugins/custom-list-table-example/ ...like I said this has been working for 3yrs with over 1100+ users.

  • So what is the question? not only it is not clear what are you asking, for this kind of questions if you don't show your code it is unlikely people will be able to help you. – Mark Kaplun Dec 13 '15 at 5:10
  • Updated answer...I'm looking to resolve the error. – user2823774 Dec 13 '15 at 5:22
  • Add your code in the question. TIP: If you add code in the editor, highlight it and click on the {} symbol above the editor, this will indent each line with 4 spaces which constitutes a code block. Alternatively, ident each line with 4 spaces ;-) – Pieter Goosen Dec 13 '15 at 6:48
5

This has been resolved

Had to add 2 new files ...looks like Wordpress moved some methods to new locations.

These are the files that worked for me

// Include WP's list table class
if(!class_exists('WP_List_Table')){
    require_once( ABSPATH . 'wp-admin/includes/class-wp-screen.php' );//added
    require_once( ABSPATH . 'wp-admin/includes/screen.php' );//added
    require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
    require_once( ABSPATH . 'wp-admin/includes/template.php' );
}

Thanks for all who looked.

4

Nice solution you have there. But you must define a $screen property inside WP_List_Table class (or its child class) before pagination method is invoked.

You want to make the $screen property as WP_Screen instance using this function :

$this->screen = get_current_screen();

There you go, and your table is ready to go.

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.