Gallery 1.5.9 Bugs

Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6591
Posted: Mon, 2008-09-15 23:49

This topic is a for users who have installed Gallery 1.5.9 and have specific bugs to report.
General troubleshooting questions do NOT go in this thread, and will be moved or deleted without asking or warning.

Fixed Version are available via SVN or separately from Jens' archive: 1.5.9 fixes, or 1.5.10 pre versions.

Once reported bugs have been acknowledged and fixed, the bug will be noted here, and responses will be deleted to keep the thread readable.

The known list of bugs in 1.5.9, and their statuses:

Fixed:

1.5.10-svn-b1

* Fix: Attempt to delete a subalbum via album commandbox failed.
"delete_item.php not found".

Thanks to Drrrl

1.5.10-svn-b3
* Fix: The slideshow link on mainpage has no brackets when not using icons.
Thanks to Rollcage

1.5.10-svn-b4
* Fix: Convert newlines in RSS in the same way as in the albums view.
Thanks to Rollcage

1.5.10-svn-b5
* Fix: With emailing on an error appeared after recreating thumbs.
Thanks to MrC

* Fix: Voting in thumbsview broken.
Thanks to adegutis

1.5.10-svn-b6
* Fix: PHP Fatal error: Call to undefined function ctype_digit()

Investigation in progress:

Rejected:

Quote:
Warning: strftime() expects parameter 2 to be long, array given in /home/site/gallery/lib/stats.php on line 394

Answer:
This is a problem with images added with 1.5.8.
You can fix this with opening "edit caption" for these images and just press save.

Quote:
German translation broken on Debian

Answer:
This is a problem with system locales. Installing the correct locale and entering this in Gallerys config as locale_alias will solve this.

Quote:
Have you removed the ability to process certain html tags? I can still post links, but not this image.

Answer: Part of the security fixes is a path traversal and xss protection. Thus ../ is not allowed anymore. Please use the full URL.

Login or register to post comments
Drrrl

Joined: 2003-02-02
Posts: 17
Posted: Thu, 2008-09-18 07:14

When you are in an album and try to delete is by selecting "Delete this (sub)album", the pop-up windows appears with the following error:

Not Found

The requested URL /delete_item.php was not found on this server.

If you are one level above, however, and you choose "Delete" from a menu under thumbnail, delete_photo.php script is used and everything is fine.

Gallery version: 1.5.9 (final), unpacked to a new directory (not upgraded)

Login or register to post comments
jifl

Joined: 2003-07-06
Posts: 18
Posted: Fri, 2008-09-19 10:39

Hi Jens,

The "Further hack check" at the top of view_comments.php still isn't quite right. It only needs comments_enable==yes for the whole expression in the 'if' to evaluate to false. I think you meant something like this:

if (! ($gallery->app->comments_enabled == 'yes') ||
    ! ($gallery->user->isAdmin() ||
       $gallery->user->isOwnerOfAlbum($gallery->album) ||
       ( $gallery->user->canViewComments($gallery->album) && isset($gallery->app->comments_overview_for_all) && $gallery->app->comments_overview_for_all == "yes")
      ))

Other than that looks great so far, thanks!

Login or register to post comments
piploff

Joined: 2008-08-27
Posts: 16
Posted: Fri, 2008-09-19 11:14

About

Quote:
Warning: strftime() expects parameter 2 to be long, array given in /home/site/gallery/lib/stats.php on line 394

i fixed this with opening "edit caption" for these images and just press save, but if i add new photos, this warring appear again (ver. 1.5.9)

Login or register to post comments
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6591
Posted: Fri, 2008-09-19 12:14

It should not be related to the album.
Means it doesnt matter if the album was created in 1.5.8, or 1.5.9
Only pictures added in 1.5.8 should show this error.
~ Like this matrix:

Album created | pictured added | Error
-----------------------------------------
1.5.9+ | 1.5.9+ | NO
1.5.9+ | 1.5.8 | YES
1.5.8 | 1.5.9+ | NO
1.5.8 | 1.5.8 | YES
-----------------------------------------

Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6

Login or register to post comments
rollcage

Joined: 2007-01-08
Posts: 14
Posted: Thu, 2008-09-25 16:03

The "true" got left off the following line in albums.php
"gTranslate('core', "Slideshow"), array(), 'display.gif'"

which makes the slideshow link look like "Slideshow" instead of "[Slideshow]".

Correct entry should look like:
gTranslate('core', "Slideshow"), array(), 'display.gif', true

Login or register to post comments
rollcage

Joined: 2007-01-08
Posts: 14
Posted: Thu, 2008-09-25 16:17

I'm not certain this is a bug, but thought I'd get some feedback. I upgraded from 1.5.7 to 1.5.9 and now all my album descriptions which needed to contain <br> to create a newline have massive space between paragraphs. Did something change in the interpretation of the text blocks such that I don't need <br> anymore to establish a newline? If so, I'll have to go back and edit 86 albums worth of descriptions.

I'm also curious about the change to the arrows in base.css.default. Why were the arrows changed to use g-borderright/left? I liked the old look and have had to update base.css.default to retain the black lines instead of dotted white lines. Is there a place I can look to see when these kind of changes are made before I deploy?

Thank you,
Chris

Login or register to post comments
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6591
Posted: Thu, 2008-09-25 17:35

Hello Rollcage,

thanks for the feedback. It everytime VERY welcome.
Can you give me a link to a page with the spacing?

About the CSS change... well, why not? ;-) Its a small change.
Feel free to change it back. I suggest to use base.css as this is not overwritten by an upgrade.

I don't understand the "deploy" question.

Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6

Login or register to post comments
GerhardSchild

Joined: 2008-09-23
Posts: 1
Posted: Thu, 2008-09-25 17:59

Hi Jens,

thanks for your feedback. I did some debugging and found some very strange things going on (the only locales I could set from php were de_DE.utf8 and C, although there were iso8859-locales installed).

Finally things disappeared. Now I was able to fix it by putting
$gallery->app->locale_alias['de_DE'] = "de_DE.iso88591";
into my config.php.

I swear that it didn't work when I started debugging...
Probably locales are cached and don't get updated immediately when you rebuild them (dpkg-reconfigure locales).

Thanks anyway, now it is working as supposed.

Gerhard

Login or register to post comments
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6591
Posted: Thu, 2008-09-25 21:47

Hello Rollcage,

now i know what you mean. Yes there were a change related to this.
\n (newlines) are converted to <br>.

So if you entered newlines, gallery shows now newlines.

There is a Changelog file, but if you want an indeep comparisan, i suggest using a diff tool.

Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6

Login or register to post comments
rollcage

Joined: 2007-01-08
Posts: 14
Posted: Thu, 2008-09-25 23:09

Jens,
Can you please tell me where in the code the newline to <br> conversion is done? Rather than changing the code to remove this feature, I could try programmatically removing the newlines from all my album.dat files since I've historically put the <br>'s in place myself. Any advice?
Thank you,
Chris

Login or register to post comments
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6591
Posted: Fri, 2008-09-26 11:08

In this case its done in lib/content.php
function editCaption(), there is a nl2br.

Gallery 1 has a so called integrityCheck, you could increase the album version number in version.php and write code in classes/Albums.php and classes/AlbumItem.php that modifies your captions.

As this is no bug, i suggest you open a separate thread in the forum where we can continue on this.

Jens
--
Last Gallery v1 Developer.
Tryout the TEST-Version of Gallery 1.6

Login or register to post comments
rollcage

Joined: 2007-01-08
Posts: 14
Posted: Sun, 2008-09-28 14:15

Jens,
It appears as though the RSS feed html isn't getting the same treatment with nl2br. Once I updated all my posts to remove the <br> I had inserted and instead rely on your nl2br function to format my album descriptions, all my RSS entries refreshed and none of them are formatted. Do you have any control on how this text is displayed? If not, I'll have to remember to create my entries in such a way as to bypass the nl2br function so I can enter my own <br> but not create extra space between paragraphs.
Chris

Login or register to post comments
MrC

Joined: 2004-04-20
Posts: 12
Posted: Mon, 2008-10-13 01:35

I'm seeing a "Call to undefined function vd() in .../gallery/classes/Album.php on line 1111". This occurs when trying to rebuild thumbnails, and when $gallery->app->emailOn is "yes".

I also see in the ChangeLog:

Quote:

2005-12-08 Jens Tkotz <jens@peino.de> 1.5.2-cvs-b43
...
* Change: removed unused function vd() (sorry joan ;))

I don't find vd() in the source, so am I correct that this call to vd() wasn't replaced back in 2005? Any fix suggestions? I've disabled emailOn as a workaround.

Login or register to post comments
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6591
Posted: Mon, 2008-10-13 22:34

Oh boy!

This bug is there for nearly 3 years ;-) LOL.

Just remove line 1111 in that file.

Thanks,

Jens
--
Gallery Developer

Login or register to post comments
MrC

Joined: 2004-04-20
Posts: 12
Posted: Tue, 2008-10-14 03:16

Thanks for the response. Yet, is it more complicated that this? User's are getting the "msg should be an array!" error, so some code isn't following the save() function's API. The code looks like:

// send email
if ($gallery->app->emailOn == 'yes' && $success && $msg) {
        if (!is_array($msg)) {
                echo gallery_error(gTranslate('core', "msg should be an array!"));
                vd($msg);
                return $success;
        }
Login or register to post comments
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6591
Posted: Tue, 2008-10-14 14:23

Hi,

you found another bug.
I will make a fix soon.

Manually you can do this:
open rebuild_thumbs:
find $gallery->album->save('Thumbnails recreated');
change to $gallery->album->save(array('Thumbnails recreated'));

Jens
--
Gallery Developer

Login or register to post comments
Drrrl

Joined: 2003-02-02
Posts: 17
Posted: Thu, 2008-10-16 19:14

Jens,

I'm very sorry but it seems that bug "strftime() expects parameter 2 to be long" still exists in 1.5.9.

After my installation of 1.5.9 on 17.09.2008 at around 12:06 I was pretty sure that the problem has gone. But in the same day, in the late evening, one of my users reported the problem to appear with his newly added photos. I ignored it, although the date of file was later than a date of 1.5.9 installation - but both events were so close to each other, that I decided to forget about it, especially after your post you send on 19.09.

Meanwhile, on 30.09, I deleted manually installed 1.5.9 and installed Gentoo-package version instead - but it's still 1.5.9.

And today I have noticed the problem to reappear, with an image I had created and added to an existing album on 7.10. Moreover, I have created two albums on that day, and added several new photo. In one of the albums, for 29 photos added in the same time, only 2 have this problem. In the second album there are 25 photos and 7 of them have this problem.

I realize that it will be very hard to replicate this problem - especially in such situation, where problem appears only for some of the newly added photos. I cannot see any difference between photos with error and without - there were even captured in almost the same time, they come from one camera and were exported to JPGs from Lightroom in one "session" (they come from one event).

Best regards,

Grzegorz

Login or register to post comments
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6591
Posted: Thu, 2008-10-16 20:50

Well, its exactly as you say, its very hard to reproduce.

I will wait till somebody has a way to reproduce.

Sorry,
Jens
--
Gallery Developer

Login or register to post comments
tomrbrand

Joined: 2008-10-30
Posts: 1
Posted: Fri, 2008-10-31 04:01

Hi, just upgraded from 1.5.6 to 1.5.9 and have come across a few issues. I have upgraded from earlier releases several times in the past without issue.

My albums are at http://pics.diveclubri.org/

1) I have 82 albums; memory requirements seem to have increased; album updates are failing
PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 43 bytes) in /srv/www/vhosts/DCRI/gallery/classes/Album.php on line 992, referer: http://tnbrand.getmyip.com:8080/DCRI/gallery/albums.php?page=1

Increasing mem allocation to 16MB fixed this issue

2) Call to a non-existant function:
PHP Fatal error: Call to undefined function ctype_digit() in /srv/www/vhosts/DCRI/gallery/lib/valchecks.php on line 158, referer: http://tnbrand.getmyip.com:8080/DCRI/gallery/DCRI2008

To get around this, I used the suggestion here: http://osdir.com/ml/web.wiki.pmwiki.user/2004-06/msg00246.html

3) When uploading images with Gallery Remote, and unchecking the 'resize before upload', the upload fails with the error:
Upload error: Upload failed: ' <div class="g-notice"> <div class="g-error left g-message"><img src="http://tnbrand.getmyip.com:8080/DCRI/gallery/images/icons/notice/error.gif" alt="" title=""> Item looks like an image, but has no dimensions? Please verify it's not a broken image. </div> </div> '.

The apache logs show:
PHP Warning: chmod() [<a href='function.chmod'>function.chmod</a>]: No such file or directory in /srv/www/vhosts/DCRI/gallery/platform/fs_unix.php on line 35

Uploading of images when leaving the 'resize before uploading' checked works without a problem.

Gallery URL (optional but very useful): http://tnbrand.getmyip.com:8080/DCRI/gallery
Gallery version:1.5.9
Apache version: Apache/2.2.3 (Linux/SUSE)
PHP version: PHP v5.1.2
Graphics Toolkit:
Netpbm 10.26.22
ImageMagick 6.4.2 (server)
Operating system:
Server: SuSE Enterprise Linux 10 SP1 (SLES10SP1)
Client: Mac OSX 10.5, Windows XP-Pro, (SLES10SP1)
GalleryRemote 1.4.2-b24
also tried with GalleryRemote 1.5

Cheers,
Tom

Login or register to post comments
gethjones

Joined: 2008-11-16
Posts: 2
Posted: Sun, 2008-11-16 19:54

I get the same as tomrbrand with regard to Item looks like an image, but has no dimensions? Please verify it's not a broken image.

Login or register to post comments