Loading...
 
Skip to main content

Architecture / Installation


Broken Image Gallery Problem(s)

Installed v1.7.4 on Tuesday Night (over a prior 1.7.x distribution), and have been having a long term problem with Image Galleries... The problem manifests itself as follows (I've been seeing folks complaining about similar issues in earlier forum posts, so I think my problem may be related...)

I set up an image gallery with the following parameters:

1) Running GD (yep... I've checked with phpinfo... It should be working)

2) Other available images sizes (I've tried 320x200 and 640x480)... My images are natively 1600x1200 and I want GD to decimate the images so the user doesn't get a screenfull of image... 😊

I upload an image... It works GREAT... The decimated image(s) are created properly in the directory I've set up, and all looks good...

Now...

If I go back to the image, I get the "big red X"... I click on the big red X and get the 1600x1200 image without any problems... Thumbnails are working great as well!

I also log the following error message after tickling php.ini appropriately...

PHP Warning: MYSQL error: DB Error: already exists in query:insert into tiki_images_data(imageId,xsize,ysize,! type,filesize,f
iletype,filename,data)! values (546,175,200,!!!!!'s',8328,!
'image/pjpeg','175x200_2003-30-a-full_jpg.jpg','')
in /var/www/html/tiki/lib/tikilib.php on line 101

Two things...

1) I'd like to thank the developers for all of their hard work... I use TikiWiki in several places, and it has been wonderful!!! Installation is pretty much trouble free (the normal fare), and upgrades are usually pretty smooth!! Well done!

2) I HATE to deliver a bug report without a suggested patch where open source is concerned... That being said, if no one has a quick fix or a patch that has been already uncanned and made ready to eat, I'll take a crack at fixing the problem... (the only caveat being that I can't give any kind of schedule... This looks like a problem others have seen, and as I'm running 1.7.x it may have been fixed in 1.8.x)

Best Regards,

-jw

Heh... Didn't take as long as I thought...

Here is the fix...

lib/imagegals/imagegallib.php (line 479)...

Change "INSERT" to "INSERT IGNORE"...

:-)

Tested under the conditions that caused the bug... I would not say I've tested exhaustively... Feedback?

Best Regards!

-jw

> lib/imagegals/imagegallib.php (line 479)...
>
> Change "INSERT" to "INSERT IGNORE"...

Hi JW -

Thank you for your hard work.

I am having similar problems on 1.8RC3, which I downloaded and installed yesterday. There is no line 479 in that file in this RC, so I thought I would write to see if someone could help.

  • using images uploaded to DB not a folder
  • using GD, and I have it installed on my server
  • logged in as admin, set gallery permissions in the groups admin section, just to make sure
  • upload behavior is inconsistent - sometimes the upload page just dies leaving an "unrefreshed" IE error screen with just black text on a white background, and sometimes it works, with the image uploaded but showing as a red X mark for both the image and the thumb.


In addition, I tried making a directory, and setting its perms to 777 but this does not seem to work either. I am not sure where the directory has to be rooted. I tried tiki/img/user where user is the chmoded directory I made, and /html.../rc/tiki/img/user from the root of the public web space, both with leading and trailing /'s but nothing seemed to work.

Any ideas? Your help is much appreciated. Thank you!

Sincerely,
Rick Cogley


> lib/imagegals/imagegallib.php (line 479)...
>
> Change "INSERT" to "INSERT IGNORE"...

Hi JW -

Thank you for your hard work.

I am having similar problems on 1.8RC3, which I downloaded and installed yesterday. There is no line 479 in that file in this RC, so I thought I would write to see if someone could help.

  • using images uploaded to DB not a folder
  • using GD, and I have it installed on my server
  • logged in as admin, set gallery permissions in the groups admin section, just to make sure
  • upload behavior is inconsistent - sometimes the upload page just dies leaving an "unrefreshed" IE error screen with just black text on a white background, and sometimes it works, with the image uploaded but showing as a red X mark for both the image and the thumb.


In addition, I tried making a directory, and setting its perms to 777 but this does not seem to work either. I am not sure where the directory has to be rooted. I tried tiki/img/user where user is the chmoded directory I made, and /html.../rc/tiki/img/user from the root of the public web space, both with leading and trailing /'s but nothing seemed to work.

Any ideas? Your help is much appreciated. Thank you!

Sincerely,
Rick Cogley


Try this.

Any empty line after ?> will cause the broken link problem in Image Gallery. Check all the called php pages with crimpson editor or any editing tool and remove the empty line.