(RESOLVED) rewrite fatal error
iRob
Joined: 2006-02-12
Posts: 48 |
Posted: Thu, 2007-10-18 04:44 |
I just upgraded my gallery from 2.1.2 to 2.2.3 and updated my WPG2 to the latest 3.0.2. Validation passes but the WPG2 rewrite section gives me this fatal error: Fatal G2 error Here's the error from G2: Error (ERROR_MISSING_OBJECT) : Missing object for 75 * 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_simple.class at line 127 (galleryentityhelper_simple::loadentitiesbyid) * in modules/core/classes/GalleryCoreApi.class at line 2298 (galleryentityhelper_simple::loadentitybyexternalid) * in modules/core/classes/GalleryEmbed.class at line 215 (gallerycoreapi::loadentitybyexternalid) * in /home/electro/public_html/wp-content/plugins/wpg2/wpg2embed.inc at line 102 (galleryembed::checkactiveuser) * in /home/electro/public_html/wp-content/plugins/wpg2/wpg2template.inc at line 50 * in ??? at line 0 * in /home/electro/public_html/wp-includes/plugin.php at line 160 * in /home/electro/public_html/wp-includes/template-loader.php at line 3 * in /home/electro/public_html/wp-blog-header.php at line 21 * in /home/electro/public_html/index.php at line 4 I found this link on the old embedded forum that is very similar to my current situation. But that was in the WPG2 2.x forum, so I hesitate to start changing embed.php files. Then there's this thread. It's somewhat similar. I've tried this with rewrites in G2 turned on and off. Neither seem to matter. My gallery page: My blog: Any ideas? |
|
Posts: 48
I downloaded the wpg2test.php file from the old embedded forum. Here's the output I got:
Very similar output.
Posts: 492
iRob,
You're right, don't replace the 3.0.2 wpg2embed file with the file from that thread. It won't work. Let me look at the changes Ozgreg was making in that thread to try to figure out why you're seeing that error now. I was still in Africa when he was working on that problem, and he's on his honeymoon now. So, I'll have to come up to speed on what the issue was then.
In the meantime, could you try the following:
1. Deactivate and reactivate WPG2 under Plugins Management.
2. Revalidate WPG2 by hitting the WPG2 tab.
3. Go to Users -> Gallery2 Users, and try moving one of the users up and down the G2 permissions table, leaving them where they started in the end. (If you only have one user, would you create a test user and run it up and down.) Let me know if you get any errors during any of this.
4. Retry the Gallery2 Rewrites tab.
I'm hoping that this will reset your WP-G2 user mapping, but I'm kind of easter-egging right now until I have time to really look at the code.
What version of WPG2 are you upgrading from?
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 48
Thanks, Capt. Kirk! You're a great help. The service you do around here is just amazing.
It's good to be back. I've been... "inactive" with G2 and WPG2 for quite some time. Started looking elsewhere for photo integration, but came back when I found that there's just nothing out there that better fits my work flow. Thanks again for this amazing plugin!
Don't know if this is TMI or not, but my upgrade of G2 was not without problems. I installed G2 initially with Fantastico. That was 2.1.x. Fantastico couldn't upgrade it due to all manner of broken paths after a recent server change by my host. So I upgraded it myself. That almost worked, but I had to fix it.
So I'm almost not surprised that that might have caused other issues with WPG2. To answer your other questions, I upgraded from WPG2 2.x. Can't even remember which specific load it was.
I tried your recommendations: deactivated WPG2, reactivated, revalidated, go to G2 users, and I get the same error I got before. See screenshot. Mysterious!
Posts: 48
I just did a search elsewhere in the forums and found these posts:
http://gallery.menalto.com/node/59988 (which lead me to...)
http://gallery.menalto.com/node/32741 (wow, hardcore! I understood the first 1/4 of this, then I started to lose them)
Is it time to rip into the database? Gulp!
Posts: 492
From the second thread, Valiant had a good point to see if your Gallery is working in standalone. It looks like yours is, although I couldn't log in to see if the site admin user management pages worked correctly. If they do, then I don't think it's a G2 database problem.
I've taken a quick look at the code, and think I understand what it's doing, but I don't understand why the error is occurring. It looks like it should work, because WPG2 is calling G2 to get map a user id that it just checked. If the user exists and is mapped, good; if not, create a new one with that ID. So, I'm stumped right now. I'll keep thinking about it as I have time. I'll probably end up having to put in a lot of debugging echos and have you test using that, if we can't figure out something after a few more rounds of question and answer.
In the meantime, try creating a new G2 user (in G2, not from WP) called wpg2test (or fred, if you like). Then create a new user in WP with the same name. Then try logging in to WP as that user to see if it gives you the same error. (Just trying to characterize when the error is occuring.)
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 48
Yes, G2 is working fine standalone, including the user admin.
Good idea, Kirk. I did that and logged in as wpg2test. None of those previous errors in the WPG2 admin pages. In fact, now I can see the mapping between my default WP user and G2, with the option to "revoke G2 admin".
The only thing that didn't pass this time is the rewrite section. The "Can Gallery2 Rewrite Plugin be Activated?" says no. I'm guessing that URL rewrites needs to be activated in G2. I did this and made sure that the admin and download item rewrites were deactivated. Clicked save and got this error:
Very similar to my original errors. Getting close now, huh?
Posts: 48
Cap'n Kirk, here's an interesting update. Beside rewrites being flaky (I wrote my host admin about that, since it seems to be with Apache), everything else about WPG2 is now working.
Even better, I just logged out of that test account, logged back in to WP as my default admin user. And now I don't get that error in the G2 users list or elsewhere. So I wonder if it's safe to delete that test account? Maybe no just yet?
Kudos on an amazing plugin, this thing has really gotten robust. Nice work. :D
Posts: 492
Thanks! Glad it's working.
It's probably safe to delete the wpg2test account.
So, that error occurred while logged into G2 in stand alone mode when you hit the "Save" button on the URL Rewrites page, right?
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 48
Kirk, you are correct. I got that above error after clicking save on the stand-alone G2 URL rewrites admin page. It was odd, I'd start all over again, and then everything passed, no error. Then I'd click back in there and the error popped up. It felt intermittent, not consistent.
I just got this word back from my host admin:
Know anything about this? I'll hunt around too.
Posts: 48
I found this snippet elsewhere on the forums:
I sent that to my host and they told me:
So I guess the question is, is Apache 1 capable of doing mod_rewrite?
Posts: 492
Short answer is "yes." My old host had Apache 1 and my family site ran fine with rewrites.
The more complicated answer is that Ozgreg and I have only tested the latest WPG2 version on Apache 2. We're both using XAMPP for our development boxes, and all of our personal sites are hosted by DreamHost under our personal accounts. So, there may be some difference that we haven't seen in testing. But there shouldn't be.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 1378
FYI AllowOverride FileInfo Options is for any version of Apache rewrite.. Looking at your error message "Error (ERROR_MISSING_OBJECT) : Parent 7 path g2-admin" looks to me that you have the site Admin rule turned on, please turn it off..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation
Posts: 492
Ozgreg,
I just re-read iRob's post and he said,
It was buried in there, and hard to see when skimming, but he did make sure the admin rule is off.
I'm beginning to think database corruption, maybe? I'll send valiant a PM to ask him to look at this thread to see if we're missing something obvious.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 32509
capt_kirk asked me to look at this issue.
this thread is already pretty long and you've talked about several issues. the latest seems to be about rewrite not working.
i suggest you start a new thread about that issue. a thread about X different issues is very hard to follow and doesn't help future users who find the thread through search engines either.
the missing object with parent item X is probably from the ShowItem rule. the core.ShowItem rewrite rule is given a a path (e.g. topalbum/someitem) and it then starts in the root album (id = 7) looking for an album with name "topalbum" and then looks in the album "topalbum" for an item with name "someitem".
in this case, the URL probably was something like "wpg2/g2-admin" and the base URL is wpg2. thus it looks for an album of name "g2-admin" in the root album (id=7).
so there's something wrong with your baseURl or WPG2's rewrite stuff.
ok, i ended up replying here. but again, i'm not a fan of such long and convoluted threads.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 48
Thanks for all the replies, guys. Valiant, sorry that it's all gotten convoluted. ;) That tends to be how my problems progress. :o
So I was looking at the URL rewrite setup in my G2. It's defaulting to these rules:
All other rules are deactivated. So I don't have "wpg2" as a base URI. Any suggestions on what those URL rewrite paths should be?
Posts: 48
Another consistent observation: when I activate the G2 rewrites, I can click the Test tab and it succeeds. But if I then click any other area of G2 (plugins, themes, whatever), the URL rewrites plugin mysteriously deactivates itself and removes from the sidebar. It's as if it's not "sticking". Very odd.
Posts: 492
iRob,
Make me an admin account on WP and PM me the username and password so that I can take a look for myself.
Thanks,
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 492
You were using the PathInfo method of G2 URL Rewrites instead of mod_rewrite. The only way to change that is to completely uninstall and then re-install the URL Rewrite module. I did that and then revalidated WPG2.
It's all working now. http://www.electrolund.com/v/family/ takes you to your family album. The only problem is that the album select block on the family album has direct G2 links instead of embedded links. The album select on the main photos page has the correct embedded links. I tried clearing the template cache, but there was no change.
One thing: with the plugin you're using to make the dashboard tabs into pull down menus, you lose the automatic WPG2 revalidation before going to any sub-tab. What I mean is that you can click on the Gallery2 Rewrites tab without having to go through the WPG2 tab. Hitting the WPG2 tab every time forces revalidation every time, so that you're at a good baseline before going to the other tabs. I'd either drop that plugin, or make sure you hit the WPG2 tab every time before going to any of the other sub tabs...
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 1378
I thought we failed rewrite validation on path info???
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation
Posts: 492
Yeah, he was getting a failure on Gallery2 Rewrites tab. It said that he was using PathInfo, so that's how I knew to uninstall and reinstall. Since I was already logged in, it was faster just to do it than to write our directions and go through another round of question/answers...
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website