Main page broken

robinjection

Joined: 2008-04-23
Posts: 39
Posted: Fri, 2012-11-16 20:36

Hi, I was testing out a caching plugin for Wordpress, and somehow my Gallery2 rewrites got disabled. I enabled them and then immediately, the main page would stop loading.

I get this error:

I've tried going to sub-galleries directly, and they work, as do setting pages for the album. But the main page is not found.

Any advice?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2012-11-16 21:26

Head to your WP dashboard and disable G2 rewrites
Head to embedded G2 admin and re-setup rewrites

Back again to WP dashboard and re-enable rewrites

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Tue, 2012-11-20 19:48

Even when I disable it, I can't access the main page.

I just tried to go to the main page of the gallery, not within the WP bridge, but directly in the gallery folder and get this error:

And now that I tried this again, it seems as though other gallery pages don't load.

I tried to do a template cache dump and that was successful, but my database cache dump was not.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2012-11-16 22:40

can you clear your caches at yoursite.com/gallery2/lib/support

after you can enable debugging
FAQ: How to set/use Gallery in debug mode?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Sat, 2012-11-17 17:31

I have set it to debug mode...

http://www.metalinjection.net/photo-gallery

This popup comes up for me as well:
http://cl.ly/image/0m3x0Q1h4410

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2012-11-17 19:49

debug does not help me see any errors if it is simply going to redirect me to login.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Sat, 2012-11-17 21:41

Woops, deactivated the wordpress bridge

http://www.metalinjection.net/gallery2/main.php

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2012-11-17 21:49

I still cannot get past login to see the error

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Sat, 2012-11-17 21:53

Are you using the new URL?

http://www.metalinjection.net/gallery2/main.php

Where are you seeing the login screen?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2012-11-17 22:28

that page show debug w/ no error.
when I click "Continue to the next page" I get a login screen and again debug w/ no error
I cannot even get to your root album where you are seeing? the error.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Tue, 2012-11-20 19:46

....

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Sun, 2012-11-18 00:10

I sent you a PM with the password.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-11-18 00:44

Well, the error is not specific in naming the actual missing object.
Which makes me think it is a module/user/theme and not an item.
Luckily you had Alan's Integrity maintenance module installed.
BUT it never completed as it ran out of memory: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 56360883 bytes)

try to allocate more memory for php - there are ways your host would disapprove of like:
@ini_set('memory_limit', '521M');
in config.php

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Sun, 2012-11-18 04:15

I have added the suggested line to config.php, I don't think my host would mind. Let me know if that helps.

Should I maybe reinstall the theme?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-11-18 05:07

I cannot seem to get any further w/ my current access.
Maybe you could hire myself or another gallery expert to further explore the problem.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Mon, 2012-11-19 20:10

Do you think reinstalling the Gallery from scratch would fix the problem? Any chance it would remember the positioning of the gallery albums if I do that?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2012-11-19 21:56

Did you ever think to give me creds to get past the login screen and actually witness the error?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Mon, 2012-11-19 22:15

Yes, I sent you a private message with the login and password.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2012-11-19 22:34

Oh yea, now I remember. Backing up your gallery's DB now

send me ftp access and I'll see what I can do.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Mon, 2012-11-19 22:41

You are a saint! Just sent you a private message with the details.

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Tue, 2012-11-20 16:20

Any luck?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-11-20 16:31

didn't I send you like 4 PMs?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Tue, 2012-11-20 16:40

Oops! I should've checked that first. Responded!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-11-20 18:16
 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Tue, 2012-11-20 18:51

Awesome! Anything I can do in the future to prevent this? Like I mentioned, I get a user error every so often with the Wordpress bridge. Is there a safe way to flush registered Gallery2 users (since only I upload photos)?

Also, do you have a paypal account I can send a donation to for being so generous with your time?

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Tue, 2012-11-20 19:46

I'm noticing a lot of albums are missing from the listing now. But, if I go into g2data/albums, they are there. Would it be ok to move them to my photouploads directory and re-import the albums or would that break it?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-11-20 21:04
Quote:
Awesome! Anything I can do in the future to prevent this? Like I mentioned, I get a user error every so often with the Wordpress bridge.

I'm not sure whats going on there. When I took over the project, I looked over the code and it mostly seems sound. Only a few depreciated WP function that I need to update.
But its been running fine on my test site for a couple of months now.
We ran into similar issues on FYW a few years ago. When a new user was created we were cloning an album as a skeleton to their new user album. We had way too many items in the skeleton and it took too long and users navigated away leaving a 1/2 created user album - which threw these missing object errors.

Quote:
Is there a safe way to flush registered Gallery2 users (since only I upload photos)?

Not really. Just delete them from WP and make sure they were removed in G2 Admin as well.
I ran my missingObjectFix on your site and it found 340ish broken items and removed them. Which may be the missing albums you referred to.
Two of the users I removed owned a significant number of items, I did not check to see what type of items and ownership has been passed to you.

Quote:
Would it be ok to move them to my photouploads directory and re-import the albums or would that break it

Should be.

Quote:
Also, do you have a paypal account I can send a donation to for being so generous with your time?

I do. I have a donate button on most every page of FYW.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2012-11-20 21:33

Thank you very much.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Thu, 2012-11-22 22:51

No problem.

As I mentioned, I get errors now with the bridge. Here is the error anybody logged into the site will see, no matter if they're on the gallery or in Wordpress:

Quote:
Fatal G2 error

Here's the error from G2: Error (ERROR_COLLISION)
in modules/core/classes/GalleryUser.class at line 149 (GalleryCoreApi::error)
in modules/core/classes/GalleryEmbed.class at line 400 (GalleryUser::create)
in /var/www/clients/client0/web1/web/wp-content/plugins/wpg2/wpg2embed.inc at line 257 (GalleryEmbed::createUser)
in /var/www/clients/client0/web1/web/wp-content/plugins/wpg2/wpg2embed.inc at line 110
in /var/www/clients/client0/web1/web/wp-content/plugins/wpg2/wpg2functions.inc at line 523
in ??? at line 0
in /var/www/clients/client0/web1/web/wp-includes/plugin.php at line 403
in /var/www/clients/client0/web1/web/wp-includes/general-template.php at line 1576
in /var/www/clients/client0/web1/web/wp-content/themes/mi4/header.php at line 60
in /var/www/clients/client0/web1/web/wp-includes/template.php at line 390
in /var/www/clients/client0/web1/web/wp-includes/template.php at line 366
in /var/www/clients/client0/web1/web/wp-includes/general-template.php at line 34
in /var/www/clients/client0/web1/web/wp-content/themes/mi4/single.php at line 3
in /var/www/clients/client0/web1/web/wp-includes/template-loader.php at line 43
in /var/www/clients/client0/web1/web/wp-blog-header.php at line 16
in /var/www/clients/client0/web1/web/index.php at line 17

Now usually, if I just delete all the users except admin and Guest from the database this will be fixed, but last time it broke things. Any idea?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2012-11-22 23:47

I know how to fix that. What version of WPG2 are you using?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Fri, 2012-11-23 17:30

3.0.7

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2012-11-24 14:09

Ok, so when you say say you clear out users how are you doing this?

Your gallery has 787 users and I just joined and don't see the error.

So I think you are removing mapped users from the WPG2 user admin and they are not being removed from gallery itself.
So every time these users connect, WPG2 tries to re-map from WP to G2 them and they already exist in G2 causing the collision. <- I can add a check for this

If you are the only contributor to G2 maybe we just disable the individual user mapping.
UNLESS you allow users to comment as then they would need to be G2 users.

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Sun, 2012-11-25 22:23

I am absolutely fine with disabling user mapping, that sounds like the best idea. I am usually the only contributor and there are no comments usually on the photos. Where would I disable this?

Thank you for your help.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-11-25 22:54

try it now. should be treating everybody as guest except for admin.
Maybe you should disable the G2 comment module

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
robinjection

Joined: 2008-04-23
Posts: 39
Posted: Mon, 2012-11-26 23:31

Still seeing this error for some reason.

I disabled the commentary module.

Quote:
Fatal G2 error

Here's the error from G2: Error (ERROR_COLLISION)
in modules/core/classes/GalleryUser.class at line 149 (GalleryCoreApi::error)
in modules/core/classes/GalleryEmbed.class at line 400 (GalleryUser::create)
in /var/www/clients/client0/web1/web/wp-content/plugins/wpg2/wpg2embed.inc at line 257 (GalleryEmbed::createUser)
in /var/www/clients/client0/web1/web/wp-content/plugins/wpg2/wpg2embed.inc at line 110
in /var/www/clients/client0/web1/web/wp-content/plugins/wpg2/wpg2functions.inc at line 523
in ??? at line 0
in /var/www/clients/client0/web1/web/wp-includes/plugin.php at line 403
in /var/www/clients/client0/web1/web/wp-includes/general-template.php at line 1576
in /var/www/clients/client0/web1/web/wp-content/themes/mi4/header.php at line 60
in /var/www/clients/client0/web1/web/wp-includes/template.php at line 390
in /var/www/clients/client0/web1/web/wp-includes/template.php at line 366
in /var/www/clients/client0/web1/web/wp-includes/general-template.php at line 34
in /var/www/clients/client0/web1/web/wp-content/themes/mi4/single.php at line 3
in /var/www/clients/client0/web1/web/wp-includes/template-loader.php at line 43
in /var/www/clients/client0/web1/web/wp-blog-header.php at line 16
in /var/www/clients/client0/web1/web/index.php at line 17

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-11-28 18:15

I just made some changes to your WPG2 so no usermapping should happen unless you are admin.
Let me know if you have any issues.

-s
________________________________
All New jQuery Minislideshow for G2/G3