WordPress.org

Ready to get started?Download WordPress

Forums

WP Photo Album Plus
[resolved] WP Photo Album Plus - Upgrade to 4.2.4 Issues (14 posts)

  1. snakes_photos
    Member
    Posted 2 years ago #

    Hi

    I have updated to version 4.2.4 and I have had errors saying that the following databases could not be created.
    wp_wppa_albums
    wp_wppa_photos
    wp_wppa_rating
    wp_wppa_comments

    I have tried deactivating and reactivating the plugin and also changing the CHMOD but it still gives the same errors.

    http://wordpress.org/extend/plugins/wp-photo-album-plus/

  2. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    Does the plugin work?
    The error messages may be faulty.

  3. snakes_photos
    Member
    Posted 2 years ago #

    It appears to be. I haven't tried uploading any new photos yet. The settings page also complains that the databases are missing or have a problem.

  4. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    I recently built in an extra check as a diagnostic for people who have certain problems. It seems that there are mysql implementations that act different from what i expect.

    If the site works, you should not worry, in that case the error message is faulty.

    I made a tiny change in an attemp to make this error message more reliable.

    If you re-install the plugin (read this topic if you need help) to get hotfix 002, the messages may be gone. If so, please tell me.

  5. snakes_photos
    Member
    Posted 2 years ago #

    I have done that and I still get the errors saying the database tables cannot be created.

  6. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    It could be the fact that the query to retrieve the list of existing tables returns them in uppercase in some mysql implementations while i check them against the lowercase names as how they are created.
    If this is the case, please change the very last function of wppa-common-functions.php into:

    function wppa_table_exists($xtable) {
    global $wpdb;
    
    	$tables = $wpdb->get_results($wpdb->prepare("SHOW TABLES FROM ".DB_NAME), 'ARRAY_A');
    
    	foreach ($tables as $table) {
    		if ( is_array($table) )	foreach ( $table as $item ) {
    			if ( strcasecmp($item, $xtable) == 0 ) return true;
    		}
    	}
    	return false;
    }
  7. snakes_photos
    Member
    Posted 2 years ago #

    I have tried that and deactivated and reactivated the plugin and I still get the same errors.

    My host versions are below
    MySQL Server: 5.1.56-community-log
    Protocol: 10
    MySQL Client: 5.1.48
    PHP5.2

  8. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    Please try the following:

    just after:

    $tables = $wpdb->get_results($wpdb->prepare("SHOW TABLES FROM ".DB_NAME), 'ARRAY_A');

    in the above function add:

    print_r($tables);

    This will generate 4 times a lot of output in the header of the Settings screen.
    Please catch it once and post it here, so i can see what i have to look for.

  9. snakes_photos
    Member
    Posted 2 years ago #

    Is this the output you are looking for?

    Array ( ) [WPPA+ dbg msg: Unexpected error: Missing database table: wp_wppa_albums]
    Array ( ) [WPPA+ dbg msg: Unexpected error: Missing database table: wp_wppa_photos]
    Array ( ) [WPPA+ dbg msg: Unexpected error: Missing database table: wp_wppa_rating]
    Array ( ) [WPPA+ dbg msg: Unexpected error: Missing database table: wp_wppa_comments]

  10. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    No. I expect something like:

    Array ( [0] => Array ( [Tables_in_DB977066] => wp_commentmeta )
    [1] => Array ( [Tables_in_DB977066] => wp_comments )
    [2] => Array ( [Tables_in_DB977066] => wp_links )
    [3] => Array ( [Tables_in_DB977066] => wp_options )
    [4] => Array ( [Tables_in_DB977066] => wp_postmeta )
    [5] => Array ( [Tables_in_DB977066] => wp_posts )
    [6] => Array ( [Tables_in_DB977066] => wp_term_relationships )
    [7] => Array ( [Tables_in_DB977066] => wp_term_taxonomy )
    [8] => Array ( [Tables_in_DB977066] => wp_terms )
    [9] => Array ( [Tables_in_DB977066] => wp_usermeta )
    [10] => Array ( [Tables_in_DB977066] => wp_users )
    [11] => Array ( [Tables_in_DB977066] => wp_wppa_albums )
    [12] => Array ( [Tables_in_DB977066] => wp_wppa_comments )
    [13] => Array ( [Tables_in_DB977066] => wp_wppa_photos )
    [14] => Array ( [Tables_in_DB977066] => wp_wppa_rating ) )

    four times.

    It looks like $wpdb->get_results($wpdb->prepare("SHOW TABLES FROM ".DB_NAME), 'ARRAY_A'); does not work for you, it returns an empty array...???

  11. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    Would you mind trying this:

    $tables = $wpdb->get_results($wpdb->prepare("SHOW TABLE STATUS FROM ".DB_NAME), 'ARRAY_A');

    i.e. TABLE STATUS in place of TABLES

  12. snakes_photos
    Member
    Posted 2 years ago #

    That didn't look like it did anything.

    I have looked it MySQL and the tables are there.

  13. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    This should be fixed in 4.2.6 or later. Is it in yours also?

  14. snakes_photos
    Member
    Posted 2 years ago #

    Yeah this is now working.

    Thanks for your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic