Error on album deletion.

51 views
Skip to first unread message

Harold Hallikainen

unread,
Aug 17, 2022, 4:21:34 PM8/17/22
to Gallery 3 Users
I get the error below on trying to delete an album. It appears it does not like a long filename, though it took it in a server upload. So, how do I fix this?

THANKS!

Harold

Hey wait, you're an admin! We can tell you stuff.

There's an error message below and you can find more details in gallery3/var/logs (look for the file with the most recent date on it). Stuck? Stop by the Gallery 3 Forums and ask for help. You can also look at our list of open tickets to see if the problem you're seeing has been reported. If you post a request, here's some useful information to include:

Platform information
  • Host name: kiwi.hallikainen.org
  • Operating system: Linux 4.18.0-372.16.1.el8_6.x86_64
  • Apache: Unknown
  • PHP: 7.2.24
  • MySQL: 8.0.26
  • Server load: 0.87 1.22 1.33
  • Graphics toolkit: imagemagick
Gallery stats
  • Version: 3.1.3 (Revival)
  • Albums: 75
  • Photos: 2085

Database_Exception [ Database Error ]:#1406: Data too long for column 'relative_path_cache' at row 1 [ UPDATE `items` SET `relative_path_cache` = 'MembersOnly/Slideshow/6-Logos/KCPR%20Artwork/Julie_Meridian_1998_Fundraiser_Julie%20drew%20editorial%20cartoons%20for%20the%20Mustang%20Daily_%20In%201999%2C%20while%20sitting%20on%20the%20couch%20in%20KCPR%27s%20lobby%2C%20she%20drew%20this%20fundraising%20design.jpg', `relative_url_cache` = 'MembersOnly/Slideshow/6-Logos/KCPR-Artwork/Julie_Meridian_1998_Fundraiser_Julie-drew-editorial-cartoons-for-the-Mustang-Daily_-In-1999-while-sitting-on-the-couch-in-KCPR-s-lobby-she-drew-this-fundraising-design' WHERE `id` = '2855' ]
  1. SYSPATH/libraries/Database_Mysqli_Result.php[ 27 ]

    22        } 23        elseif (is_bool($result)) 24        { 25            if ($result == FALSE) 26            { 27                throw new Database_Exception('#:errno: :error [ :query ]', 28                    array(':error' => $link->error, 29                    ':query' => $sql, 30                    ':errno' => $link->errno)); 31            } 32            else
  2. SYSPATH/libraries/Database_Mysqli.php[ 79 ] » Database_Mysqli_Result_Core->__construct( arguments )

  3. SYSPATH/libraries/Database.php[ 272 ] » Database_Mysqli_Core->query_execute( arguments )

  4. MODPATH/gallery/libraries/MY_Database.php[ 48 ] » Database_Core->query( arguments )

  5. SYSPATH/libraries/Database_Builder.php[ 973 ] » Database->query( arguments )

  6. SYSPATH/libraries/ORM.php[ 804 ] » Database_Builder_Core->execute( arguments )

  7. MODPATH/gallery/libraries/MY_ORM.php[ 34 ] » ORM_Core->save()

  8. MODPATH/gallery/libraries/ORM_MPTT.php[ 79 ] » ORM->save()

  9. MODPATH/gallery/models/item.php[ 544 ] » ORM_MPTT_Core->save()

  10. MODPATH/gallery/models/item.php[ 305 ] » Item_Model_Core->save()

  11. MODPATH/gallery/models/item.php[ 170 ] » Item_Model_Core->relative_path()

  12. MODPATH/gallery/models/item.php[ 94 ] » Item_Model_Core->file_path()

  13. MODPATH/gallery/libraries/ORM_MPTT.php[ 96 ] » Item_Model_Core->delete()

  14. MODPATH/gallery/models/item.php[ 98 ] » ORM_MPTT_Core->delete()

  15. MODPATH/gallery/libraries/ORM_MPTT.php[ 96 ] » Item_Model_Core->delete()

  16. MODPATH/gallery/models/item.php[ 98 ] » ORM_MPTT_Core->delete()

  17. MODPATH/gallery/libraries/ORM_MPTT.php[ 96 ] » Item_Model_Core->delete()

  18. MODPATH/gallery/models/item.php[ 98 ] » ORM_MPTT_Core->delete()

  19. MODPATH/gallery/controllers/quick.php[ 104 ] » Item_Model_Core->delete()

  20. {PHP internal call} » Quick_Controller->delete( arguments )

  21. SYSPATH/core/Kohana.php[ 331 ] » ReflectionMethod->invokeArgs( arguments )

  22. SYSPATH/core/Event.php[ 208 ] » Kohana_Core::instance( arguments )

  23. APPPATH/Bootstrap.php[ 67 ] » Event_Core::run( arguments )

  24. DOCROOT/index.php[ 123 ] » require( arguments )

Environment

J.R.

unread,
Aug 17, 2022, 5:50:15 PM8/17/22
to gallery...@googlegroups.com
Harold,

Yeah... in these days when super-long file and folder/album names are the norm, we need to remember that Gallery 3 was created over 10 years ago when there was often a limit on the length of a name. The error message you sent us definitely indicates that's what happened.

There's a chance that the album was never actually created and so you don't have to delete it. Can you navigate to it within the Gallery interface? If so, is there something there -- or is it totally blank? Let us know about that to help target the problem.

If you can't navigate to it, then it's probably did not get logged into the Gallery databases because of the name-too-long error and you can forget about it and just create a new album with a shorter name and see if that works. How long can an album name be? Dang, I have no idea. I have an album with a name 30 characters long and that includes 3 "spaces" in the name which works fine Did you use any special characters in the name? That might cause a problem.

It looks like the album name your tried to create has at least 100 characters. Yeah, almost certainly too long. Even if the system accepted a name that long, doing lots of super-long names like that is going to slow your gallery performance to a crawl. Also it looks like in the middle of the name you have an "underline" character:
-Mustang-Daily_-

Finally, this error-on-delete album can be cleared by going into your Gallery as admin, going over to "Maintenance" and running all of the Maintenance Procedures you see there in the order they appear (but skip "Update Translations" as that translation service no longer exists). If you've never done this before, the final, most important procedure called "Fix Your Gallery" will take quite a long while to complete. This process makes an attempt to clean up database errors and cross-link failures. Sometimes you have to go through all the procedures in order several times to get a good result.

It looks like you already have 75 working albums containing about 2085 images... so the system has been working up to now. Have you changed anything about the installation lately? Added any modules? And if you're using the slideshow module be aware that it has not been updated in a long time and seems to be problematic, particularly when accessing  a lot of images.

-- J.R.




--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gallery-3-users/fc8495c8-d9df-4217-b75d-6bcd9f957b8dn%40googlegroups.com.

Harold Hallikainen

unread,
Aug 17, 2022, 10:13:07 PM8/17/22
to gallery...@googlegroups.com
Thanks for the quick response! Running "Fix your Gallery" gives me a
similar error message, then it quits:

Fix your Gallery
#1406: Data too long for column 'relative_path_cache' at row 1 [ UPDATE
`items` SET `relative_path_cache` =
'MembersOnly/Slideshow/6-Logos/KCPR%20Artwork/Julie_Meridian_1998_Fundraiser_Julie%20drew%20editorial%20cartoons%20for%20the%20Mustang%20Daily_%20I

More ideas?

THANKS!

Harold
> You received this message because you are subscribed to a topic in the
> Google Groups "Gallery 3 Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/gallery-3-users/jvtpS6q7YS0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> gallery-3-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gallery-3-users/91107fd3-1522-742a-b520-b485356edf65%40thepostalzone.com.
>


--
FCC Rules Updated Daily at http://www.hallikainen.com
Not sent from an iPhone.

Harold Hallikainen

unread,
Aug 17, 2022, 10:15:16 PM8/17/22
to gallery...@googlegroups.com
Looking at the log, I see:

Task Fix your Gallery started (task id 5)
Database_Exception: #1406: Data too long for column 'relative_path_cache'
at row 1 [ UPDATE `items`
SET `relative_path_cache` =
'MembersOnly/Slideshow/6-Logos/KCPR%20Artwork/Julie_Meridian_1998_Fundraiser_Julie%20drew%20editorial%20cartoons%20for%20the%20Mustang%20Daily_%20In%201999%2C%20while%20sitting%20on%20the%20couch%20in%20KCPR%27s%20lobby%2C%20she%20drew%20this%20fundraising%20design.jpg',
`relative_url_cache` =
'MembersOnly/Slideshow/6-Logos/KCPR-Artwork/Julie_Meridian_1998_Fundraiser_Julie-drew-editorial-cartoons-for-the-Mustang-Daily_-In-1999-while-sitting-on-the-couch-in-KCPR-s-lobby-she-drew-this-fundraising-design'
WHERE `id` = '2855' ] in
/home/kcpr/public_html/gallery3/system/libraries/Database_Mysqli_Result.php:27
Stack trace:
#0
/home/kcpr/public_html/gallery3/system/libraries/Database_Mysqli.php(79):
Database_Mysqli_Result_Core->__construct(false, 'UPDATE `items`\n...',
Object(mysqli), true)
#1 /home/kcpr/public_html/gallery3/system/libraries/Database.php(272):
Database_Mysqli_Core->query_execute('UPDATE `items`\n...')
#2
/home/kcpr/public_html/gallery3/modules/gallery/libraries/MY_Database.php(48):
Database_Core->query('UPDATE `items`\n...')
#3
/home/kcpr/public_html/gallery3/system/libraries/Database_Builder.php(973):
Database->query('UPDATE `items`\n...')
#4 /home/kcpr/public_html/gallery3/system/libraries/ORM.php(804):
Database_Builder_Core->execute(Object(Database_Mysqli))
#5
/home/kcpr/public_html/gallery3/modules/gallery/libraries/MY_ORM.php(34):
ORM_Core->save()
#6
/home/kcpr/public_html/gallery3/modules/gallery/libraries/ORM_MPTT.php(79):
ORM->save()
#7 /home/kcpr/public_html/gallery3/modules/gallery/models/item.php(544):
ORM_MPTT_Core->save()
#8 /home/kcpr/public_html/gallery3/modules/gallery/models/item.php(305):
Item_Model_Core->save()
#9
/home/kcpr/public_html/gallery3/modules/gallery/helpers/gallery_task.php(692):
Item_Model_Core->relative_path()
#10 /home/kcpr/public_html/gallery3/modules/gallery/helpers/task.php(90):
gallery_task_Core::fix(Object(Task_Model))
#11
/home/kcpr/public_html/gallery3/modules/gallery/controllers/admin_maintenance.php(195):
task_Core::run('5')
#12
/home/kcpr/public_html/gallery3/modules/gallery/controllers/admin.php(62):
Admin_Maintenance_Controller->run('5')
#13 [internal function]: Admin_Controller->__call('Admin_maintenan...',
Array)
#14 /home/kcpr/public_html/gallery3/system/core/Kohana.php(331):
ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#15 /home/kcpr/public_html/gallery3/system/core/Event.php(208):
Kohana_Core::instance(NULL)
#16 /home/kcpr/public_html/gallery3/application/Bootstrap.php(67):
Event_Core::run('system.execute')
#17 /home/kcpr/public_html/gallery3/index.php(123):
require('/home/kcpr/publ...')
#18 {main}



On Wed, August 17, 2022 7:13 pm, 'Harold Hallikainen' via Gallery 3 Users
> https://groups.google.com/d/msgid/gallery-3-users/16b461c9da1cd1af9b1c558311ff0197.squirrel%40hallikainen.org.

J.R.

unread,
Aug 18, 2022, 3:16:08 AM8/18/22
to gallery...@googlegroups.com
Harold,

Hmmm... this could be serious, since I've never seen the Fix Your Gallery procedure actually "quit"  and abort even when there was some scrambled stuff in my own database. But it may not have actually quit -- sometimes it will chew on a problem it has found for an hour or more until it finally gives up and moves on to other operations and finally completes. So sometimes it can look like the  Fix Your Gallery procedure has "locked up", because it's just sitting there, not changing -- but it only looks like it's locked up -- at some point it should finish with a message that says:

" 2085 / 2079 operations complete "
 
-- which indicates that out of the 2085 diagnostic check-and-attempt-to-repair operations it ran, all but 6 of them completed successfully. It is not unusual to have a few operations which did not complete, but if there are a lot of them then that's a cause for concern.

The problem seems to be caused by an image file named:

Julie_Meridian_1998_Fundraiser_Julie-drew-editorial-cartoons-for-the-Mustang-Daily_-In-1999-while-sitting-on-the-couch-in-KCPR-s-lobby-she-drew-this-fundraising-design.jpg


This is a very bad image name to use in a database system because there are no spaces between the words, like, the words in the name-are-all_connected-with-a-chain-of-hyphens-and_underline_characters which means the name cannot "word wrap" when it is placed in a text field in the database. It all has to fit in the field on one line and database fields always have a specified size which was exceeded by the name having to be treated as one continuous word. That's probably what has thrown the cross-linking for the album out of whack. In the future, better to leave spaces between words in image file names (or an album name, for that matter)
.

As for having any other suggestions, please answer the question I asked earlier to give me some idea of what to try next:

Can you navigate to the problem album with the regular Gallery user interface? If you can see the album, can you click on it and get into it? Are there any pictures in there -- or is it just a totally empty album?

Let me know.

-- J.R.


On 8/17/22 10:15 PM, 'Harold Hallikainen' via Gallery 3 Users wrote:
Looking at the log, I see:

Task Fix your Gallery started (task id 5)
Database_Exception: #1406: Data too long for column 'relative_path_cache'
at row 1 [ UPDATE `items`
SET `relative_path_cache` =
'MembersOnly/Slideshow/6-Logos/KCPR%20Artwork/Julie_Meridian_1998_Fundraiser_Julie%20drew%20editorial%20cartoons%20for%20the%20Mustang%20Daily_%20In%201999%2C%20while%20sitting%20on%20the%20couch%20in%20KCPR%27s%20lobby%2C%20she%20drew%20this%20fundraising%20design.jpg',
`relative_url_cache` =
Julie_Meridian_1998_Fundraiser_Julie-drew-editorial-cartoons-for-the-Mustang-Daily_-In-1999-while-sitting-on-the-couch-in-KCPR-s-lobby-she-drew-this-fundraising-design'
WHERE `id` = '2855' ] i
/home/kcpr/public_html/gallery3/system/libraries/Database_Mysqli_Result.php:27
Stack trace:
#0
/home/kcpr/public_html/gallery3/system/libraries/Database_Mysqli.php(79):
Database_Mysqli_Result_Core->__construct(false, 'UPDATE `items`\n...',
Object(mysqli), true)
#1 /home/kcpr/public_html/gallery3/system/libraries/Database.php(272):
Database_Mysqli_Core->query_execute('UPDATE `items`\n...')
#2
/home/kcpr/public_html/gallery3/modules/gallery/libraries/MY_Database.php(48):
Database_Core->query('UPDATE `items`\n...')
#3
/home/kcpr/public_html/gallery3/system/libraries/Database_Builder.php(973):
Database->query('UPDATE `items`\n...')
#4 /home/kcpr/public_html/gallery3/system/libraries/ORM.php(804):
Database_Builder_Core->execute(Object(Database_Mysqli))
#5
/home/kcpr/public_html/gallery3/modules/gallery/libraries/MY_ORM.php(34):
ORM_Core->save()
#6
/home/kcpr/public_html/gallery3/modules/gallery/libraries/ORM_MPTT.php(79):
ORM->save()
#7 /home/kcpr/public_html/gallery3/modules/gallery/models/item.php(544):
ORM_MPTT_Core->save()
#8 /home/kcpr/public_html/gallery3/modules/gallery/models/item.php(305):
Item_Model_Core->save()
#9
/home/kcpr/public_html/gallery3/modules/gallery/helpers/gallery_task.php(692):
Item_Model_Core->relative_path()
#10 /home/kcpr/public_html/gallery3/modules/gallery/helpers/task.php(90):
gallery_task_Core::fix(Object(Task_Model))
#11
/home/kcpr/public_html/gallery3/modules/gallery/controllers/admin_maintenance.php(195):
task_Core::run('5')
#12
/home/kcpr/public_html/gallery3/modules/gallery/controllers/admin.php(62):
Admin_Maintenance_Controller->run('5')
#13 [internal function]: Admin_Controller->__call('Admin_maintenan...',
Array)
#14 /home/kcpr/public_html/gallery3/system/core/Kohana.php(331):
ReflectionMethod->invokeArgs(Object(Admin_Controller), Array)
#15 /home/kcpr/public_html/gallery3/system/core/Event.php(208):
Kohana_Core::instance(NULL)
#16 /home/kcpr/public_html/gallery3/application/Bootstrap.php(67):
Event_Core::run('system.execute')
#17 /home/kcpr/public_html/gallery3/index.php(123):
require('/home/kcpr/publ...')
#18 {main}



On Wed, August 17, 2022 7:13 pm, 'Harold Hallikainen' via Gallery 3 Users
wrote:

Harold Hallikainen

unread,
Aug 18, 2022, 1:58:38 PM8/18/22
to gallery...@googlegroups.com
Thanks for the help!

KCPR>Alumni Gal…>Members Only>KCPR 50th Anniv…>6-Logos

I see a blank thumnail with 9 gray blocks in it. If I click that
thumbnail, I get to KCPR Artwork with no photos visible.

Looking at
/home/kcpr/public_html/gallery3/var/albums/MembersOnly/Slideshow/6-Logos/KCPR
Artwork

I see several images including a few with very long filenames.

How does "Fix Your Gallery" work? If I were to delete the offending photos
on the server, would it delete those problematic records?

The photos were sent to me, and I was not aware of the very long filename
or that there was a limit on filename length.

THANKS!

Harold
> topic in the Google Groups "Gallery 3 Users"
> https://groups.google.com/d/msgid/gallery-3-users/8efd7db0-3b37-3195-071d-cf4974f53b70%40thepostalzone.com.

J.R.

unread,
Aug 18, 2022, 3:42:46 PM8/18/22
to gallery...@googlegroups.com
Harold,

Looks like you're going to have to send us the URL for you gallery so I can take a look at it.

-- J.R.

Harold Hallikainen

unread,
Aug 18, 2022, 4:25:40 PM8/18/22
to gallery...@googlegroups.com
Thanks! The URL is https://kcpralumni.org/gallery3/index.php/ . The
problem area is in a Members Only album. Do you need membership or perhaps
admin? The problem only shows up in the Members Only album where I am
trying to delete the album with the long filenames. I shortened the file
names and uploaded it again to
https://kcpralumni.org/gallery3/index.php/KCPR-50th-Anniversary-Slideshow
. That seems to work fine. The issue is deleting the album from the
Members Only directory.

THANKS!

Harold
> topic in the Google Groups "Gallery 3
> Users" group. To unsubscribe from this topic,
> https://groups.google.com/d/msgid/gallery-3-users/8efd7db0-3b37-3195-071d-cf4974f53b70%40thepostalzone.com.
>
>
> --
> WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST
> or REPLY TO ALL so your reply goes out to everyone in the group. If you
> click REPLY or REPLY TO SENDER Google will *only* send your reply to the
> original author (not recommended).
>
> To post a NEW MESSAGE to the group, send an new email to:
> gallery...@googlegroups.com
>
> To view or sign in to this group on the web, use this URL:
> https://groups.google.com/forum/#!forum/gallery-3-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Gallery 3 Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/gallery-3-users/jvtpS6q7YS0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> gallery-3-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gallery-3-users/3c87c966-a383-9a96-8b6f-ce9e78ebd3c4%40thepostalzone.com.

J.R.

unread,
Aug 18, 2022, 8:27:33 PM8/18/22
to gallery...@googlegroups.com
Harold,

No, DO NOT Manually delete the images from the server -- this will only make things worse. I've been through this exact same situation before and know what can happen: Those images already have cross-links installed in the various databases fields. Manually deleting the images themselves from the server leaves those cross links still in the databases as "orphans" with the system having no way to clean up the mess.

I have to leave the house right now (Thursday, 8:30 PM EST) -- but I will send you another message in a couple of hours outlining the next steps that have to be taken to clean this up. Like the man said, "Do nothing until you hear from me".

-- J.R.

Harold Hallikainen

unread,
Aug 18, 2022, 9:23:09 PM8/18/22
to gallery...@googlegroups.com
Thanks! I thought deleting the images would be dangerous! But, then maybe
the database deleted records for images that do not exist in a cleanup.
Bad guess, I guess!

Again, THANKS! Archive.org shows my use of Gallery (2) back to 2002. It
has, and is, serving me well!

Harold
> topic in the Google Groups "Gallery 3
> Users" group. To unsubscribe from this
> https://groups.google.com/d/msgid/gallery-3-users/8efd7db0-3b37-3195-071d-cf4974f53b70%40thepostalzone.com.
> -- WHEN USING AN EMAIL PROGRAM to reply to this message,
> click REPLY TO LIST or REPLY TO ALL so your reply goes out to
> everyone in the group. If you click REPLY or REPLY TO SENDER
> Google will *only* send your reply to the original author (not
> recommended). To post a NEW MESSAGE to the group, send an
> new email to: gallery...@googlegroups.com To view or
> sign in to this group on the web, use this URL:
> https://groups.google.com/forum/#!forum/gallery-3-users ---
> You received this message because you are subscribed to a
> topic in the Google Groups "Gallery 3 Users"
> group. To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/gallery-3-users/jvtpS6q7YS0/unsubscribe.
> To unsubscribe from this group and all its topics, send an
> email to gallery-3-use...@googlegroups.com. To
> view this discussion on the web visit
> https://groups.google.com/d/msgid/gallery-3-users/3c87c966-a383-9a96-8b6f-ce9e78ebd3c4%40thepostalzone.com.
>
>
> --
> WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST
> or REPLY TO ALL so your reply goes out to everyone in the group. If you
> click REPLY or REPLY TO SENDER Google will *only* send your reply to the
> original author (not recommended).
>
> To post a NEW MESSAGE to the group, send an new email to:
> gallery...@googlegroups.com
>
> To view or sign in to this group on the web, use this URL:
> https://groups.google.com/forum/#!forum/gallery-3-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Gallery 3 Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/gallery-3-users/jvtpS6q7YS0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> gallery-3-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gallery-3-users/e1812807-ea0d-2d23-a29b-9b581f49f32e%40thepostalzone.com.

J.R.

unread,
Aug 19, 2022, 1:43:40 AM8/19/22
to gallery...@googlegroups.com
I have sent a private message to Harold on this issue. It's getting kind of complex. If we come up with a solution I will post what we discover to this thread. Meanwhile, anyone else have any tips on how to delete an album that contains files which also cannot be deleted? Of course, Gallery will not allow an admin to delete an album until it has been emptied of all files first... a chicken and broken egg conundrum.

--J.R.

Kerry Marshall

unread,
Aug 19, 2022, 3:57:56 AM8/19/22
to gallery...@googlegroups.com

Hi,

 

I remember there used to be a gallery clean up script where you could point it at a folder and it would change all the permissions to let you remove files

 

I don’t seem to have it to hand so I’ll see if I can dig it up from an archive

 

Cheers

Kerry

Kerry Marshall

unread,
Aug 19, 2022, 4:05:14 AM8/19/22
to gallery...@googlegroups.com

The cleanup script is still in the archive

 

Maybe this would help: http://codex.galleryproject.org/Downloads:Cleanup_Script.html

 

Cheers

Kerry

 

 

From: <gallery...@googlegroups.com> on behalf of "J.R." <jrl...@thepostalzone.com>
Reply-To: <gallery...@googlegroups.com>
Date: Friday, 19 August 2022 at 5:43 PM
To: <gallery...@googlegroups.com>
Subject: Re: [gallery-3-users] Error on album deletion.

 

I have sent a private message to Harold on this issue. It's getting kind of complex. If we come up with a solution I will post what we discover to this thread. Meanwhile, anyone else have any tips on how to delete an album that contains files which also cannot be deleted? Of course, Gallery will not allow an admin to delete an album until it has been emptied of all files first... a chicken and broken egg conundrum.

--J.R.

mikt...@hotmail.com

unread,
Aug 19, 2022, 8:04:07 AM8/19/22
to Gallery 3 Users
Harold,

It is a long shot, but if you can get to the album, have you tried to rename the album/files with something short. this may then let you delete or whatever you want to do with them

Tony

Harold Hallikainen

unread,
Aug 19, 2022, 12:44:53 PM8/19/22
to gallery...@googlegroups.com
Thanks for the suggestion! The image with the long filename is not showing
up within the album, so I can't delete it there.

Harold


On Fri, August 19, 2022 5:04 am, mikt...@hotmail.com wrote:
> Harold,
>
> It is a long shot, but if you can get to the album, have you tried to
> rename the album/files with something short. this may then let you delete
> or whatever you want to do with them
>
> Tony
> On Friday, 19 August 2022 at 5:35:14 pm UTC+9:30 KAMPIC wrote:
>
>> The cleanup script is still in the archive
>>
>>
>>
>> Maybe this would help:
>> http://codex.galleryproject.org/Downloads:Cleanup_Script.html
>>
>>
>>
>> Cheers
>>
>> Kerry
>>
>>
>>
>>
>>
>> *From: *<gallery...@googlegroups.com> on behalf of "J.R." <
>> jrl...@thepostalzone.com>
>> *Reply-To: *<gallery...@googlegroups.com>
>> *Date: *Friday, 19 August 2022 at 5:43 PM
>> *To: *<gallery...@googlegroups.com>
>> *Subject: *Re: [gallery-3-users] Error on album deletion.
>> topic in the Google Groups &amp;quot;Gallery 3
>>
>> Users&amp;quot; group. To unsubscribe from this topic,
>>
>> visit
>>
>> https://groups.google.com/d/topic/gallery-3-users/jvtpS6q7YS0/unsubscribe.
>>
>> To unsubscribe from this group and all its topics, send an
>>
>> email to gallery-3-use...@googlegroups.com. To
>>
>> view this discussion on the web visit
>>
>> https://groups.google.com/d/msgid/gallery-3-users/8efd7db0-3b37-3195-071d-cf4974f53b70%40thepostalzone.com.
>>
>> -- WHEN USING AN EMAIL PROGRAM to reply to this message,
>>
>> click REPLY TO LIST or REPLY TO ALL so your reply goes out to
>>
>> everyone in the group. If you click REPLY or REPLY TO SENDER
>>
>> Google will *only* send your reply to the original author (not
>>
>> recommended). To post a NEW MESSAGE to the group, send an
>>
>> new email to: gallery...@googlegroups.com To view or
>>
>> sign in to this group on the web, use this URL:
>>
>> https://groups.google.com/forum/#!forum/gallery-3-users ---
>>
>> You received this message because you are subscribed to a
>>
>> topic in the Google Groups &quot;Gallery 3 Users&quot;
>>
>> group. To unsubscribe from this topic, visit
>>
>> https://groups.google.com/d/topic/gallery-3-users/jvtpS6q7YS0/unsubscribe.
>>
>> To unsubscribe from this group and all its topics, send an
>>
>> email to gallery-3-use...@googlegroups.com. To
>>
>> view this discussion on the web visit
>>
>> https://groups.google.com/d/msgid/gallery-3-users/3c87c966-a383-9a96-8b6f-ce9e78ebd3c4%40thepostalzone.com.
>>
>>
>>
>>
>>
>> --
>>
>> WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO
>> LIST
>>
>> or REPLY TO ALL so your reply goes out to everyone in the group. If you
>>
>> click REPLY or REPLY TO SENDER Google will *only* send your reply to the
>>
>> original author (not recommended).
>>
>>
>>
>> To post a NEW MESSAGE to the group, send an new email to:
>>
>> gallery...@googlegroups.com
>>
>>
>>
>> To view or sign in to this group on the web, use this URL:
>>
>> https://groups.google.com/forum/#!forum/gallery-3-users
>>
>> ---
>>
>> You received this message because you are subscribed to a topic in the
>>
>> Google Groups "Gallery 3 Users" group.
>> <https://groups.google.com/d/msgid/gallery-3-users/ee6181bf-68c0-f7c1-d238-f573e495e940%40thepostalzone.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>
> --
> WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST
> or REPLY TO ALL so your reply goes out to everyone in the group. If you
> click REPLY or REPLY TO SENDER Google will *only* send your reply to the
> original author (not recommended).
>
> To post a NEW MESSAGE to the group, send an new email to:
> gallery...@googlegroups.com
>
> To view or sign in to this group on the web, use this URL:
> https://groups.google.com/forum/#!forum/gallery-3-users
> ---
> You received this message because you are subscribed to the Google Groups
> "Gallery 3 Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gallery-3-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gallery-3-users/c523c03a-1ec3-492c-9186-0fd47d6467aen%40googlegroups.com.

Harold Hallikainen

unread,
Aug 19, 2022, 12:52:57 PM8/19/22
to gallery...@googlegroups.com
Thanks! It looks like that just changes file permissions so files can be
renamed or deleted by someone other than the owner. Since I have root
access, that will not give me any more than I already have. As J.R. has
pointed out, just deleting the offending files will cause problems since
the database would still be pointing to them.

Thanks for the suggestion!

Harold
> Google Groups "Gallery 3 Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/gallery-3-users/jvtpS6q7YS0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> gallery-3-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gallery-3-users/CE156256-7601-4008-AA21-AE845371F343%40gmail.com.

Harold Hallikainen

unread,
Aug 19, 2022, 1:26:28 PM8/19/22
to gallery...@googlegroups.com
Thanks JR! To prevent problems in the future, what limitations are there
on image filenames? Total length, embedded spaces, etc.? Ideally Gallery
would catch these issues on the way in. I'm using Server Add to add large
collections of photos.

Harold


Brad Dutton

unread,
Aug 19, 2022, 1:31:03 PM8/19/22
to Gallery 3 Users
I'm a little surprised gallery doesn't limit anything in the interface because as JR pointed out there are some character limits of 256 in the database. I'm not sure how these limits were determined previously but that seems like something we could increase. Give me a few days but I'll try and increase that to 1024 (another arbitrary limit?) and see what happens. If that works I can publish a new release.

Thanks,
Brad

Harold Hallikainen

unread,
Aug 19, 2022, 1:46:14 PM8/19/22
to gallery...@googlegroups.com
THANKS! I imagine this would require restructuring the data in the database.

Harold
> --
> WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST
> or REPLY TO ALL so your reply goes out to everyone in the group. If you
> click REPLY or REPLY TO SENDER Google will *only* send your reply to the
> original author (not recommended).
>
> To post a NEW MESSAGE to the group, send an new email to:
> gallery...@googlegroups.com
>
> To view or sign in to this group on the web, use this URL:
> https://groups.google.com/forum/#!forum/gallery-3-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Gallery 3 Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/gallery-3-users/jvtpS6q7YS0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> gallery-3-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gallery-3-users/4a2f709a-d074-4854-b618-f4e6021c4814n%40googlegroups.com.

J.R.

unread,
Aug 19, 2022, 3:55:44 PM8/19/22
to gallery...@googlegroups.com
Brad,

If you think that's best. In  part I'm sure the character limit was (maybe still is) a performance issue. For people with mega fast internet connections that may not be much of an issue, but half the U.S. (not to mention the rest of the world) is still creeping along with 1 GB or less speed (my own DSL connection -- the only one available in my rural area -- is only 500K, a measly 1/2 GB of speed).

But if you're going to do it, please look into the special character issue. A lot of people now seem to feel the need to add special characters to  their image file names. I know there are a few which are forbidden in text fields because those characters are used as operators in SQL, but all are special characters including "-" and "_" currently forbidden in Gallery image names?

Finally... heh... as long as you're looking... I see that Gallery's basic "Darn Something Went Wrong" error message which Harold triggered contains 2 dead support/help links:

"Hey wait, you're an admin! We can tell you stuff: There's an error message below and you can find more details in gallery3/var/logs (look for the file with the most recent date on it). Stuck? Stop by the Gallery 3 Forums and ask for help. You can also look at our list of open tickets to see if the problem you're seeing has been reported."

It's always something, ain't it? :)

-- J.R.

--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.

J.R.

unread,
Aug 19, 2022, 4:04:10 PM8/19/22
to gallery...@googlegroups.com
Kerry,

Thanks for the reminder... but I believe what this script will do is change file permissions to something like "664" so any user (not just admin) can modify/delete them. In Harold's case the error log indicated the file(s) in question are already set to allow modify/delete by someone logged-in as admin. From Bharat's instructions of the download page:

"
Open it in your browser, and enter the path to your albums directory and this script will make every file in that path (that it can access) writable by everybody. After that, you should be able to delete the files manually via your FTP client or via the shell."

I'm going to test it, just to see. There's a good chance that modern PHP 7 and 8 servers will not allow such a script to execute for security reasons.

-- J.R.

J.R.

unread,
Aug 19, 2022, 4:16:48 PM8/19/22
to gallery...@googlegroups.com
Tony,

In this case it probably will not work -- or maybe make things worse because:

1) The extremely long image file names have already been inserted into the Database fields (or perhaps a truncated version of them since they were so long). So if you tried to do change the name from within Gallery itself, you would likely get the same failure error message because the image name in the database field does not match the actual name of the image files stored in /var/albums and /var/resizes and /var/thumbs.

2) If you use the server CPanel File Manager to go into the /var/ and manually change the file name (or simply delete it), then the name in the database field will *still* not match what it is in the /var... or what's not there anymore if you have simply delete the image files from the /var/. You still get the failure error message. Dang...

It's a tricky problem, which is why I'm going to be working with Harold privately to see what can be done -- i.e. direct manual "database surgery" which, like any critical surgery, is extremely dangerous and not something to be tried without prior experience.

-- J.R.

J.R.

unread,
Aug 19, 2022, 4:26:14 PM8/19/22
to gallery...@googlegroups.com
Harold and Brad,

This is Brad's area of expertise, but yeah, I suspect altering the size of the necessary fields in the affected databases might be a good development concept, but would probably result in what amounts to a "full new version" release of Gallery 3 -- whereby to apply it to an existing installation of Gallery 3.13 or 3.15 would require a special script to automatically rebuild the existing databases to match. This would give us Gallery3 version 4.0 which would be nice... but, um, realistically could open up a big can of debugging worms.

-- J.R.

Info.RockEdge

unread,
Aug 19, 2022, 4:53:51 PM8/19/22
to gallery...@googlegroups.com

It might be possible with direct access to the database and phpmyadmin to truncate the "items" table (not delete) to clear it.

Next step would be if access to the /var/albums is also available, to delete the actual image files and replace them or rename them in place.

Enable the server add module.

Use the server add module to reload the newly renamed image files.

All totally theoretical but I have several G3 installations on localhost machines just for dev or design work that I can test these steps out on.

Brad Dutton

unread,
Aug 19, 2022, 5:26:01 PM8/19/22
to Gallery 3 Users
Those links are already updated, his gallery installation isn't :)

J.R.

unread,
Aug 19, 2022, 5:33:58 PM8/19/22
to gallery...@googlegroups.com
Yes, this is the approach Harold and I are taking now. I had this exact same problem about 4 years ago. Since Harold's problem album went off the rails with only a few images in it there should be no need to fiddle with the Server Add module. Fingers crossed.

-- J.R.

Harold Hallikainen

unread,
Aug 19, 2022, 5:46:57 PM8/19/22
to gallery...@googlegroups.com
Thanks for all the work on this! I have reloaded the album in a different
area (people changed their minds as to whether it should be restricted to
members). Prior to uploading (server add), I got rid of the very long
filenames. At this point, I just need to delete the old album.

A nice feature for an update would be to check filename length and reject
before messing things up.

THANKS!

Harold
> &amp;amp;amp;amp;quot;Gallery 3
>
> Users&amp;amp;amp;amp;quot;
> --
> WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST
> or REPLY TO ALL so your reply goes out to everyone in the group. If you
> click REPLY or REPLY TO SENDER Google will *only* send your reply to the
> original author (not recommended).
>
> To post a NEW MESSAGE to the group, send an new email to:
> gallery...@googlegroups.com
>
> To view or sign in to this group on the web, use this URL:
> https://groups.google.com/forum/#!forum/gallery-3-users
> ---
> You received this message because you are subscribed to the Google Groups
> &quot;Gallery 3 Users&quot; group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gallery-3-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gallery-3-users/0c5d7b84-3d39-edca-dfff-7fff77163655%40thepostalzone.com.

Gerardo L. Cahn

unread,
Aug 19, 2022, 6:21:05 PM8/19/22
to gallery...@googlegroups.com
I have no doubt that you guys will fix this, and when you do, if it is
not asking for too much, would you describe which mysql fields you had
to modify to regain database consistency?  I think it would be valuable
info to leave for posterity...

t
// Gerardo L. Cahn <ger...@niuk.org>
// linux, mac ... and, well, yes,
// ((windows too)).

Brad Dutton

unread,
Aug 19, 2022, 6:37:46 PM8/19/22
to Gallery 3 Users
I modified the limits from 255 to 768. Any larger and there has to be more changes done to support that. If you are still having problems and need the larger size you can try the prerelease code:
https://github.com/bwdutton/gallery3/archive/refs/heads/master.zip
Otherwise this increase should be in the next release.

J.R.

unread,
Aug 19, 2022, 7:10:24 PM8/19/22
to gallery...@googlegroups.com
Brad,

Cool. Although being raised in the Old School of painfully short files names as I was, I consider the current trend to create needlessly long file names to be akin to carrying a good thing too far. :)

-- J.R.

J.R.

unread,
Aug 19, 2022, 7:37:05 PM8/19/22
to gallery...@googlegroups.com
Gerardo,

I have often wished for the same thing. But after learning how to do some very minimal and elementary Gallery database "surgery" myself I now realize that what you ask isn't really practical. The system if far too complicated and every problem tends to be unique, caused by one unexpected and possibly unidentified event or another. There are 25 separate database tables at work in Gallery3, with different but often-related data fields and these tables and fields are all interconnected by the Gallery code, so the name of a file will often end up in 3 or 4 different tables and data fields within those tables for a bunch of different reasons. Also, the database keeps track of the physical location of every image and thumbnail uploaded into Gallery and cross-links them to various Gallery functions. Truthfully, trying to figure out how it all works in detail makes your head hurt.

The best thing to do is set up a practice Gallery installation and then start inspecting it with CPanel's phyMyAdmin tool and  doing experiments with it to get a sense of what's going on behind the curtain.

The reason most Gallery users don't have to deal with this is because the original development team (who are now long vanished) created a magic Black Box called "Fix Your Gallery" which does an incredibly good job of figuring out all the database table and field inter-relationships and dependencies, comparing them to each other and the original source images and "cleaning" things up if something gets a little out of line, before it becomes a Serious Problem.

I'm going to post more about the Black Box shortly.

-- J.R.

Harold Hallikainen

unread,
Aug 19, 2022, 10:44:59 PM8/19/22
to gallery...@googlegroups.com
Thanks! Does this mean the existing code can handle filenames up to 255
characters? If I do the update to get 768, does the database need to be
rebuilt?

Harold
>> https://groups.google.com/d/msgid/gallery-3-users/ee6181bf-68c0-f7c1-d238-f573e495e940%40thepostalzone.com
>> .
>> >
>> >
>> >
>> >
>> >
>> > --
>> > WHEN USING AN EMAIL PROGRAM to reply to this message, click
>> > REPLY TO LIST or REPLY TO ALL so your reply goes out to
>> > everyone in the group. If you click REPLY or REPLY TO
>> > SENDER Google will *only* send your reply to the
>> > original author (not recommended).
>> >
>> > To post a NEW MESSAGE to the group, send an new email to:
>> > gallery...@googlegroups.com
>> >
>> > To view or sign in to this group on the web, use this URL:
>> > https://groups.google.com/forum/#!forum/gallery-3-users
>> > ---
>> > You received this message because you are subscribed to the
>> > Google Groups "Gallery 3 Users" group.
>> > To unsubscribe from this group and stop receiving emails from
>> > it, send an email to
>> > gallery-3-use...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/gallery-3-users/c523c03a-1ec3-492c-9186-0fd47d6467aen%40googlegroups.com
>> .
>> >
>> > --
>> > WHEN USING AN EMAIL PROGRAM to reply to this message, click
>> > REPLY TO LIST or REPLY TO ALL so your reply goes out to
>> > everyone in the group. If you click REPLY or REPLY TO
>> > SENDER Google will *only* send your reply to the original
>> > author (not recommended).
>> >
>> > To post a NEW MESSAGE to the group, send an new email to:
>> > gallery...@googlegroups.com
>> >
>> > To view or sign in to this group on the web, use this URL:
>> > https://groups.google.com/forum/#!forum/gallery-3-users
>> > ---
>> > You received this message because you are subscribed to the
>> > Google Groups "Gallery 3 Users" group.
>> > To unsubscribe from this group and stop receiving emails from
>> > it, send an email to
>> > gallery-3-use...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/gallery-3-users/f7a027a9-5bd2-92a5-86cf-b001da52d9e4%40thepostalzone.com
>> .
>> > --
>> > WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY
>> > TO LIST or REPLY TO ALL so your reply goes out to everyone in
>> > the group. If you click REPLY or REPLY TO SENDER Google will
>> > *only* send your reply to the original author (not
>> > recommended).
>> >
>> > To post a NEW MESSAGE to the group, send an new email to:
>> > gallery...@googlegroups.com
>> >
>> > To view or sign in to this group on the web, use this URL:
>> > https://groups.google.com/forum/#!forum/gallery-3-users
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups "Gallery 3 Users" group.
>> > To unsubscribe from this group and stop receiving emails from it,
>> > send an email to gallery-3-use...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/gallery-3-users/00408787-067e-82f9-8d17-e3667baf97a9%40gmail.com
>> .
>> >
>> >
>> >
>> > --
>> > WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO
>> LIST
>> > or REPLY TO ALL so your reply goes out to everyone in the group. If
>> you
>> > click REPLY or REPLY TO SENDER Google will *only* send your reply to
>> the
>> > original author (not recommended).
>> >
>> > To post a NEW MESSAGE to the group, send an new email to:
>> > gallery...@googlegroups.com
>> >
>> > To view or sign in to this group on the web, use this URL:
>> > https://groups.google.com/forum/#!forum/gallery-3-users
>> > ---
>> > You received this message because you are subscribed to the Google
>> Groups
>> > &quot;Gallery 3 Users&quot; group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an
>> > email to gallery-3-use...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/gallery-3-users/0c5d7b84-3d39-edca-dfff-7fff77163655%40thepostalzone.com
>> .
>> >
>>
>>
>> --
>> FCC Rules Updated Daily at http://www.hallikainen.com
>> Not sent from an iPhone.
>>
>
> --
> WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST
> or REPLY TO ALL so your reply goes out to everyone in the group. If you
> click REPLY or REPLY TO SENDER Google will *only* send your reply to the
> original author (not recommended).
>
> To post a NEW MESSAGE to the group, send an new email to:
> gallery...@googlegroups.com
>
> To view or sign in to this group on the web, use this URL:
> https://groups.google.com/forum/#!forum/gallery-3-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Gallery 3 Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/gallery-3-users/jvtpS6q7YS0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> gallery-3-use...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/gallery-3-users/f39a37e7-a9a3-47ff-9471-247d31e44d2fn%40googlegroups.com.

Brad Dutton

unread,
Aug 22, 2022, 12:51:54 PM8/22/22
to Gallery 3 Users
If you install the updated version of Gallery it will update the DB fields to the new size. There isn't any need to do any sort or rebuild, the size can be updated easily. As a side note, the Gallery design is limited to 255 (or 768 if you update) total characters in the path & filename. This means you can have 1 top level file at the 255 character limit, or it could be in a folder with a 100 character name and then the file could be 155 characters itself.

J.R.

unread,
Aug 22, 2022, 2:44:56 PM8/22/22
to gallery...@googlegroups.com
Brad,

Thanks for clarifying that -- so the limit applies to the combined total numbers of characters in the album name and the file name together. Good to know. I would suggest that as a "best practice" when using database storage that all names be kept to a sensible length. But updating Gallery to a combined total of 768 should prevent all but the most, ah, verbose file namers out of trouble. :)

-- J.R.
Reply all
Reply to author
Forward
0 new messages