WordPress.org

Ready to get started?Download WordPress

Forums

WP Photo Album Plus
Can't Upload Photos (5 posts)

  1. broncomanbrad
    Member
    Posted 2 years ago #

    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/

  2. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    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

  3. broncomanbrad
    Member
    Posted 2 years ago #

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

  4. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  5. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic