Support » Plugins and Hacks » WP Photo Album Plus » [Plugin: WP Photo Album Plus] Can't Upload Photos

  • When trying to upload a photo, I get the following error:

    Could not insert photo. query=INSERT INTO wp_wppa_photos (id, album, ext, name, p_order, description, mean_rating, linkurl, linktitle, timestamp, owner) VALUES (‘136’, ‘6’, ‘jpg’, ‘Bullwinkles.jpg’, ‘0’, ”, ‘0’, ”, ”, ‘1320292120’, ‘coltonholly’)

    1 Photos Uploaded in album nr 6

    Any help? I have used this plugin before and have multiple albums and close to 100 photos that I have uploaded without a problem.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)


    Please try this:

    in the file wp-photo-albums-plus/wppa-upload.php line 507-706 reads:

    // Add photo to db
    $query = $wpdb->prepare('INSERT INTO ' . WPPA_PHOTOS . ' (id, album, ext, name, p_order, description, mean_rating, linkurl, linktitle, timestamp, owner) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)', $id, $album, $ext, $name, $porder, $desc, $mrat, $linkurl, $linktitle, time(), $owner);

    change into:

    // Add photo to db
    $query = $wpdb->prepare('INSERT INTO ' . WPPA_PHOTOS . ' (id, album, ext, name, p_order, description, mean_rating, linkurl, linktitle, timestamp, owner) VALUES (%d, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)', $id, $album, $ext, $name, $porder, $desc, $mrat, $linkurl, $linktitle, time(), $owner);

    Note: there are actually backslashes in the code that cannot be shown here
    i.e. change the first %s into %d after the word VALUES

    I made the recommended change and I still get the same error message.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)


    Please do the following:

    1. Check Table IX item 5: enable wppa+ debugging.
    2. Go to the upload admin page.
    3. Append &debug to the address line in the browser.
    4. Press enter or the goto button on your browser.
    5. Upload a photo.
    6. Watch the addressline it should now read:
    …/wp-admin/admin.php?page=wppa_upload_photos&debug=6143

    You should get more messages anyway and hopefully also message s that explain whats going wrong.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)


    Another suggestion:

    If you can access the mysql tables plese verify if the db tables exist.

    You may run action Setup (Table VIII item 3) to fix this

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP Photo Album Plus] Can't Upload Photos’ is closed to new replies.