Error when using View latest comments in nightly built

id01

Joined: 2005-11-07
Posts: 62
Posted: Sat, 2005-12-31 21:04

The following occur when I click on my Gallery "View Latest Comments" at the root of the gallery when the "Number of comments on Latest Comments page" are set to "40".

I tried a lower number, it seem to work if I do so (Like 10) but anything higher seem to create problem. (I have about 2000 comments in total in the gallery) Also, if I click on "next" when I set it to 10. It report the same problem. Both of those error report are attached here. I'm using the nightly built from the 29th.

-edit: I forgot to mention, this is embedded in phpnuke 7.9.

Any suggestion?

Quote:
Error Detail -
Error (ERROR_MISSING_OBJECT) : Missing object for 0

* in modules/core/classes/GalleryStorage/DatabaseStorageExtras.class at line 1806 (GalleryStatus::error)
* in modules/core/classes/GalleryStorage/DatabaseStorageExtras.class at line 321 (DatabaseStorageExtras::_identifyEntities)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 343 (DatabaseStorageExtras::loadEntities)
* in modules/core/classes/GalleryStorage.class at line 121 (DatabaseStorage::loadEntities)
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 86 (GalleryStorage::loadEntities)
* in modules/core/classes/GalleryCoreApi.class at line 2187 (GalleryEntityHelper_simple::loadEntitiesById)
* in modules/comment/ShowAllComments.inc at line 82 (GalleryCoreApi::loadEntitiesById)
* in modules/core/classes/GalleryTheme.class at line 689 (ShowAllCommentsView::loadTemplate)
* in modules/core/classes/GalleryView.class at line 312 (GalleryTheme::loadTemplate)
* in main.php at line 337 (GalleryView::doLoadTemplate)
* in main.php at line 88
* in modules/core/classes/GalleryEmbed.class at line 155
* in index.php at line 204 (GalleryEmbed::handleRequest)
* in /home/aryion/public_html/modules.php at line 51

System Information
Gallery version 2.0.2+
PHP version 5.0.4 apache
Webserver Apache/1.3.34 (Unix) PHP/5.0.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database mysql 4.0.25-standard
Toolkits ImageMagick, NetPBM, Gd
Operating system Linux us01.weyrnet.co.uk 2.4.21-37.EL #1 Wed Sep 7 13:35:21 EDT 2005 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

Quote:
Error Detail -
Error (ERROR_MISSING_OBJECT) : Missing object for 0

* in modules/core/classes/GalleryStorage/DatabaseStorageExtras.class at line 1806 (GalleryStatus::error)
* in modules/core/classes/GalleryStorage/DatabaseStorageExtras.class at line 321 (DatabaseStorageExtras::_identifyEntities)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 343 (DatabaseStorageExtras::loadEntities)
* in modules/core/classes/GalleryStorage.class at line 121 (DatabaseStorage::loadEntities)
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 86 (GalleryStorage::loadEntities)
* in modules/core/classes/GalleryCoreApi.class at line 2187 (GalleryEntityHelper_simple::loadEntitiesById)
* in modules/comment/ShowAllComments.inc at line 82 (GalleryCoreApi::loadEntitiesById)
* in modules/core/classes/GalleryTheme.class at line 689 (ShowAllCommentsView::loadTemplate)
* in modules/core/classes/GalleryView.class at line 312 (GalleryTheme::loadTemplate)
* in main.php at line 337 (GalleryView::doLoadTemplate)
* in main.php at line 88
* in modules/core/classes/GalleryEmbed.class at line 155
* in index.php at line 204 (GalleryEmbed::handleRequest)
* in /home/aryion/public_html/modules.php at line 51

System Information
Gallery version 2.0.2+
PHP version 5.0.4 apache
Webserver Apache/1.3.34 (Unix) PHP/5.0.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database mysql 4.0.25-standard
Toolkits ImageMagick, NetPBM, Gd
Operating system Linux us01.weyrnet.co.uk 2.4.21-37.EL #1 Wed Sep 7 13:35:21 EDT 2005 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

 
id01

Joined: 2005-11-07
Posts: 62
Posted: Sat, 2005-12-31 22:33

I have narrowed it down to the individial comment that are cusing the problem. It seem to be a problem reading a migrated comment from Gallery 1. Whenever the suject is blank in gallery 1, it will import it as a NULL in the database. However I can not confirm that it is the problem as when I change the value in the database, it still doesn't work. The g_commenterId will sometime end up as 0, however when I change it to say, 5, it still will not read a page involding that comment. changing both, or changing one of those at a time still does not work. Oddly enough, deleting the entire entry works. I'm not entirely sure if g_id have anything to do with it as I don't know what it is.

Anyone able to help me out? I don't want ot delete all the comments that are causing this problem!

 
id01

Joined: 2005-11-07
Posts: 62
Posted: Sun, 2006-01-01 23:00

After looking back and forth in the database, the old gallery 1.51 installation, and the new installation. I realize those offending comment that screw up the "Latest comment view." It also screw up while viewing the picture. The debug tree doesn't report any error when displaying those pictures, but the comment underneath the picture will refuse to show. I found out that not only the comment with both "Null" subject and "0" g_commenterId will causes this problem, sometime a "5" g_commenterId will also causes problem, but that seem to be all random. Sometime it does, some time it doesn't. I spends a few hours looking back and forth across the gallerys and database and I still can't come up with any solution beside deleting those comment found to cause problem in the database.

Can anyone please suggest a better solution or possible fix? Is this a bug?

 
Junyor

Joined: 2003-08-12
Posts: 31
Posted: Sun, 2006-03-26 04:53

I'm seeing this same problem after upgrading from 2.04 to 2.1 when viewing the Latest Comments page:

Error Detail
Error (ERROR_MISSING_OBJECT) : Missing object for 10
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 1852 (gallerycoreapi::error)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 109 (gallerystorageextras::_identifyentities)
in modules/core/classes/GalleryStorage.class at line 293 (gallerystorageextras::loadentities)
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 82 (mysqlstorage::loadentities)
in modules/core/classes/GalleryCoreApi.class at line 2380 (galleryentityhelper_simple::loadentitiesbyid)
in modules/comment/ShowAllComments.inc at line 82 (gallerycoreapi::loadentitiesbyid)
in modules/core/classes/GalleryView.class at line 317 (showallcommentsview::loadtemplate)
in main.php at line 386 (showallcommentsview::doloadtemplate)
in main.php at line 87
in main.php at line 80

System Information
Gallery version 2.1
PHP version 4.4.2 cgi
Webserver Apache/1.3.33 (Unix) DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.2 mod_ssl/2.8.22 OpenSSL/0.9.7e
Database mysqlt 5.0.18-standard-log
Toolkits ImageMagick
Operating system Linux dib 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 #1 SMP Mon Feb 7 13:23:30 PST 2005 i686
Browser Opera/9.00 (Macintosh; Intel Mac OS X; U; en)

Debug Output
file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../config.php) file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../plugins/index.modules) file_exists(/home/.jackobydryer/junyor/g2-data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../modules/rewrite/classes/parsers/modrewrite/ModRewriteUrlGenerator.class) getParameter shortUrls for rewrite plugin file_exists(/home/.jackobydryer/junyor/g2-data/cache/module/rewrite/0/0/0.inc) getParameter session.lifetime for core plugin file_exists(/home/.jackobydryer/junyor/g2-data/cache/module/core/0/0/0.inc) getParameter session.inactivityTimeout for core plugin
(mysqlt): SET NAMES "utf8"
(mysqlt): SELECT g2_SessionMap.g_id, g2_SessionMap.g_userId, g2_SessionMap.g_remoteIdentifier,g2_SessionMap.g_creationTimestamp, g2_SessionMap.g_modificationTimestamp, g2_SessionMap.g_data FROM g2_SessionMap WHERE g2_SessionMap.g_id = '858f6142f0a00c4c6a5287ea68911393'
controller , view comment.ShowAllComments Loading plugin core Class not defined, trying to include it. file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../modules/core/module.inc) core plugin successfully instantiated file_exists(/home/.jackobydryer/junyor/g2-data/versions.dat) file(/home/.jackobydryer/junyor/g2-data/versions.dat, ) [1143348769] can't guarantee 5 -- extending! file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/0/0/6.inc) Loading plugin comment Class not defined, trying to include it. file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../modules/comment/module.inc) comment plugin successfully instantiated Check the version of the comment plugin file_exists(/home/.jackobydryer/junyor/g2-data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the comment plugin is ok file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../modules/comment/ShowAllComments.inc) getParameter acceleration for core plugin getParameter id.anonymousUser for core plugin getParameter id.anonymousUser for core plugin getParameter id.adminGroup for core plugin
(mysqlt): SELECT g2_UserGroupMap.g_userId FROM g2_UserGroupMap WHERE g2_UserGroupMap.g_userId = 6 AND g2_UserGroupMap.g_groupId = 3 LIMIT 1
file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/0/0/7.inc) getParameter default.theme for core plugin Loading plugin matrix Class not defined, trying to include it. file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../config.php) file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../plugins/index.themes) file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../themes/matrix/theme.inc) matrix plugin successfully instantiated Check the version of the matrix plugin file_exists(/home/.jackobydryer/junyor/g2-data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the matrix plugin is ok file_exists(/home/.jackobydryer/junyor/g2-data/cache/theme/matrix/0/0/0.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/theme/matrix/0/0/7.inc) getParameter comments.show for comment plugin file_exists(/home/.jackobydryer/junyor/g2-data/cache/module/comment/0/0/0.inc)
(mysqlt): SELECT g2_ItemAttributesMap.g_parentSequence FROM g2_ItemAttributesMap WHERE g2_ItemAttributesMap.g_itemId = 7
(mysqlt): SELECT g2_Group.g_id, g2_Group.g_groupName FROM g2_UserGroupMap, g2_Group WHERE g2_Group.g_id = g2_UserGroupMap.g_groupId AND g2_UserGroupMap.g_userId = 6 ORDER BY g2_Group.g_groupName LIMIT 18446744073709551615
(mysqlt): SELECT g2_PermissionSetMap.g_module, g2_PermissionSetMap.g_permission, g2_PermissionSetMap.g_description, g2_PermissionSetMap.g_bits, g2_PermissionSetMap.g_flags FROM g2_PermissionSetMap
(mysqlt): SELECT DISTINCT g2_AccessMap.g_accessListId FROM g2_AccessMap WHERE g2_AccessMap.g_userOrGroupId IN (6,4,2,3) AND g2_AccessMap.g_permission & 2048 = 2048
(mysqlt): SELECT g2_Comment.g_id FROM g2_ItemAttributesMap, g2_AccessSubscriberMap, g2_ChildEntity, g2_Comment WHERE (g2_ItemAttributesMap.g_itemId = 7 OR g2_ItemAttributesMap.g_parentSequence LIKE '7/%') AND g2_AccessSubscriberMap.g_itemId = g2_ItemAttributesMap.g_itemId AND g2_AccessSubscriberMap.g_accessListId IN (2355,2853,4274,4275,4330,4380,4381,4437,4510,4522,4524,4537,4596,4611,4613,4615,4644,4669,4670,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,4683,4684,4685,4686,4687,4688,4689,4690,4691,4692,4693,4694,4695,4696,4697,4698,4699,4700,4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,4712,4713,4714,4715,4716) AND g2_ChildEntity.g_parentId = g2_ItemAttributesMap.g_itemId AND g2_Comment.g_id = g2_ChildEntity.g_id ORDER BY g2_Comment.g_date DESC LIMIT 20,10
file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/3/8/3811.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/4/3/4341.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/4/3/4358.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/3/6/3666.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/4/3/4357.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/4/3/4356.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/4/3/4340.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/4/3/4355.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/4/3/4367.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/4/3/4366.inc)
(mysqlt): SELECT COUNT(g2_Comment.g_id) FROM g2_ItemAttributesMap, g2_AccessSubscriberMap, g2_ChildEntity, g2_Comment WHERE (g2_ItemAttributesMap.g_itemId = 7 OR g2_ItemAttributesMap.g_parentSequence LIKE '7/%') AND g2_AccessSubscriberMap.g_itemId = g2_ItemAttributesMap.g_itemId AND g2_AccessSubscriberMap.g_accessListId IN (2355,2853,4274,4275,4330,4380,4381,4437,4510,4522,4524,4537,4596,4611,4613,4615,4644,4669,4670,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,4683,4684,4685,4686,4687,4688,4689,4690,4691,4692,4693,4694,4695,4696,4697,4698,4699,4700,4701,4702,4703,4704,4705,4706,4707,4708,4709,4710,4711,4712,4713,4714,4715,4716) AND g2_ChildEntity.g_parentId = g2_ItemAttributesMap.g_itemId AND g2_Comment.g_id = g2_ChildEntity.g_id
file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/0/0/5.inc) file_exists(/home/.jackobydryer/junyor/g2-data/cache/entity/0/0/10.inc)
(mysqlt): SELECT g_id, g_entityType FROM g2_Entity WHERE g_id IN (10)
getParameter default.theme for core plugin Loading plugin matrix matrix plugin successfully instantiated Check the version of the matrix plugin The version of the matrix plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/helpers/../../../../modules/core/ErrorPage.inc) getParameter id.adminGroup for core plugin realpath(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/../../../)
(mysqlt): SELECT g2_TkOperatnMimeTypeMap.g_mimeType, g2_TkOperatnMimeTypeMap.g_toolkitId FROM g2_TkOperatnMimeTypeMap WHERE g2_TkOperatnMimeTypeMap.g_operationName = 'thumbnail' ORDER BY g2_TkOperatnMimeTypeMap.g_mimeType ASC, g2_TkOperatnMimeTypeMap.g_priority ASC
file_exists(/home/.jackobydryer/junyor/g2-data/smarty/templates_c/%%4128182648) is_dir(/home/.jackobydryer/junyor/g2-data/smarty/templates_c/%%4128182648) file_exists(/home/.jackobydryer/junyor/g2-data/smarty/templates_c/%%4128182648) is_writeable(/home/.jackobydryer/junyor/g2-data/smarty/templates_c/%%4128182648) file_exists(/home/.jackobydryer/junyor/g2-data/smarty/templates_c/%%4128182648/v_9) getParameter modrewrite.galleryLocation for rewrite plugin file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/../../../lib/javascript/local/BlockToggle.js) getParameter modrewrite.galleryLocation for rewrite plugin file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/../../themes/matrix/local/theme.css) file_exists(/home/.jackobydryer/junyor/gallery.timaltman.com/modules/core/classes/../../../themes/matrix/local/theme.css)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-27 04:25

I haven't been able to reproduce. Does everyone with this problem have comments migrated from G1?

 
Junyor

Joined: 2003-08-12
Posts: 31
Posted: Mon, 2006-03-27 13:31

Yes, I do.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-27 16:57

The error traces above confirm the problem is with bad/missing values for commenterId. Looking into how we could be migrating bad values here.

When you migrated from G1, did you migrate users too? Do you have anonymous comments in your albums?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-27 17:28

Is it possible you migrated some G1 users that posted comments, but have since deleted those users in G2?
G2.0.x had a bug where the userid on comments was not updated on user delete.. now we delete those comments when the user is deleted.

You can find the comments that are now "bad" due to deleted users with this query:

select c.g_id from g2_Comment c left join g2_User u on c.g_commenterId = u.g_id where u.g_id is null;

 
Eka_Mei

Joined: 2006-01-03
Posts: 132
Posted: Mon, 2006-03-27 23:40

Yes that is possible, But the comment shouldn't requires the user to be there in order to stays valid, right? What if it is someone who didn't login and posted as anonymous? Or someone who just entered the name in manually? Which was possible in Gallery 1.5 but not possible in Gallery 2

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-27 23:52

those cases would assign the comment in G2 to the anonymous user.

 
Junyor

Joined: 2003-08-12
Posts: 31
Posted: Wed, 2006-03-29 00:38

Yes, I migrated users and I have anonymous comments.

I think I may have had to delete one of the users I migrated because they were overlapping with the admin account I had created.

That query returned 10 g_ids. How do I assign those comments to the correct user?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-03-29 02:04

change the commenterId value to a valid g_id value from g2_User table, probably for your anonymous user.

 
Junyor

Joined: 2003-08-12
Posts: 31
Posted: Wed, 2006-03-29 03:59

I corrected the g_commenterIds, but I'm still getting the same error. the g_subject field is NULL. Would that cause problems?

Also, how can I figure out which image a comment is tied to? I see the g_Id in the g2_comment table, but how does the link with an imag?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-03-29 05:04

clear the db cache in site admin / maintenance. this is always required after manually changing the db.

 
Junyor

Joined: 2003-08-12
Posts: 31
Posted: Wed, 2006-03-29 13:30

That fixed it! Thank you.

How can I figure out which image a comment is tied to? I see the g_Id in the g2_comment table, but how does the link with an image?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-03-29 15:50

g2_ChildEntity table.

 
Junyor

Joined: 2003-08-12
Posts: 31
Posted: Wed, 2006-03-29 17:13

Cool. Thank you!

 
steinmb01
steinmb01's picture

Joined: 2005-04-07
Posts: 31
Posted: Tue, 2007-08-07 12:22

Using this old tread.

I have Gallery 2.2.2 and have the same problem on my old albums.
I read the posting but [i]I need som more info about how to fix this problem.

Quote:
change the commenterId value to a valid g_id value from g2_User table, probably for your anonymous user.

"Mindless" are you still in this forum?

Here is my Error message:

Error (ERROR_MISSING_OBJECT) : Missing object for 0

* 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/GalleryCoreApi.class at line 2259 (galleryentityhelper_simple::loadentitiesbyid)
* in modules/comment/ShowAllComments.inc at line 73 (gallerycoreapi::loadentitiesbyid)
* in modules/core/classes/GalleryView.class at line 300 (showallcommentsview::loadtemplate)
* in main.php at line 441 (showallcommentsview::doloadtemplate)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2.2
PHP version 4.3.9 apache2handler
Webserver Apache/2.0.52 (CentOS)
Database mysql 4.1.20
Toolkits ImageMagick, Gd
Operating system Linux tbsk.no 2.6.9-55.ELsmp #1 SMP Wed May 2 14:28:44 EDT 2007 i686
Browser Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2007-08-07 14:55

Maybe try the integrity check module from Site Admin / Plugins / Get More Plugins / Community repository and see if it provides any clues. please start a new support topic and PM the URL to me if you need further assistance.

 
chrisleung
chrisleung's picture

Joined: 2007-08-24
Posts: 1
Posted: Fri, 2007-08-24 09:11

I had this same problem and just found a solution.

This problem seems to occur when an entry in one of the database tables equals 0 when it shouldn't be.

In my case, my embed code wasn't logging in a user, so the user id defaulted to 0. As a result, in the g2_Item table, the g_ownerId had a value of 0 which Gallery was NOT happy about.

To fix this, I updated all the entries in the g2_Item table that had a g_ownerId == 0 to a g_ownerId that was a valid user.

Valiant's post here was very useful in tracking down which tables to look at for these issues.

Hope that helps.