Mike War
Forum Replies Created
-
in upgrade.php line 98 aprox.
// v1.4.0 -> v1.7.0 if (version_compare($installed_ver, '1.7.0', '<')) { // add slug fields ngg_maybe_add_column( $wpdb->nggpictures, 'image_slug', "VARCHAR(255) NOT NULL AFTER pid"); ngg_maybe_add_column( $wpdb->nggalbum, 'slug', "VARCHAR(255) NOT NULL AFTER name"); ngg_maybe_add_column( $wpdb->nggallery, 'slug', "VARCHAR(255) NOT NULL AFTER name"); }
This code creates the field image_slug but for some reason my database server does not let you change the script permissions can be my database users do not allow me to add fields to tables.
I resolved to remove the insertion image_slug field temporarily.
in add_image (), add_album () and add_gallery functions.Manually create the fields for the pluggin campatible not break,
my server is at work tendre q wait until Monday. And the code will come back to where it wasIn ngg-db.php – function add_image
if ( false === $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->nggpictures (image_slug, galleryid, filename, description, alttext, meta_data, post_id, imagedate, exclude, sortorder) VALUES (%s, %d, %s, %s, %s, %s, %d, %s, %d, %d)", $slug, $id, $filename, $description, $alttext, $meta_data, $post_id, $imagedate, $exclude, $sortorder ) ) ) { }
on my site I have the same error of 0
addes images. I made a dump of the table then I saw ngg_pictures image_slug field does not exist in my current table.
maybe this makes the function fail insertion into database. The images arrive at the server but not added to the database.I have the same installation of this site in localhost in my pc and works well with wp 3.1 and 1.7.4 NGG and works well. perhaps in the last update for some reason do not update the database table with the new field image_slug.