ERROR_BAD_PARAMETER

islandcastaway
islandcastaway's picture

Joined: 2005-07-19
Posts: 15
Posted: Fri, 2007-10-26 15:22

Finally am getting around to upgrading from wpg2 to wpg3 on my personal sites and when i goto the rewrite area i get :

Gallery2 Rewrite Module: Validation Checklist
Fatal G2 error
Here's the error from G2: Error (ERROR_BAD_PARAMETER)

* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (gallerycoreapi::error)
* 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/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2embed.inc at line 102 (galleryembed::checkactiveuser)
* in /home/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2managerewrites.inc at line 130
* in /home/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2managerewrites.inc at line 57
* in ??? at line 0
* in /home/.dowel/mydiskdrive/mydiskdrive/includes/plugin.php at line 160
* in /home/.dowel/mydiskdrive/mydiskdrive/admin/admin.php at line 51

 
trbailey
trbailey's picture

Joined: 2007-04-16
Posts: 172
Posted: Sat, 2007-10-27 04:20

Unless someone recognizes this immediately, you'll have to post more information:

Quote:
* in /home/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2embed.inc at line 102 (galleryembed::checkactiveuser)
* in /home/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2managerewrites.inc at line 130
* in /home/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2managerewrites.inc at line 57
* in ??? at line 0
* in /home/.dowel/mydiskdrive/mydiskdrive/includes/plugin.php at line 160
* in /home/.dowel/mydiskdrive/mydiskdrive/admin/admin.php at line 51

Is that really how you name your directories or is that an error in your path somewhere, like perhaps in the path to your gallery installation?

You can try this:
First disable the WPG3 plugin
Then UNINSTALL the rewrite module in gallery using a non-embedded login, logged in as admin.
Then tun off your permalinks in WP and make sure you can get to your posts.
Then delete your embedded /var/path/wordpress/.htaccess, recreated it (touch /var/path/wppath/.htacess), chmod it to 777 and check that it's owned by your server process www-data or apache or whatever version you run.
Finally get permalinks working in WP first before you enable the WPG3 module so you know you have write access to the .htaccess and so wp gets it's entries at the top.
Then enable the plugin and make sure you can browse to the gallery.
Then see if the plugin will enable rewrites for you. It probably won't so you'll have to use the non-embedded login to gallery to enable the rewriter in gallery.
Only enable the rewrite module first, not permalinks. And be sure when/if you do enable permalinks in gallery that you don't have one for admin.
Get the rewriter working in the non-embedded gallery first. When you return to the wpg3 item in wp admin, select the rewriter option and it should go green.
Lastly, read the page before you select "enabled ON" and have fun...
It worked for me several times on two different galleries. I developed this because I don't read the installation instructions. I had the .htaccess so full of crap it couldn't find it's A** from it's bites so it just sat there staring at me, like a dog at the dinner table, on Sunday afternoon, with a potroast up top... :)
-Tom

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sat, 2007-10-27 07:54

I got to admit that error is sooo unhelpful.. What is the status of the rewrite plugin, is it active already??
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
islandcastaway
islandcastaway's picture

Joined: 2005-07-19
Posts: 15
Posted: Sat, 2007-10-27 11:22

sorry,
main gallery setup had apache mod rewrite plugin active, only the first rewrite rule for albums n stuff, NOT the siteadmin(i saw posts relating to that)

wordpress had perma links active.

all was good.

liked the new page_id setup in wpg3 so gallery would automatically be in navigation scripts.

so i deleted wpg2,
deleted the tiny rat thing,
uploaded wpg3 activated it,
(Didnt read about deactivating rewrite first in main gallery)
whent to wpg2 paths and set it up, all was good.
went to next tab mod rewrite and got the error.

also get the error on the new page.

does this explain better?

 
trbailey
trbailey's picture

Joined: 2007-04-16
Posts: 172
Posted: Sat, 2007-10-27 19:27

So, did you get it working?
From my experience you have to enable things in a specific order, meaning you have to disable the rewriter in gallery before you enable the plugin in wp or it seems to get lost. I went round and round so many times I got lost. I have two different galleries and neither of them were in the www docroot. I finally moved them both to the document root, reran install to update the location and they both enabled just fine.
WPG3 has more features than just the navigation too, as you probably already noticed.
-Tom

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sat, 2007-10-27 22:29

So you only get the error then when trying to activate the Rewrite Module? Please navigate to your Gallery2 Site Admin -> Plugins and check what status the Rewrite module is..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
islandcastaway
islandcastaway's picture

Joined: 2005-07-19
Posts: 15
Posted: Mon, 2007-11-05 07:52

tryed trbailey's fix, still same error.

the error is also in the WPG2 Tags and sidebarblock tabs and the new generated wpg2 page.

like i said before all perma links work and g2 rewrites work fine, can turn them on/off when using the old version.

have deactivated/uninstalled/reinstalled/reactivated apache mod_rewrite thru gallery2

everything is fine until wpg3 is introduced.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sun, 2007-11-04 23:23

So if you turn off the Gallery2 Rewrites, everything works fine? What Version of Gallery2 are you running??
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
islandcastaway
islandcastaway's picture

Joined: 2005-07-19
Posts: 15
Posted: Mon, 2007-11-05 07:50

im running the newest everything down to wpembedded theme for g2.

if i turn off g2 rewrites(in gallery) i still get the errors. see previous post.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2007-11-05 08:45

Unfortunately your error is too generic. Can you please post a Gallery2 debug log..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
islandcastaway
islandcastaway's picture

Joined: 2005-07-19
Posts: 15
Posted: Mon, 2007-11-05 09:10

k, how do i do that when gallery itself works fine and the errors are on the wpg2 stuff?

this is all i get Fatal G2 error
Here's the error from G2: Error (ERROR_BAD_PARAMETER)

* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (gallerycoreapi::error)
* 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/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2embed.inc at line 102 (galleryembed::checkactiveuser)
* in /home/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2managerewrites.inc at line 130
* in /home/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2managerewrites.inc at line 57
* in ??? at line 0
* in /home/.dowel/mydiskdrive/mydiskdrive/includes/plugin.php at line 160
* in /home/.dowel/mydiskdrive/mydiskdrive/admin/admin.php at line 51

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Mon, 2007-11-05 19:55

Islandcastaway,

I saw a similar error when someone else thought that they were using mod_rewrite, but they really were using PHP Pathinfo for their rewrite method. After it's set up, it's not easy to tell the difference.

Just to verify that you are really using mod_rewrite in Gallery2, please go to Site Admin -> URL Rewrites -> Test and make sure that it shows

Quote:
Apache mod_rewrite Success
Testing if mod_rewrite is supported by the server.

If is says anything about Pathinfo, you'll have to completely uninstall the URL Rewrite plugin, reinstall it, and configure it to use mod_rewrite before reactivating it.

EDIT: The cold I'm catching is blurring my head. If you were running Pathinfo, WPG2 should not get the error you're seeing on the WPG2 -> Gallery2 Rewrites tab. It would show an error on the line that checks for mod_rewrite and give you directions at the bottom of the page telling you how to fix it. So, I doubt this is the problem. But it's still worth checking to make sure you really are running mod_rewrite.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2007-11-05 22:31
islandcastaway wrote:
k, how do i do that when gallery itself works fine and the errors are on the wpg2 stuff?

this is all i get Fatal G2 error
Here's the error from G2: Error (ERROR_BAD_PARAMETER)

Which all points to the Gallery2 Login event, thus why we need a Gallery2 debug log.. -> http://codex.gallery2.org/Gallery2:FAQ#How_to_set.2Fuse_Gallery_in_debug_mode.3F

Do you also get the same error in the Gallery2 Users Tab?

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, WPG2 Downloads, WPG2 Documentation

 
islandcastaway
islandcastaway's picture

Joined: 2005-07-19
Posts: 15
Posted: Thu, 2007-11-08 13:51

set g2 in debug mode(i think you need a wpg2 debug mode).

the error i get in wpg2 users tab is "Fatal G2 error: Object"

the rewrite/WPG2 Tags and sidebarblock tabs and the new generated wpg2 page has the same error as before i activated g2 debug:

Fatal G2 error
Here's the error from G2: Error (ERROR_BAD_PARAMETER)
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (gallerycoreapi::error)
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/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2embed.inc at line 102 (galleryembed::checkactiveuser)
in /home/.dowel/mydiskdrive/mydiskdrive/content/plugins/wpg2/wpg2template.inc at line 50
in ??? at line 0
in /home/.dowel/mydiskdrive/mydiskdrive/includes/plugin.php at line 160
in /home/.dowel/mydiskdrive/mydiskdrive/includes/template-loader.php at line 3
in /home/.dowel/mydiskdrive/mydiskdrive/blog-header.php at line 21
in /home/.dowel/mydiskdrive/mydiskdrive/index.php at line 4

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Thu, 2007-11-08 14:42

Can you post a link of the failing page? (Or PM it to me and to Ozgreg)

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
ken377lx

Joined: 2007-11-15
Posts: 1
Posted: Thu, 2007-11-15 17:50

I'm paying attention to this thread. I am having the same problem with the upgrade to wpg2 version 3 it seems. I have tried all of the above suggestions also.

------ Here is my screen, looks similar but not exactly the same ----------
Gallery2 Rewrite Module: Validation Checklist
Fatal G2 error
Here's the error from G2: Error (ERROR_BAD_PARAMETER)

* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (GalleryCoreApi::error)
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 127 (GalleryEntityHelper_simple::loadEntitiesById)
* in modules/core/classes/GalleryCoreApi.class at line 2288 (GalleryEntityHelper_simple::loadEntityByExternalId)
* in modules/core/classes/GalleryEmbed.class at line 215 (GalleryCoreApi::loadEntityByExternalId)
* in /srv/www/denverspeed/wordpress/wp-content/plugins/wpg2/wpg2embed.inc at line 102 (GalleryEmbed::checkActiveUser)
* in /srv/www/denverspeed/wordpress/wp-content/plugins/wpg2/wpg2managerewrites.inc at line 130
* in /srv/www/denverspeed/wordpress/wp-content/plugins/wpg2/wpg2managerewrites.inc at line 57
* in ??? at line 0
* in /srv/www/denverspeed/wordpress/wp-includes/plugin.php at line 164
* in /srv/www/denverspeed/wordpress/wp-admin/admin.php at line 49

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Thu, 2007-11-15 18:15

Sorry, we took the discussion offline and I never came back to post a final status.

It turned out that he had some strange paths done by doing a grep replacement of all the directories like /wp-content/ with ones like /content/. That and he had a plugin that let him go directly to the WPG2 Gallery2 Rewrites tab without first having to click on the WPG2 tab. The WPG2 tab is very important, because every time you click on it, it automatically revalidates WPG2.

What do you get when you click on the WPG2 tab?

Also, did you verify that you're really using mod_rewrite per the directions in the post above?

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
islandcastaway
islandcastaway's picture

Joined: 2005-07-19
Posts: 15
Posted: Fri, 2007-11-16 00:15

ahmm.

we both know that my greps had nothing to do with it and not sure what your trying to say about no wpg2 tab(u make that up?).

after your help the rewrites still never worked, always got the same error.

since i have spent so much time trying this upgrade i figure for the heck of it i would do a clean install of wordpress.

still exact same problems.

the one thing i did get out of all this is that you need to toggle back and forth the output(embeded or standalone) to actually reset the status, the wpg2 tab alone does not do this.

with rewrites not working i donnot have the time to go back and change all my internal links pointing to my gallery pages.

i really would like to use the updated wpg3 because of the embeded nav features but i just cant get it working.

let me know if you guys ever get it figured out

 
capt_kirk

Joined: 2006-01-24
Posts: 492
Posted: Fri, 2007-11-16 01:23
islandcastaway wrote:
we both know that my greps had nothing to do with it

As I told you while we were troubleshooting, you had multiple errors on your pages, even after we got WPG2 working again, and "I suspect those errors are from the grep, but can't prove without access to the files." I also said, "There are a lot of moving parts between the embedded page and the rewrite rules. They work in a normal setup, but it's tenuous at best because of the way WP does its rewrites. With the grep, like I said, your mileage may vary."

islandcastaway wrote:
not sure what your trying to say about no wpg2 tab(u make that up?).

I'm not saying you don't have a WPG2 tab, I'm saying that the dashboard plugin you have (unless I'm thinking of someone else's site) allows you to go to the WPG2 sub-tabs without clicking on the WPG2 tab first. Our concept was that on a "plain-vanilla" installation, you would have to click on the WPG2 main tab to get to any sub-tabs. The WPG2 main tab revalidates WPG2 every time you click it, so before you go to the subtabs, you know you're in a good state.

islandcastaway wrote:
after your help the rewrites still never worked, always got the same error.

It was working when we finished. If you'd e-mailed me, I'd have been happy to take another look. I still will be, if you'd like.

islandcastaway wrote:
with rewrites not working i donnot have the time to go back and change all my internal links pointing to my gallery pages.
i really would like to use the updated wpg3 because of the embeded nav features but i just cant get it working.
let me know if you guys ever get it figured out

It is figured out. It works well. Literally thousands of sites have it running with no problems. You just have to reset it if you make any changes to the G2 rewrite scheme. Like I said, it was working when I got done with it. I'll be happy to take another look, if you'll turn back on my admin account.

Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website

 
jryburn

Joined: 2008-05-10
Posts: 5
Posted: Sat, 2008-05-10 19:03

I am having a very similar issue with my setup. I have WP 2.5.1 with Gallery 2.2. I am running the newest version of WPG2 (3.0.6). In the file system I have WP in ~/blog and Gallery in ~/gallery. I get the following when I try to click on "Gallery2 Rewrites":

Fatal G2 error
Here's the error from G2: Error (ERROR_BAD_PARAMETER)
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 39 (GalleryCoreApi::error)
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/.foraker/jryburn/ryburn.org/blog/wp-content/plugins/wpg2/wpg2embed.inc at line 108 (GalleryEmbed::checkActiveUser)
in /home/.foraker/jryburn/ryburn.org/blog/wp-content/plugins/wpg2/wpg2managerewrites.inc at line 132
in /home/.foraker/jryburn/ryburn.org/blog/wp-content/plugins/wpg2/wpg2managerewrites.inc at line 59
in ??? at line 0
in /home/.foraker/jryburn/ryburn.org/blog/wp-includes/plugin.php at line 311
in /home/.foraker/jryburn/ryburn.org/blog/wp-admin/admin.php at line 55

I have used the plugin for a couple of years with no problems and loved it. I could never get the embedded gallery to look right but the linking to photos from within WP posts was great. I upgraded to the newest version and the whole thing quit. Now when I have the plugin activated, my home page (which loads WP) even fails.

Any help you guys can offer would be greatly appreciated.

Thanks,
-Justin

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sun, 2008-05-11 00:23

jryburn,

Unfortunately that error is pretty unhelpful, please have a read of this topic and post the debug log just prior to the error..

Thanks..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
jryburn

Joined: 2008-05-10
Posts: 5
Posted: Sun, 2008-05-11 17:08

Attached is the output from the debug. It does not really tell me much except it seems to be looking in the wrong directory for the gallery but it eventually finds the correct directory. Also, I noticed that once I activate the WPG2 plugin and click on the WPG2 tab, it disables URL Rewrite and Permalink modules in my Gallery install. I can re-enable these but as soon as I go back to the WPG2 tab in Wordpress, it disables them again.

-Justin

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sun, 2008-05-11 22:21

Hiya jryburn,

Thanks for the debug log, unfortunately you did not provide the log when you visited the Gallery2 Rewrite Tab which is where you are getting the error. As for the deactivation of the Gallery2 rewrite module that is expected, and you will get a message about this in the WPG2 initial validation screen. The Gallery2 rewrite module will remain OFF until you visit the Gallery2 Rewrite Tab and Turn it on..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
jryburn

Joined: 2008-05-10
Posts: 5
Posted: Mon, 2008-05-12 20:27

Ozgreg,

Here is the log from when I visited the Gallery2 Rewrite Tab. Event 43 was the last event in the log before I clicked on the WPG2 -> Gallery2 Rewrite tabs. Let me know if this helps. It does seem to say too much. Is there something I am missing in the settings for the event viewer?

Thanks,
-Justin

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2008-05-12 22:38

Actually I suspect 58 was the last event. If you visit your WPG2 Gallery2 Users tab do you also get an error?

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
jryburn

Joined: 2008-05-10
Posts: 5
Posted: Tue, 2008-05-13 16:50

No, when I visit the WPG2 Gallery2 Users tab I do not get an error but I also do not get any output in the tab. It seems to load the page but it is blank, no forms or anything.

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Wed, 2008-05-14 00:34

Hiya jryburn,

Yeah it is pretty clear as soon as the WPG2 opens up a session with Gallery2 it trips over and fails.. Can I please get you to check your hosting web error_log it might have something a little more useful because I am really scratching my head on this one..

Are you upgrading from an old version of WPG2 or this a new install? As you might just might have some kind of corruption in the G2 External User Mapping Table..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
jryburn

Joined: 2008-05-10
Posts: 5
Posted: Wed, 2008-05-14 16:10

Hey Ozgreg,

Unfortunately my error.log file does not log any messages when I am trying to configure the WPG2 plugin. I am not sure how the settings are configured for that file by my hosting provider though.

I did have an older version of the plugin and I clicked the "upgrade" link in the plugins in WP. That is how I got to this state so I deleted the directory, downloaded the .zip file from the website, and expanded it in to the plugin directory for WP. I double checked to make sure I have the same users in Gallery as I do in WP. Is there something else we can check to see if I have a problem with my G2 External User Mapping Table?

Thanks,
-Justin