forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: kamikaze cow on January 25, 2011, 09:52:23 pm

Title: Critical error (Facebook plugin or not?)
Post by: kamikaze cow on January 25, 2011, 09:52:23 pm
I tried to save an album description but I was given an error message:

While executing query 'SELECT filepath, filename, url_prefix FROM gal15_pictures WHERE pid = ' in plugins/facebook/codebase.php on line 52
mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

My first idea was that the plugin was wrong, but I remember, I added pictures to this album in two parts because the process was aborted near the 170th picture. After the abortion I ran the batch process again from the 170th pictures (fortunately Coppermine knew what picture was the last image). Is it possible that the engine made the resized images (eg. thumbnail) but didn't write the picture data to the database?

Then I tried to open images and I was given the same error message with this url:
http://www.salsafuerte.hu/gallery/displayimage.php?album=81&pos=177
(I will switch off the plugin in the morning because of visitors)

Thank you for any answers.
Title: Re: Critical error (Facebook plugin or not?)
Post by: TeknoSounds on January 26, 2011, 07:11:05 am
Verified.  Same issue here:
Code: [Select]
While executing query 'SELECT filepath, filename, url_prefix FROM cpg132_pictures WHERE pid = ' in plugins/facebook/codebase.php on line 47

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Posting this over in the Facebook Share thread.
Title: Re: Critical error (Facebook plugin or not?)
Post by: s2sinner on January 26, 2011, 09:29:15 am
I have this problem also....When I Unistall the facebook plugin all is back to normal.
Title: Re: Critical error (Facebook plugin or not?)
Post by: papukaija on January 26, 2011, 04:33:19 pm
What is your plugin version?
Title: Re: Critical error (Facebook plugin or not?)
Post by: s2sinner on January 27, 2011, 10:50:23 pm
Hi sorry for the delay...

Is 1.6
Title: Re: Critical error (Facebook plugin or not?)
Post by: papukaija on January 28, 2011, 03:31:23 am
If you are using the latest version of this plugin (v.1.6), then it means that DISPLAYIMAGE_PHP is also defined somewhere else than in displayimage.php.
I'll see the use of DISPLAYIMAGE_PHP in CPG's core files. If it's used somewhere in addition to displayimage.php, I'll try to make that file's load detection more reliable.
Title: Re: Critical error (Facebook plugin or not?)
Post by: papukaija on January 28, 2011, 02:44:41 pm
I'll see the use of DISPLAYIMAGE_PHP in CPG's core files. If it's used somewhere in addition to displayimage.php, I'll try to make that file's load detection more reliable.
That constant is also defined in dbinput.php. Please try and report if replacing

Code: [Select]
if (defined('DISPLAYIMAGE_PHP')) { //is displayimage.php loaded?in codebase.php, at line 43, by
Code: [Select]
if (defined('DISPLAYIMAGE_PHP') && ($superCage->get->keyExists('pid') == TRUE)) { //is displayimage.php loaded?fixes the error message issue?
Title: Re: Critical error (Facebook plugin or not?)
Post by: papukaija on January 31, 2011, 07:13:39 pm
This issue has been fixed (http://forum.coppermine-gallery.net/index.php/topic,65740.msg344150.html#msg344150) in v.1.7 of the FB sharer plugin.