{"id":483,"date":"2006-04-22T00:11:28","date_gmt":"2006-04-22T08:11:28","guid":{"rendered":"http:\/\/www.krunk4ever.com\/blog\/?p=483"},"modified":"2006-04-22T00:36:14","modified_gmt":"2006-04-22T08:36:14","slug":"gallery-and-error_missing_object","status":"publish","type":"post","link":"https:\/\/www.krunk4ever.com\/blog\/2006\/04\/22\/gallery-and-error_missing_object\/","title":{"rendered":"Gallery and ERROR_MISSING_OBJECT"},"content":{"rendered":"<p>So I was moving my images around in my <a href=\"http:\/\/www.krunk4ever.com\/gallery\/main.php\">Gallery<\/a> when I noticed that it didn&#8217;t throw 404 File Not Found pages whenever I tried an invalid path under \/v\/, but threw this were ERROR_MISSING_OBJECT message instead:<\/p>\n<blockquote><p>Error<br \/>\nError (ERROR_MISSING_OBJECT) :<\/p>\n<p><small>in modules\/core\/classes\/helpers\/GalleryFileSystemEntityHelper_simple.class at line 121 (GalleryCoreApi::error)<\/p>\n<p>in modules\/core\/classes\/GalleryCoreApi.class at line 1940 (GalleryFileSystemEntityHelper_simple::fetchChildIdByPathComponent)<\/p>\n<p>in modules\/core\/classes\/helpers\/GalleryFileSystemEntityHelper_simple.class at line 64 (GalleryCoreApi::fetchChildIdByPathComponent)<\/p>\n<p>in modules\/core\/classes\/GalleryCoreApi.class at line 1883 (GalleryFileSystemEntityHelper_simple::fetchItemIdByPath)<\/p>\n<p>in modules\/rewrite\/classes\/RewriteSimpleHelper.class at line 50 (GalleryCoreApi::fetchItemIdByPath)<\/p>\n<p>in ??? at line 0 (RewriteSimpleHelper::loadItemIdFromPath)<\/p>\n<p>in modules\/rewrite\/classes\/RewriteUrlGenerator.class at line 98<\/p>\n<p>in modules\/rewrite\/classes\/parsers\/modrewrite\/ModRewriteUrlGenerator.class at line 50 (RewriteUrlGenerator::_onLoad)<\/p>\n<p>in init.inc at line 113 (ModRewriteUrlGenerator::init)<\/p>\n<p>in main.php at line 73<\/small><\/p><\/blockquote>\n<p>Gallery forums weren&#8217;t much help as they just told you to <a href=\"http:\/\/gallery.menalto.com\/node\/47168?highlight=ERROR_MISSING_OBJECT\">go modify the code yourself<\/a>.<\/p>\n<p>Using the <a href=\"http:\/\/us3.php.net\/header\">PHP: header &#8211; Manual<\/a>, I modified that code path to actually return to my homepage:<br \/>\n<strong><code>header(\"Location: \/gallery\/main.php\");<\/code><\/strong><\/p>\n<p>You can make it return a 404 error if you prefer with:<br \/>\n<strong><code>header(\"HTTP\/1.0 404 Not Found\");<\/code><\/strong><\/p>\n<p>The place to modify this is in modules\/core\/classes\/helpers\/ <strong>GalleryFileSystemEntityHelper_simple.class<\/strong> on line 119. Comment out the following 2 lines:<br \/>\n<code><strong>\/\/<\/strong>return array(GalleryCoreApi::error(ERROR_MISSING_OBJECT, __FILE__, __LINE__,<br \/>\n<strong>\/\/<\/strong>\"Parent $parentId path $pathComponent\"), null);<\/code><\/p>\n<p>and insert the header of your choice followed by:<br \/>\n<code>exit();<\/code><\/p>\n<p>since you don&#8217;t want it to continue.<\/p>\n<p>I also noticed if you do the following, it&#8217;ll return you to the homepage, though I can&#8217;t garuantee that since I&#8217;m not exactly sure what it&#8217;s really doing:<br \/>\n<code>return array(null, 0);<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I was moving my images around in my Gallery when I noticed that it didn&#8217;t throw 404 File Not Found pages whenever I tried an invalid path under \/v\/, but threw this were ERROR_MISSING_OBJECT message instead: Error Error (ERROR_MISSING_OBJECT) : in modules\/core\/classes\/helpers\/GalleryFileSystemEntityHelper_simple.class at line 121 (GalleryCoreApi::error) in modules\/core\/classes\/GalleryCoreApi.class at line 1940 (GalleryFileSystemEntityHelper_simple::fetchChildIdByPathComponent) in modules\/core\/classes\/helpers\/GalleryFileSystemEntityHelper_simple.class &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.krunk4ever.com\/blog\/2006\/04\/22\/gallery-and-error_missing_object\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Gallery and ERROR_MISSING_OBJECT&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/posts\/483"}],"collection":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/comments?post=483"}],"version-history":[{"count":0,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/posts\/483\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/media?parent=483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/categories?post=483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.krunk4ever.com\/blog\/wp-json\/wp\/v2\/tags?post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}