G2 error after setting WP page to "password protected"

maywind
maywind's picture

Joined: 2009-01-26
Posts: 5
Posted: Mon, 2010-09-13 12:03

Hi,

I am not quite sure if the real problem lies with Gallery, WP or wpg2... I am using WP 3.0.1 with wpg 3.0.7 and Gallery 2.3.

I have included my gallery via wpg2 as a public page on my website http://www.maywind.net. Today I decided to protect the gallery with a password. I have done this via protecting the WP page. Now I get the following error message when going to http://www.maywind.net/wpg2:

Quote:
Fatal G2 error

Here's the error from G2: Error (ERROR_MISSING_OBJECT)
in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 143 (GalleryCoreApi::error)
in modules/core/classes/GalleryCoreApi.class at line 606 (GalleryUserHelper_medium::fetchUserByUserName)
in /www/htdocs/maywind/html_public/blog/wp-content/plugins/wpg2/wpg2embed.inc at line 229 (GalleryCoreApi::fetchUserByUserName)
in /www/htdocs/maywind/html_public/blog/wp-content/plugins/wpg2/wpg2embed.inc at line 110
in /www/htdocs/maywind/html_public/blog/wp-content/plugins/wpg2/wpg2template.inc at line 46
in ??? at line 0
in /www/htdocs/maywind/html_public/blog/wp-includes/plugin.php at line 395
in /www/htdocs/maywind/html_public/blog/wp-includes/template-loader.php at line 7
in /www/htdocs/maywind/html_public/blog/wp-blog-header.php at line 16
in /www/htdocs/maywind/html_public/index.php at line 4

I would like to undo this change to find a solution that works, but I can not access my website any more...

Can anyone help...?

maywind

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2010-09-13 12:54

If the change was made to WP and not G2, I'd ask in a WP forum.(How to disable a WP protected page when I cannot access WP)
Probably a simple DB change.

As for the G2 error, looks like WP is blocking the username from G2.
Your gallery is still fine http://www.maywind.net/gallery2/main.php

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
maywind
maywind's picture

Joined: 2009-01-26
Posts: 5
Posted: Mon, 2010-09-13 12:59

Ok, after disabling all plugins in WP I have played around a little and come to the following situation:

When I am not logged into WP, everything is fine (blog and wpg page are showing correctly), but the password protection does not work. When I log in as WP admin, I get a "Fatal G2 error" when going to http://www.maywind.net. The WP admin area works fine. Now the error message shows in the "User -> Gallery2 users" area:

Quote:
Fatal G2 error

Here's the error from G2: Error (ERROR_MISSING_OBJECT)
in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 143 (GalleryCoreApi::error)
in modules/core/classes/GalleryCoreApi.class at line 606 (GalleryUserHelper_medium::fetchUserByUserName)
in /www/htdocs/maywind/html_public/blog/wp-content/plugins/wpg2/wpg2embed.inc at line 229 (GalleryCoreApi::fetchUserByUserName)
in /www/htdocs/maywind/html_public/blog/wp-content/plugins/wpg2/wpg2embed.inc at line 110
in /www/htdocs/maywind/html_public/blog/wp-content/plugins/wpg2/wpg2usersadmin.php at line 37
in /www/htdocs/maywind/html_public/blog/wp-admin/admin.php at line 155
in /www/htdocs/maywind/html_public/blog/wp-admin/users.php at line 10

The WP admin does not exist as user in Gallery. Instead, I have created a WP editor with the same login as in Gallery. When I change the type of account to admin, the access works fine (apart from the "incompatible password" thing). But I still do not have the password protection...

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2010-09-13 13:06

Gallery has its own password module, but the best way would be to use gallery's permissions to require registered user, this way the Guest user will be redirected to WP login.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
maywind
maywind's picture

Joined: 2009-01-26
Posts: 5
Posted: Mon, 2010-09-13 13:47

Hmm, I'm not sure I get what you mean... When I allow only registered users and admins to see the albums (in "album -> change permission"), I still can access the page in WP, but now it says "this album is empty"...

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2010-09-13 13:55

gallery has a loginRedirect parameter used by embedding apps which as the name states will redirect to the proper login page.
I'm sure WP uses this feature as the whole GalleryEmbed was structured around WP.

If you goto gallery's root album -> edit permissions -> remove Everbody views, it should redirect to WP login

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
maywind
maywind's picture

Joined: 2009-01-26
Posts: 5
Posted: Mon, 2010-09-13 14:05

Doesn't work, I just get an "error 404" message. I will keep on trying...

Thanks nevertheless!
maywind

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2010-09-13 14:09

the 404 page have an address you could add to wpg2 admin as the loginRedirect?
Does wpg2 admin allow you to edit these fields?
can you create the page that it's currently redirecting to and make it a login page?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2