Support » Plugin: Slideshow Gallery LITE » [Plugin: Slideshow Gallery] Data won't insert to wp_gallery_galleriesslides table

  • Resolved siteadvice

    (@siteadvice)


    I can create galleries and upload images, but when it comes to bringing the two together, nothing happens. I select the required gallery checkbox the image edit form and click Save but every image I’ve uploaded is still linked to zero galleries.

    In MySQL, these queries return results:

    select * from wp_gallery_slides
    select * from wp_gallery_galleries

    but this query returns no results:

    select * from wp_gallery_galleriesslides

    I have successfully entered data into wp_gallery_galleriesslides manually, but I need to hand the project over to a client who won’t be able to do that (and doubtless wouldn’t want to if she could!)

    Incidentally, I tried editing an image *after* manually editing it into MySQL and yes, as expected, it deleted the relevant row from wp_gallery_galleriesslides and thus removed it from the slideshow.

    If it helps, I am using WordPress 3.4.1 on Windows 2008 Server.

    http://wordpress.org/extend/plugins/slideshow-gallery/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m having the same issue. I believe it is a bug. Not sure how to fix though. Did you have any luck?

    SOLVED IT!

    The problem lied within the insert query in the (whatever your wp table prefix is)_galleriesslides table.

    If you locate the db.php file within the helpers folders within the gallery slide plugin and find the following line:
    $galleryslidequery = "INSERT INTO” . $wpdb -> prefix . strtolower($this -> pre) . “_galleriesslides(id,slide_id,gallery_id,created,modified) VALUES ('', '" . $slide_id . "', '" . $gallery_id . "', '" . $date . "', '" . $date . "');";

    and change it to:

    $galleryslidequery = "INSERT INTO” . $wpdb -> prefix . strtolower($this -> pre) . “_galleriesslides(slide_id,gallery_id,created,modified) VALUES ('" . $slide_id . "', '" . $gallery_id . "', '" . $date . "', '" . $date . "');";

    You should be good. Insert queries cannot have blank or null values. the id was being set to nothing, so just removing it solved the issue.

    Thread Starter siteadvice

    (@siteadvice)

    I never delved into the code – I used an alternative slider instead. But I like this one, so I will definitely go back to it and take a look in light of your advice. I can see what you’ve done and it makes perfect sense.

    I just wanted to say that the above solution worked like a charm. Thank you so much for posting this. I was stuck on the for 3 days.

    Plugin Author Tribulant Software

    (@contrid)

    Thank you for all the posts.
    I’m glad to see that this is resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Slideshow Gallery] Data won't insert to wp_gallery_galleriesslides table’ is closed to new replies.