@tomiga,
That can only be the result of an incomplete upgrade, you’ll have to re-apply the updated code.
Thread Starter
tomiga
(@tomiga)
Can I reinstall it from WordPress menu or i have to do it somehow manually?
Thread Starter
tomiga
(@tomiga)
what about my subscribers email? will they be lost?
2nd question.
I download the source code of plugin but I do not see there class: Subscribe2_List_Table
And at of subscribers.php the line it crashes
$S2ListTable = new Subscribe2_List_Table();
I am not familiar with plugin development so I do not know from where it has: wp-admin/includes/class-wp-list-table.php
(include in your code) and if it is in my wp instalation
I will check this in few hours (now I am at work)
But expect more question
@tomiga,
Provided you don’t erase any files using the WordPress admin interface you won’t lose any data.
I suspect the file that’s causing you issues is the admin/subscribers.php file. In there you’ll fine these few lines:
if ( !class_exists('WP_List_Table') ){
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
}
// Instantiate and prepare our table data - this also runs the bulk actions
$S2ListTable = new Subscribe2_List_Table();
$S2ListTable->prepare_items();
And later in the same file you will fine the ‘Subscribe2_List_Table’ class that extends the core ‘WP_List_Table’ class to display all of the plugin subscriber data.
Thread Starter
tomiga
(@tomiga)
I have compared download files with one on my server. They are the same. Problem still exists. Any other ideas?
@tomiga,
Does the ‘wp-admin/includes/class-wp-list-table.php’ file exist on your server also?
If it does the only other thing I can think of is to move the class code at the bottom of the admin/subscribers.php in Subscribe2 to the top of the file.
@tomiga,
I’ve pulled the ‘Subscribe2_List_Table’ class out into a new file for the next version, that should avoid any future issues along this line.
I think it must be due to different version of PHP being more picky that others when looking at files for class definitions.
Thread Starter
tomiga
(@tomiga)
Ok, I have also class-wp-list-table.
I have updated your code and moved the class definition at top of the file. It is working now!
I am not php expert but you tryied to use class which was not defined (before it was defined in the file). And as far as know php is interpreted language (not compiled) so that can be a problem (I am surprised that it works for you).
So I think fix is required.
Thread Starter
tomiga
(@tomiga)
Just FYI my PHP Version 5.2.17
@tomiga,
PHP is a bit picky, I’m using 5.3.17 and it’s working fine but it is a know issue when extending classes.
You are correct though that perhaps by coding is not the cleanest. I’ve moved the class to an external file and required it, works fine for me so I’ll check those change in later – perhaps you could test them out as a more permanent fix.
Thread Starter
tomiga
(@tomiga)
If you like you can send me fix. I can check it.
Thanks for support.
Thread Starter
tomiga
(@tomiga)
This link is still to old version (no difference in code dates of all files are on 13 dec 20:02). Or something was in cache of serwers.
Thread Starter
tomiga
(@tomiga)
Ok I found correct version. I have taken it from
http://wordpress.org/extend/plugins/subscribe2/developers/
Other versions: Development version
It seems to be ok.
Thx.