i've first started with the 4.6 gallery2 release of the module, but had no luck.
the gallery2 installation itself is working fine.
after setting the correct directory, going to mydrupalsite.com/gallery show the error message "Unable to initialize embedded Gallery". in the watchdogs, i find this errors:
Unable to initialize embedded Gallery
Error (ERROR_MISSING_OBJECT)
* in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 179 (GalleryStatus::error)
* in modules/core/classes/GalleryCoreApi.class at line 506 (GalleryUserHelper_medium::fetchUserByUserName)
* in /var/kunden/webs/zites/drupal/modules/gallery.module at line 345 (GalleryCoreApi::fetchUserByUserName)
* in /var/kunden/webs/zites/drupal/modules/gallery.module at line 263
* in ??? at line 0
* in /var/kunden/webs/zites/drupal/includes/menu.inc at line 354
* in /var/kunden/webs/zites/drupal/index.php at line 18
i don't know, what i've could done wrong? any pointers?
i've also tried the latest cvs 4.6 branch module, but no change.
i'm running php5
Comments
Comment #1
ckngI'm having the exact same problem, but I'm using PHP 4.4.0.
Comment #2
kiz_0987 commentedWhat user are you logged into on Drupal when you try this? I'm not sure exactly how the code works, but there is a definite difference in how the Drupal admin is handled (user=1 in drupal) so try logging in under that username and see if the gallery works.
My installation works with admins and non-admins and anonymous so I'm not sure what is going wrong for you. Try with the drupal admin user and see. Good luck.
Comment #3
Jean Gionet commentedgetting the same error msg here too.. drupal and g2 are working properly if you run them seperatly..
Unable to initialize embedded Gallery
Error (ERROR_MISSING_OBJECT)
* in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 179 (gallerystatus::error)
* in modules/core/classes/GalleryCoreApi.class at line 506 (galleryuserhelper_medium::fetchuserbyusername)
* in /home/gionet/public_html/modules/gallery/gallery.module at line 345 (gallerycoreapi::fetchuserbyusername)
* in /home/gionet/public_html/modules/gallery/gallery.module at line 183
* in ??? at line 0
* in /home/gionet/public_html/includes/module.inc at line 182
* in /home/gionet/public_html/modules/block.module at line 502
* in ??? at line 0
* in /home/gionet/public_html/includes/module.inc at line 182
* in /home/gionet/public_html/includes/theme.inc at line 864
* in /home/gionet/public_html/themes/chameleon/chameleon.theme at line 62
* in ??? at line 0
* in /home/gionet/public_html/includes/theme.inc at line 186
* in /home/gionet/public_html/modules/node.module at line 1727
* in ??? at line 0
* in /home/gionet/public_html/includes/menu.inc at line 354
* in /home/gionet/public_html/index.php at line 18
Comment #4
fagoi always tried it with the admin user, so i tried without admin rights.
as anonymous and normal user i'll get redirected to http://drupalsite.com/http://drupalsite.com/gallery2/user/login, which of course not exists?
Comment #5
kiz_0987 commentedI do not understand this exactly. Please post more details on how you have set up your drupal and gallery2 apps. Questions include:
- What is the directory structure?
- Is gallery2 a subdir of drupal? If not, did you set up a symbolic link (as described in the INSTALL.txt file)?
- What are your gallery.module variable values in Drupal?
- Have you installed the Image Block (Random Block) module in Gallery2?
Also, I recommend turning off clean urls in Drupal and URL rewrite (deactivate and uninstall) in Gallery2 until you have it all working.
You should not be redirected in the way you suggest.
Comment #6
fagothe directory-structure is like this:
/serverdir/drupal/
/serverdir/gallery2
i've created a symbolic link inside the drupal directory, so that i can view the gallery at http://mydrupal.com/gallery2.
the drupal gallery2 location setting is set to 'gallery2/', which should suit. i set to display errors everywhere.
i've installed the Image Block (Random Block) module in Gallery2, but 've not activated drupals gallery block.
i've already played around with activating/installing/deinstalling gallery2 rewrite module, deinstalled it again, now. i had drupal clean urls enabled, disabled now.
trying to access q=gallery as admin uid=1 still brings up the errors as described above.
tried to access it with a normal user, redirected me to https://mydrupalsite/https://mydrupalsite/gallery2?q=user/login which acutally showed me the user login page, where i logged in *g* -> gotredirected to user/uid
after that, accessing with a various not admin user q=gallery redirects me to https://drupalsite/?q=user/$uid ?
i tried to access https://drupalsite/?q=gallery/main.php, which shows me a error screen from gallery2 (no information?) with the back link to the gallery "https://mydrupalsite/https://mydrupalsite/?q=gallery&g2_GALLERYSID=..." (not working..)
perhaps it's relevant, that i'm using https://url for both sites. however, both are reachable through http://url too.
thank you very much for your help,
fago
Comment #7
Edge-1 commentedI had the same problem of links showing up as http://drupalsite.com/http://drupalsite.com/gallery2/. My drupal and gallery2 installations reside in separate directories. I have a symlink to my gallery2 dir inside the drupal folder.
To correct the problem:
In /drupal/sites/default/settings.php, I had:
$base_url = 'http://drupalsite.com/drupal';
where it should have actually been:
$base_url = '/drupal';
Making this change fixed all of my redundant site names in gallery URLs.
I had login plenty of login problems, object_not_found problems, and sql error problems too. But after the 489th re-install of both Drupal and Gallery2, things seem to be working. I'm just not going to touch anything!
Good luck!
Comment #8
fagoah, thanks for this tip.
however, the situation for the admin user hasn't changed.
a normal user is now being redirected to the normal gallery installation (https://drupalsite/gallery2), trying drupalsite/?q=gallery/main.php still brings up a gallery2 error page. i just found the php-errors in the html source: (the javascript detailed view mechanism doesn't work?)
Error (ERROR_MISSING_OBJECT) : <ul><li><b>in</b> modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class <b>at line</b> 118 (GalleryStatus::error) <li><b>in</b> modules/core/classes/GalleryCoreApi.class <b>at line</b> 1762 (GalleryFileSystemEntityHelper_simple::fetchChildIdByPathComponent) <li><b>in</b> modules/core/classes/helpers/GalleryFileSystemEntityHelper_simple.class <b>at line</b> 63 (GalleryCoreApi::fetchChildIdByPathComponent) <li><b>in</b> modules/core/classes/GalleryCoreApi.class <b>at line</b> 1708 (GalleryFileSystemEntityHelper_simple::fetchItemIdByPath) <li><b>in</b> modules/core/classes/GalleryView.class <b>at line</b> 343 (GalleryCoreApi::fetchItemIdByPath) <li><b>in</b> modules/core/classes/GalleryView.class <b>at line</b> 219 (GalleryView::_getItem) <li><b>in</b> main.php <b>at line</b> 287 (GalleryView::doLoadTemplate) <li><b>in</b> main.php <b>at line</b> 87<li><b>in</b> modules/core/classes/GalleryEmbed.class <b>at line</b> 153<li><b>in</b> /var/kunden/webs/zites/drupal/modules/gallery.module <b>at line</b> 276 (GalleryEmbed::handleRequest) <li><b>in</b> ??? <b>at line</b> 0<li><b>in</b> /var/kunden/webs/zites/drupal/includes/menu.inc <b>at line</b> 354<li><b>in</b> /var/kunden/webs/zites/drupal/index.php <b>at line</b> 18</ul>Comment #9
Edge-1 commentedI'm a bit confused. Why would you need/want to access the main G2 page by http://drupalsite/?q=gallery/main.php when http://drupalsite/?q=gallery brings you to the main page?
For what it's worth, I receive the same errors as you when I attach the /main.php to the url.
In one of my earlier installations I had issues with only my admin user, as well. Any users I created in Drupal worked fine in G2. It may have been because I had different admin passwords in Drupal and G2. Not sure.
Comment #10
fagoi did this, just for testing purposes. sure i didn't know if it should work ;)
http://drupalsite/?q=gallery brings me not to the main page inside drupal, it brings to the standalone installation of gallery2!!
creating a new user still brings up the error "Unable to initialize embedded Gallery". the user is redirected to the gallery2 standalone installation, when accessing q=gallery as mentioned above.
now i'm confused ? have i to create any user in gallery2 for drupal's gallery modul? i haven't read anything about that.
but i read, that you shouldn't name the admins of both systems equal - perhaps you ran into this.
Comment #11
ckngMy drupal and gallery installation dir is as below
mysite.com/drupal
mysite.com/drupal/gallery2
In my case, http://mysite.com/drupal/?q=gallery bring me to embedded gallery, but with error "Unable to initialize embedded Gallery" with link to setting page, which is actually setup properly.
And both user account for drupal and G2 are user 1 with same login and password.
Comment #12
fagohm.
i discovered that gallery2 users has been already created for my normal drupal users. _gallery_init() seems too work now, but when $result = GalleryEmbed::handleRequest(); is called, it redirects me to the standalone gallery installation. any ideas, why?
Comment #13
ethang commentedMy gallery just exploded out of nowhere, with the same errors as posted above:
It was working perfectly for many days, and I was working on totally unrelated nodes when the errors appeared. I had just switched themes from slash to pushbutton, but the errors stayed when I switched back.
I'm using the newest release of gallery-2.0 and drupal 4.6.2
Directory Structure: /public_html/drupal/gallery2
Any idea what happened? Did anybody find solutions to the problems above?
Comment #14
manatorg commentedI had a similiar problem. the attached patch solves this for me. for you to?
Comment #15
ethang commentedNo, after applying that patch I still get the error:
warning: implode(): Bad arguments. in /site/modules/gallery.module on line 190.
also: "Unable to get Gallery image block" on my gallery page
There's a similar problem, and some patches, here, but that patch wouldn't fix my problem either.
I posed some questions on that node that continue to baffle me:
Thanks for the ideas,
Comment #16
pitpit commentedadmin name et password must be equals in drupal et g2
every other account created in drupal will be automatically created in g2
Edge's bug, Fago's bug: fixed
Ethang's bug: fixed in http://drupal.org/node/31468
Comment #17
(not verified) commented