Error (ERROR_MISSING_OBJECT) / main.php and rebuilding thumbs

Scott_

Joined: 2005-11-18
Posts: 26
Posted: Fri, 2005-11-18 18:17

I just changed the location of my g2data directory, edited the config.php file to the new location and everything seemed to work ok. I ran System Maintenance, everything except reset counts and build all thumbs.. Everything seemed to be working fine, then a few days later I get problems only when I access the page below:
http://www.mtu.net/~x296/gallery2/main.php

I poked around other postings, tried to /lib/support/ and deleted all cache management and delete the db and template cache and thumbnails, no change. When I try to rebuild the thumbnails I also get another error below:

Error (ERROR_MISSING_OBJECT) : Missing object for 3766

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 2121 (gallerystatus::error)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 305 (postgresqldatabasestorage::_identifyentities)
* in modules/core/classes/GalleryStorage.class at line 118 (postgresqldatabasestorage::loadentities)
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 82 (gallerystorage::loadentities)
* in modules/core/classes/GalleryCoreApi.class at line 2186 (galleryentityhelper_simple::loadentitiesbyid)
* in modules/core/classes/helpers/GalleryDerivativeHelper_medium.class at line 210 (gallerycoreapi::loadentitiesbyid)
* in modules/core/classes/helpers/GalleryDerivativeHelper_medium.class at line 56 (galleryderivativehelper_medium::_loadderivatives)
* in modules/core/classes/GalleryCoreApi.class at line 897 (galleryderivativehelper_medium::fetchthumbnailsbyitemids)
* in modules/randomhighlight/module.inc at line 242 (gallerycoreapi::fetchthumbnailsbyitemids)
* in modules/core/classes/GalleryEntity.class at line 450 (randomhighlightmodule::onload)
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 98 (galleryderivativeimage::onload)
* in modules/core/classes/GalleryCoreApi.class at line 2186 (galleryentityhelper_simple::loadentitiesbyid)
* in modules/core/classes/helpers/GalleryDerivativeHelper_medium.class at line 210 (gallerycoreapi::loadentitiesbyid)
* in modules/core/classes/helpers/GalleryDerivativeHelper_medium.class at line 56 (galleryderivativehelper_medium::_loadderivatives)
* in modules/core/classes/GalleryCoreApi.class at line 897 (galleryderivativehelper_medium::fetchthumbnailsbyitemids)
* in modules/randomhighlight/module.inc at line 242 (gallerycoreapi::fetchthumbnailsbyitemids)
* in modules/core/classes/GalleryEntity.class at line 450 (randomhighlightmodule::onload)
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 98 (galleryderivativeimage::onload)
* in modules/core/classes/GalleryCoreApi.class at line 2186 (galleryentityhelper_simple::loadentitiesbyid)
* in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 544 (gallerycoreapi::loadentitiesbyid)
* in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 558 (galleryderivativehelper_advanced::expirederivativetreebysourceids)
* in modules/core/classes/GalleryCoreApi.class at line 855 (galleryderivativehelper_advanced::expirederivativetreebysourceids)
* in modules/core/classes/GalleryDerivative.class at line 291 (gallerycoreapi::expirederivativetreebysourceids)
* in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 709 (galleryderivativeimage::save)
* in modules/core/classes/GalleryCoreApi.class at line 843 (galleryderivativehelper_advanced::rebuildcache)
* in modules/core/classes/helpers/GalleryDerivativeHelper_simple.class at line 66 (gallerycoreapi::rebuildderivativecache)
* in modules/core/classes/GalleryCoreApi.class at line 830 (galleryderivativehelper_simple::rebuildcacheifnotcurrent)
* in modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at line 681 (gallerycoreapi::rebuildderivativecacheifnotcurrent)
* in modules/core/classes/GalleryCoreApi.class at line 843 (galleryderivativehelper_advanced::rebuildcache)
* in modules/core/classes/helpers/GalleryDerivativeHelper_simple.class at line 66 (gallerycoreapi::rebuildderivativecache)
* in modules/core/classes/GalleryCoreApi.class at line 830 (galleryderivativehelper_simple::rebuildcacheifnotcurrent)
* in modules/core/classes/BuildDerivativesTask.class at line 92 (gallerycoreapi::rebuildderivativecacheifnotcurrent)
* in modules/core/AdminMaintenance.inc at line 104 (buildderivativestask::run)
* in ??? at line 0 (adminmaintenancecontroller::runtask)
* in modules/core/classes/GalleryTemplateAdapter.class at line 762
* in /home/x296/gallery/g2data/smarty/templates_c/%%4125962499/%%C7^C79^C790B080%%theme.tpl.php at line 79 (gallerytemplateadapter::trailer)
* in lib/smarty/Smarty.class.php at line 1251
* in modules/core/classes/GallerySmarty.class at line 90 (smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 228 (gallerysmarty::fetch)
* in main.php at line 318 (gallerytemplate::display)
* in main.php at line 87
* in main.php at line 80

Direct links to any other Album or page other then the main.php or rebuilding the thumbnails works fine. I have no idea where to start to solve this issue, any help would be great..
Thanks

Last Run Details:
Gallery version = 2.0.1 core 1.0.0.1
PHP version = 4.3.10-16 apache
Webserver = Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10-16 mod_perl/1.29
Database = postgres7
Toolkits = SquareThumb, Thumbnail, NetPBM, ArchiveUpload, Exif, ImageMagick
Operating system = Linux mtu.net 2.4.26 #3 Fri Aug 13 12:54:52 EDT 2004 i686
Browser = Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051010 Firefox/1.0.7 (Ubuntu package 1.0.7)

Database (e.g. MySql 4.0.11):
Activated toolkits (e.g. NetPbm, GD):
Operating system (e.g. Linux):
Browser (e.g. Firefox 1.0):
[/size]

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-18 19:16

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 i gave a few instructions:

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

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

 
Scott_

Joined: 2005-11-18
Posts: 26
Posted: Fri, 2005-11-18 19:28

I really have no clue when it comes to the database, it is all magic to me, and it doesn't seem like something easy to fix for myself. I think starting over would be an easier option for myself, say fresh install? Is it possible to just remove my corrupted database and have g2 rebuild it somehow? I'm not to wirried about whatever information is in the database, and I know the location of my photo's, this just seems like the easier approach for me because of lack of how to actually use the database.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-18 20:03

oh well... i'm really sorry for such things. the g2 is just not perfect yet. in a year or two we'll have tools to fix such things and the chance that something like this happens will be much smaller.

rebuilding g2, the hard was, and with losing comments, etc.:
- copy g2data/albums/ to another folder on the server (or just move it if disk space is sparse).
- delete your g2, fresh install (the installer has a erase option in step 5 (db step), hit save, then you'll see the option. after the erase, make sure the databaase is really empty (no tables)
- after the installation, add the albums/ folder which who have somewhere on the server to the upload paths in site admin -> general
- now set the default thumbnail and resize sizes in, gallery -> edit album. all imported albums will have these settings
- then browse to your g2, click add items -> from local server
- pick the albums path, select all albums in the list
- hit the "add files" button

it will then add all selected albums with all subalbums and photos etc to your g2, preserving the strcuture. all album names / items will have the same date, the name will be defaulted to the folder/file names etc.

 
Scott_

Joined: 2005-11-18
Posts: 26
Posted: Fri, 2005-11-18 20:28

Hey, I can't blame anyone, gallery works pretty good, I just don't know much about databases.. thanks for your help.. Right now I got it to rebuild the thumbnails and hopefully that fixes my problem.

I don't know if I was following things wrong, or just stumbled upon a way to fix it, maybe. I went to mygallery/lib/support/ in one browser tab, and had the management window open on another tab, right after I checked all options at mygallery/lib/support/, and ran that, I then clicked on the rebuild thumbnails, and so far it is working, I'm at about 1600 of 6900, and it is still going, I'll post a follow-up if this worked or not when it finishes. If not I'll just take the above approach..

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-11-18 20:54

so deleting the cache in /lib/support/ -> cache worked for you?? well, that would be great (for you) :)

 
Scott_

Joined: 2005-11-18
Posts: 26
Posted: Fri, 2005-11-18 23:19

well doing the /lib/support didn't work the first few times, maybe that was because i would run it and then navigate to the management pages and g2 would begin to create more cache information or something, i really have no idea, but like i said before, opened 2 tabs on on the /lib/support and one onthe g2 management page.. checked cache options, deleted them all, then did rebuild of icons on management tab, and presto! all back to normal.. magic i guess.. or maybe many times of trying..
thanks again for your help..

 
mike2098

Joined: 2008-01-08
Posts: 6
Posted: Sun, 2009-01-25 18:41

I fixed my problem by doing the folowing I had created an admin account with admin5677 in gallery but my wordpress had the default admin so I changed the admin name in phpmyadmin to the same as the gallery one admin5677 and it now works fine so make sure both admin accounts have the same name :-)