Error (ERROR_MISSING_OBJECT) when trying to view galleries. Everything worked great previously for 3 days

weldonj

Joined: 2005-10-31
Posts: 7
Posted: Fri, 2005-11-04 09:07

Everything was working fine for the first 3 days, now I just get one error message after another.

If I went to the main page:
http://www.letsrun.com/gallery2/main.php
I could see the galleries. Then when I clicked on them I got error messages:

Error (ERROR_MISSING_OBJECT)

* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 378 (gallerystatus::error)
* in modules/core/classes/GalleryStorage.class at line 118 (mysqldatabasestorage::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/GalleryTheme.class at line 1164 (gallerycoreapi::loadentitiesbyid)
* in themes/matrix/theme.inc at line 75 (matrixtheme::loadcommontemplatedata)
* in modules/core/classes/GalleryTheme.class at line 900 (matrixtheme::showalbumpage)
* in modules/core/classes/GalleryView.class at line 285 (matrixtheme::loadtemplate)
* in main.php at line 287 (showitemview::doloadtemplate)
* in main.php at line 87
* in main.php at line 80

The debug output is on and you can see the messages yourself at:
http://www.letsrun.com/gallery2/main.php?g2_view=core.ShowItem&g2_itemId=46

Here is what my debug console says: Smarty Debug Console
included templates & config files (load time in seconds):
themes/matrix/templates/error.tpl (0.15354) (total)
modules/core/templates/ErrorPage.tpl (0.00315)
assigned template variables:
{$ErrorPage} Array (2)
isAdmin =>
stackTrace => Error (ERROR_MISSING_OBJECT) : <ul><...
{$SCRIPT_NAME} /gallery2/main.php
{$head} Array (3)
tpl => Array (0)
style => Array (0)
javascript => Array (1)
0 => http://www.letsrun.com/gallery2/lib/j...
{$l10Domain} themes_matrix
{$theme} Array (1)
errorTemplate => modules/core/templates/ErrorPage.tpl
assigned config file variables (outer template scope):
{#files#} Array (0)
{#vars#} Array (0)

and my gallery info:

Gallery version = 2.0.1 core 1.0.0.1
PHP version = 4.3.6 apache2handler
Webserver = Apache/2.0.49 (Unix) mod_ssl/2.0.49 OpenSSL/0.9.7d PHP/4.3.6
Database = mysql 4.0.20-Max-log
Toolkits = ArchiveUpload, Exif, Gd
Operating system = Linux mail.letsrun.com 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

My php info can be found here:
http://www.letsrun.com/php.php

any help would be appreciated.

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32506
Posted: Fri, 2005-11-04 09:23

seems like your database is slightly corrupted.

this query didn't return a single row, but it should have:
SELECT g2_Entity.g_id, g2_Entity.g_creationTimestamp, g2_Entity.g_isLinkable, g2_Entity.g_linkId, g2_Entity.g_modificationTimestamp, g2_Entity.g_serialNumber, g2_Entity.g_entityType, g2_Entity.g_onLoadHandlers, g2_User.g_userName, g2_User.g_fullName, g2_User.g_hashedPassword, g2_User.g_email, g2_User.g_language FROM g2_Entity, g2_User WHERE g2_Entity.g_id IN (48) AND g2_User.g_id=g2_Entity.g_id

so check in:
tables g2_Entity and g2_User
should both be a single row with g_id = 48.

Login or register to post comments
weldonj

Joined: 2005-10-31
Posts: 7
Posted: Fri, 2005-11-04 09:43

there is no row in the g2_user with a value of 48. Can I just add one?

Thanks

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32506
Posted: Fri, 2005-11-04 09:49

well, that's bad.
what about the table g2_ChildEntity? is there a g_id = 48 row there?

Login or register to post comments
weldonj

Joined: 2005-10-31
Posts: 7
Posted: Fri, 2005-11-04 09:57

I must have looked at the wrong table earlier. Neither g2_user or g2_childentity has a row with g_id=48;

Not sure if it matters but g2_Entity has a row with g_id=48

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32506
Posted: Fri, 2005-11-04 10:23

that's bad.
since g2_Entity row g_id = 48 says it's a g_entityType = GalleryUser entity, right?

GalleryUser entities must have a row in at least the 3 tables from above.

did you by chance delete any user in G2? it should work of course, but this could explain this perhaps.

what i would do:
UPDATE g2_Item SET g_ownerId = 6 WHERE g_ownerId = 48;

(but first make sure "6" is the g_id of your admin (see table g2_User).

then delete row g_id = 48 from the table g2_Entity.

finally, browse to yourGalleryUrl/lib/support/ and click cache management and delete the db and template cache.

Login or register to post comments
weldonj

Joined: 2005-10-31
Posts: 7
Posted: Fri, 2005-11-04 17:17

That fixed it thanks a ton.

I was changing permissions and users so maybe that caused the problem.

Is there documentation anywhere about implermenting Gallery with my own already preexisting login/user system?

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32506
Posted: Fri, 2005-11-04 22:10

see docs/EMBEDDING which is the same as http://codex.gallery2.org/index.php/Gallery2:Integration_Howto
but it isn't a lot of documentation yet. but it works. it's already used by several integrations.

Login or register to post comments
thecheshire

Joined: 2005-12-18
Posts: 2
Posted: Sun, 2005-12-18 21:30

sorry

Login or register to post comments
thecheshire

Joined: 2005-12-18
Posts: 2
Posted: Sun, 2005-12-18 21:34

sorry! thanks for the help!

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 32506
Posted: Mon, 2005-12-19 00:13

thecheshire

please post your problem to your own, new forum thread. don't hijack existing forum threads, thanks.

also, the smarty debug popup is never needed for debugging.

Login or register to post comments