Can't delete album Error (ERROR_LOCK_REQUIRED)

queentone

Joined: 2008-07-12
Posts: 1
Posted: Sat, 2008-07-12 08:40

Hi! I can't delete an album, the system message is :
Error (ERROR_LOCK_REQUIRED)

* in modules/core/classes/GalleryFileSystemEntity.class at line 260 (GalleryCoreApi::error)
* in modules/core/classes/GalleryItem.class at line 327 (GalleryFileSystemEntity::delete)
* in modules/core/classes/GalleryDataItem.class at line 236 (GalleryItem::delete)
* in modules/core/classes/helpers/GalleryEntityHelper_medium.class at line 113 (GalleryDataItem::delete)
* in modules/core/classes/GalleryCoreApi.class at line 2271 (GalleryEntityHelper_medium::deleteEntityById)
* in modules/core/classes/GalleryItem.class at line 307 (GalleryCoreApi::deleteEntityById)
* in modules/core/classes/GalleryAlbumItem.class at line 260 (GalleryItem::delete)
* in modules/core/classes/helpers/GalleryEntityHelper_medium.class at line 113 (GalleryAlbumItem::delete)
* in modules/core/classes/GalleryCoreApi.class at line 2271 (GalleryEntityHelper_medium::deleteEntityById)
* in modules/core/ItemDelete.inc at line 79 (GalleryCoreApi::deleteEntityById)
* in main.php at line 231 (ItemDeleteController::handleRequest)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2.4
PHP version 5.2.6 cgi-fcgi
Webserver Apache/2
Database mysqli 5.0.51a
Toolkits Gd
Operating system Linux lnx4.toscomedia.com 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9) Gecko/2008052906 Firefox/3.0

Thanks to everybody

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sat, 2008-07-12 14:24

If you need a quick fix, try switching to 'Database' on 'Site Admin' -> 'Lock System'

I've asked some other developers to look at this thread, though, as it doesn't make much sense why the entity (entity's parent) wouldn't be lock at that stage.

--Andy
Consider giving back to Gallery
Gallery Paid Support
http://www.andylindeman.com

 
joquti

Joined: 2008-08-26
Posts: 1
Posted: Tue, 2008-08-26 22:01

Hi,

I'm getting a very similar error: when I try to delete any file I get what I copy below.

I've even tried rebooting the server - nothing.

I think I may have to shut down my gallery completely and forget about Gallery2...

However, I like the program, so if a fix is found I'd be delighted to know.

Cheers, Joquti

--

Error

An error has occurred.

Back to the Gallery
Error Detail -
Error (ERROR_LOCK_REQUIRED)

* in modules/core/classes/GalleryFileSystemEntity.class at line 260 (GalleryCoreApi::error)
* in modules/core/classes/GalleryItem.class at line 327 (GalleryFileSystemEntity::delete)
* in modules/core/classes/GalleryDataItem.class at line 236 (GalleryItem::delete)
* in modules/core/classes/helpers/GalleryEntityHelper_medium.class at line 113 (GalleryDataItem::delete)
* in modules/core/classes/GalleryCoreApi.class at line 2263 (GalleryEntityHelper_medium::deleteEntityById)
* in modules/core/ItemDelete.inc at line 79 (GalleryCoreApi::deleteEntityById)
* in main.php at line 231 (ItemDeleteController::handleRequest)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2.1
PHP version 5.2.3-1ubuntu6.4 apache2handler
Webserver Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.4
Database mysqli 5.0.45-Debian_1ubuntu3.3-log
Toolkits SquareThumb, ImageMagick, Thumbnail
Operating system Linux fit-PC 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i586
Browser Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-08-26 22:11
Quote:
Gallery version 2.2.1

I would try to upgrade as there has been some fixes in DB management and security issues.
Did you try what Andy suggestdd?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
stuartsab

Joined: 2008-08-28
Posts: 2
Posted: Thu, 2008-08-28 17:27

I'm having a similar problem but I get no error. I have a VPS using plesk that has Gallery 2 in the application vault. I have issues with it not deleting the picture but just going to a blank page. There are other issues like the get pictures from URL not working when I put in a /dir that i know exists on my shared platform. Any ideas? I have changed my PHP.ini file 4 times trying to at least get an error to be printed on the page.

Sys Info:
Gallery version = 2.0-rc-1 core 0.9.34
PHP version = 5.1.6 apache2handler
Webserver = Apache/2.2.3 (Fedora)
Database = mysql 5.0.22
Toolkits = ArchiveUpload, Exif, Gd
Operating system = Linux 02ba49b.netsolvps.com 2.6.9-023stab044.4-smp #1 SMP Thu May 24 17:20:37 MSD 2007 x86_64
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2008-08-28 17:39
Quote:
Gallery version = 2.0-rc-1 core 0.9.34

That is so old and is a RC not recommended for production sites.

I would upgrade. You should have upgraded a few times in the last few years.

Blank page is normally a sign of PHP running out of memory.
FAQ: I get only a blank screen when trying to view my Gallery, what's wrong?
Check the server logs for errors:
FAQ: What is the webserver error log?

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
stuartsab

Joined: 2008-08-28
Posts: 2
Posted: Thu, 2008-08-28 18:27

Ahh well this was actually a new install from the plesk App vault >.> I never really thought to look at the version. Thanks I'll just start over since i only had two pictures on it. =) the php shouldn;t be running out of memory but I'll double check that after i install the newer version.

 
douglasvb

Joined: 2008-09-15
Posts: 12
Posted: Mon, 2008-09-15 18:57

I'm getting a similar error when I try to delete two photos. Here is the output:

Error (ERROR_LOCK_REQUIRED)

* in modules/core/classes/GalleryFileSystemEntity.class at line 260 (GalleryCoreApi::error)
* in modules/core/classes/GalleryItem.class at line 327 (GalleryFileSystemEntity::delete)
* in modules/core/classes/GalleryDataItem.class at line 236 (GalleryItem::delete)
* in modules/core/classes/helpers/GalleryEntityHelper_medium.class at line 113 (GalleryDataItem::delete)
* in modules/core/classes/GalleryCoreApi.class at line 2271 (GalleryEntityHelper_medium::deleteEntityById)
* in modules/core/ItemDelete.inc at line 79 (GalleryCoreApi::deleteEntityById)
* in main.php at line 231 (ItemDeleteController::handleRequest)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2.5
PHP version 5.2.6 cgi-fcgi
Webserver Apache/2.2.9 (Unix) PHP/4.4.7 mod_ssl/2.2.9 OpenSSL/0.9.8c mod_fastcgi/2.4.6 DAV/2
Database mysqli 5.0.67-log
Toolkits ImageMagick, NetPBM, Gd
Operating system Linux scalise 2.6.24.5-serf-xeon-c6.1-grsec #2 SMP Fri Aug 1 14:00:32 PDT 2008 x86_64
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

Additionally, when I try to go to delete the photos, it takes me to another album (where the photos are also present) to attempt to delete them. Any ideas what is going on and how to fix it?

Thanks!

 
Andrizza
Andrizza's picture

Joined: 2007-07-18
Posts: 7
Posted: Mon, 2008-09-15 19:37

hi,I cant delete album as well, my error seems to be similar, does everyone knows how to fix it? Soon i will upload the version but i would like to fix this before doing any change.
thanks in advance
regards
Andre

Error Detail -
Error (ERROR_MISSING_OBJECT) : Missing object for 120764
• in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 2075 (gallerycoreapi::error)
• in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 98 (gallerystorageextras::_identifyentities)
• in modules/core/classes/GalleryStorage.class at line 298 (gallerystorageextras::loadentities)
• in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 71 (mysqlstorage::loadentities)
• in modules/core/classes/helpers/GalleryEntityHelper_medium.class at line 48 (galleryentityhelper_simple::loadentitiesbyid)
• in modules/core/classes/GalleryCoreApi.class at line 2271 (galleryentityhelper_medium::deleteentitybyid)
• in modules/core/ItemDelete.inc at line 79 (gallerycoreapi::deleteentitybyid)
• in main.php at line 231 (itemdeletecontroller::handlerequest)
• in main.php at line 94
• in main.php at line 83
System Information
Gallery version 2.2.2
PHP version 4.4.8 apache
Webserver Apache/1.3.41 (Unix) mod_deflate/1.0.21 mod_jk/1.2.23 mod_fastcgi/2.4.2 PHP/5.2.3 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a
Database mysqlt 4.1.22-standard
Toolkits ImageMagick, Thumbnail, Gd
Operating system Linux scottsdale.servershost.net 2.6.19.7-Intel-v5-p1-hugemem #3 SMP Fri Feb 15 13:30:04 CST 2008 i686
Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)

 
douglasvb

Joined: 2008-09-15
Posts: 12
Posted: Mon, 2008-09-15 19:54

Hmm now instead of showing that message only when I try to delete two specific photos, it shows the error message on my Gallery2 front page. This is a tad bit troublesome! Is there a resource somewhere that can direct me to which parts of the database I need to go edit to remove the offending images?

 
douglasvb

Joined: 2008-09-15
Posts: 12
Posted: Mon, 2008-09-15 19:59

Obviously I didn't look too closely at the new error message. It's actually a bit different for me now.

Error (ERROR_OBSOLETE_DATA) : UPDATE g2_Derivative SET g_isBroken=? WHERE g_id=? (1|18496)

* in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 364 (GalleryCoreApi::error)
* in modules/core/classes/GalleryStorage.class at line 309 (GalleryStorageExtras::saveEntity)
* in modules/core/classes/GalleryEntity.class at line 294 (GalleryStorage::saveEntity)
* in modules/core/classes/GalleryDerivative.class at line 240 (GalleryEntity::save)
* in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 845 (GalleryDerivative::save)
* in modules/core/classes/GalleryCoreApi.class at line 914 (GalleryDerivativeHelper_advanced::rebuildCache)
* in modules/core/classes/GalleryTheme.class at line 1552 (GalleryCoreApi::rebuildDerivativeCache)
* in themes/carbon/theme.inc at line 177 (GalleryTheme::loadCommonTemplateData)
* in modules/core/classes/GalleryTheme.class at line 926 (CarbonTheme::showAlbumPage)
* in modules/core/classes/GalleryView.class at line 308 (GalleryTheme::loadTemplate)
* in main.php at line 445 (GalleryView::doLoadTemplate)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2.5
PHP version 5.2.6 cgi-fcgi
Webserver Apache/2.2.9 (Unix) PHP/4.4.7 mod_ssl/2.2.9 OpenSSL/0.9.8c mod_fastcgi/2.4.6 DAV/2
Database mysqli 5.0.67-log
Toolkits ImageMagick, NetPBM, Gd
Operating system Linux scalise 2.6.24.5-serf-xeon-c6.1-grsec #2 SMP Fri Aug 1 14:00:32 PDT 2008 x86_64
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2008-09-15 21:31

Andrizza and douglasvb, please try clearing your database and template cache. If that doesn't work, then please post a new thread for each of you, posting your system information in that thread as well.

FAQ: How can I clear cached data?

FAQ: What information is required when I ask for help in the forums?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2008-09-16 00:43
Andrizza wrote:
Error Detail -
Error (ERROR_MISSING_OBJECT) : Missing object for 120764

Try to clear the cache but I suspect that it is more than that:
Sorry for the canned response:

Error (ERROR_MISSING_OBJECT) : Missing object for ...

some part of your g2 database isn't 100% ok, the data integrity is a little corrupted.
reason: unknown. fix: it's not easy, but you can fix the database manually, someone else had the same problem and valiant gave a few instructions:

http://gallery.menalto.com/node/32741

http://gallery.menalto.com/node/38916

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Andrizza
Andrizza's picture

Joined: 2007-07-18
Posts: 7
Posted: Mon, 2008-09-22 02:36

hi Floridave thanks, i did that and also tried in the sistem maintenance page to convert database from mysql to UTF8 and i got this:

An error has occurred while interacting with the database.
The exact nature of database errors is not captured unless Gallery debug mode is enabled in config.php. Before seeking support for this error please enable buffered debug output and retry the operation. Look near the bottom of the lengthy debug output to find error details.
Back to the Gallery
Error Detail -
Error (ERROR_STORAGE_FAILURE)
• in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 961 (gallerycoreapi::error)
• in modules/core/classes/GalleryStorage.class at line 493 (gallerystorageextras::execute)
• in modules/core/CoreModuleExtras.inc at line 3177 (mysqlstorage::execute)
• in modules/core/classes/ConvertDatabaseToUtf8Task.class at line 62 (coremoduleextras::convertcharactersettoutf8)
• in modules/core/AdminMaintenance.inc at line 90 (convertdatabasetoutf8task::run)
• in modules/core/AdminMaintenance.inc at line 61 (adminmaintenancecontroller::runtask)
• in main.php at line 231 (adminmaintenancecontroller::handlerequest)
• in main.php at line 94
• in main.php at line 83
System Information
Gallery version 2.2.2
PHP version 4.4.9 apache
Webserver Apache/1.3.41 (Unix) mod_deflate/1.0.21 mod_jk/1.2.23 mod_fastcgi/2.4.2 PHP/5.2.3 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.9 FrontPage/5.0.2.2634a mod_ssl/2.8.31 OpenSSL/0.9.7a
Database mysqlt 4.1.22-standard
Toolkits ImageMagick, Thumbnail, Gd
Operating system Linux scottsdale.servershost.net 2.6.19.7-Intel-v5-p1-hugemem #3 SMP Fri Feb 15 13:30:04 CST 2008 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9) Gecko/2008052906 Firefox/3.0

now i put the debug mode but i dont really know what to do with that :S, let me know if you want to see what i got or if i can do something with that information.

Andre

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-09-22 03:14
Quote:
now i put the debug mode but i dont really know what to do with that :S, let me know if you want to see what i got or if i can do something with that information.

Andre

please start a new thread as there is 3 others in this thread now.
Enable debug mode and post the results.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team