I've finally gotten gallery2 working within drupal6, except for the minor detail that I cannot access any of my gallery2 admin pages. Users are synced properly and I've ensured that my user role is set to gallery administrator in the Gallery users.

The Site Admin link in gallery2 links to http://mercworks.org/index.php?q=gallery&g2_view=core.SiteAdmin&g2_retur..., but I am redirected to http://mercworks.org/user/login?destination=gallery%3Fg2_view%3Dcore.Sit..., which gives me an "Access Denied" page (and I'm logged in, of course).

I have clean URLs enabled in Drupal but not for gallery2, because I cannot get them to work properly on my server. Any ideas regarding how to fix this?

Comments

profix898’s picture

Yeah, thats a known issue with Gallery 2.3 :( The bug report for this is considered a release blocker for G2.3 already and the G2 devs are working to resolve it.
It is basically a session issue, that was introduced with the new 'admin session protection'. I will try to work around by manipulating the G2 session directly. However, the problem should be temporary on the current state of Gallery 2.3 development.

MercWorks’s picture

Priority: Critical » Normal
Status: Active » Closed (fixed)

Ohhh, thanks for the speedy response. I found I was able to get into admin by going through gallery2 directly rather than through drupal.

typehost’s picture

Priority: Normal » Critical

I am having the same issue with Drupal 5.x install and Gallery 2.3 integration, however I cannot log in as admin from the G2 stand alone or from the Drupal G2 quick links page. This is a critical issue.

profix898’s picture

@typehost: Gallery 2.3 is not supported by the 5.x-2.x series of gallery module. The "access denied" thing is actually a bug in G2.3 and I added a workaround to the 6.x-1.x series, so that people can play with that version. For 5.x you should stay on G2.2.x and wait for a final release of G2.3 first.

If you really need this working with 5.x-2.x place the following snippet at the end of function _gallery_init() in gallery_base.inc:

// Session handling
  $g2_session =& $GLOBALS['gallery']->getSession();
	$g2_session->doNotUseTempId();
	//
  list ($ret, $g2_admin) = GalleryCoreApi::isUserInSiteAdminGroup();
  if (!$ret && $g2_admin) {
    $g2_session->put('session.siteAdminActivityTimestamp', time());
  }