Hi,

again me, again with probably a stubid question. But somehow I can't figure it out. It works perfect until the user clicks directly into an album. The album displays just fine, but all menu links from drupal disappear. No primary links on the top, no navigation on the left, everything gone. The only links left are the breadcrumb above the main part.

Any ideas way and what I need to enable?

Thanks in advance!

Daniel

Comments

lvthunder’s picture

Under admin in Drupal click Blocks. Then pick which block you want to show up and click configure. There is an area there that specifies which pages the block shows up on.

Fogg’s picture

Well, the navigation block for example is set to be visible always. No limitations, and it still disappears inside the albums.

lvthunder’s picture

Which themes are you using for both Drupal and G2? Also can you post a link so I can take a look.

pmouraguedes’s picture

I can reproduce this issue with the Garland theme. Only tried this theme though. I can also verify that the problem doesn't happen in standalone gallery2.

profix898’s picture

Two questions trying to understand your issue:
1. Are you using GalleryMenu module? Does it work without this module?
2. Are you running G2 (and Drupal) with URL Rewrite enabled? Does it work with this disabled?

pmouraguedes’s picture

1. Yes, it's enabled. It works without this module!
2. Yes, rewrite is enabled.

I'm not sure what I will miss with GalleryMenu disabled. Can this be fixed?

profix898’s picture

@pmouraguedes: Can you please be a little more verbose!? So it works without GalleryMenu, right? Does this issue only occurs when you navigate your gallery using the GalleryMenu links? Are the links in the Drupal menu identical to the G2 generated urls for the same item? Does GalleryMenu work with URL Rewrite disabled?

@all: It would be great to have a detailed description how to reproduce ... Is the issue theme-dependent? Should I be able to reproduce using Garland + Matrix? What modules need to be installed to see this happen.
The issue description mentions that the Drupal navigation menu (and stuff) disappears not the G2 blocks. Or did I get this wrong? So how can you say that the problem doesnt exist in G2 standalone where no Drupal elements are visible anyway?

flibbit’s picture

Category: support » bug

Hi There,

I'm having the same issue. You can observe at http://blackpepperart.com. Feel free to sign up and add a few images to test.

I'm running drupal 6.x - with ther relevant module version and gallery 2.3. I currently have clean urls disabled in drupal and also in gallery. (I haven't figured out how to get clean urls working for the gallery app yet). If I enable clean urls in drupal the same problem still happens. So i'm inclined to think it's not a clean url issue. The url given by the 'My album' link is identical to the one produced if I just click on the album thumbnail and enter the album that way.

If you click on the gallery link, and then enter one of the galleries, you'll notice all the navigation links dissapear, including primary links, secondary links and the navigation menu. They return once you go back to the top level of the site.

The issue ONLY occurs when I enable the gallery menu module. When disabled the problem doesn't happen.

I've tested with three different themes - and the same problem happens. So I don't think it is related to a specific theme.

If you need any further information - let me know.

lvthunder’s picture

The first thing I noticed is you might want to go give permissions for access gallery to the anonymous user.

If the error only occurs with the gallery menu module that's where the problem is. I'm not a good enough programmer to figure out what's wrong. I'm not even sure what the gallery menu module does.

flibbit’s picture

Would anonymous access make it easier to debug?

But yeah - it looks like the gallery menu module is the culprit. I'm not to savvy with the php either - but I get the impression from having a look at the code that at some point it goes to suck from the database all the links that should be there. There might be some bad syntax or something that is preventing the database from returning a result - but I only ever learnt a smattering of php and really can't remember any of it. Maybe in this piece of code? (apologies if I am barking up the wrong tree)

// Fetch all menu links currently present in Drupal
$olditems = array();
$result = db_query("SELECT link_path FROM {menu_links} WHERE module = '%s' AND link_path LIKE '%s'", 'gallery_menu', variable_get('gallery_base', 'gallery') .'/%');
while ($item = db_fetch_object($result)) {
if ($rebuild) {
menu_link_delete(NULL, $item->link_path);
}
else {
$olditems[$item->link_path] = $item->link_path;
}
}

// Insert/update/delete link items
foreach ($items as $item) {
if (in_array($item['link_path'], $olditems)) {
// Update existing item
menu_link_maintain('gallery_menu', 'update', $item['link_path'], $item['link_title']);
unset($olditems[$item['link_path']]);
}
else {
// Add new item
list($item['menu_name'], $item['plid']) = explode(':', $menu_parent);
if (count(explode('/', $item['link_path'])) > 2) {
unset($item['plid']);
}
menu_link_save($item);
}
}
// Remove obsolete items
foreach ($olditems as $link_path) {
menu_link_delete(NULL, $link_path);
}
}

lvthunder’s picture

No it wouldn't, but I just thought you would want anonymous people to see your gallery. I've seen it before when people design a site logged in then wonder why part of the site disappears when they look at it on another computer.

flibbit’s picture

ah right - well I've enabled it for anonymous users. Yeah - you make sense.

Fogg’s picture

Hi all,

my demosite would be http://www.draes.net.

Yes, I use Garland and Matrix.

Confirmed, deactivating the Galler2Menu-Module in drupal helps. Then the site stays correct. What does that module in detail ? Do I need it?

Thanks,

Daniel

rogueturnip’s picture

Ditto here. I turned off the Gallery2Menu module and it works. Looks like this module removes the Gallery and My Album from the Navigation block.

profix898’s picture

I just spent about 1 hour trying to reproduce this issue. Without success. I tried locally on my dev box and on two different servers. Would anyone grant me access to his/her site to see the problem myself and to inspect the configuration? Or can you please post some configuration details (attach the report generated by gallery module to your post)? You may also log in at http://g2drupal.com/ (gallery:g2drupal) to compare your settings with the demo site's.

Fogg’s picture

If you want you can sign in here: http://www.draes.net/cms/backend. I'l give you the admin rights right away.
Thanks!

motivez’s picture

I can confirm this

Drupal: 6.3, A3_Atlantis theme, gallery module 6.x-1.x-dev
Gallery: 2.3-rc1, matrix theme

All default configuration for the gallery module itself, with the exception of I don't have clean URL rewrites enabled for it, as it breaks my entire site causing every link to 404. I do have clean URL's enabled for Drupal. I also have GlobalRedirect and Pathauto installed.

My menus disappear and the breadcrumb does not show up for Gallery navigation inside of Drupal, but works fine in at the standalone URL.

If I disable the Gallery Menu module, my Primary Links menu, and the Administration dropdown work again, but the breadcrumb still doesn't show up inside of the gallery for navigation such as Root > Album1 > Sub-Album1, etc.

jjoves’s picture

Hi all, confirmed as well.
I hope this helps. - James

Drupal: 6.4, Foliage Theme, gallery module 6.x-1.x-dev
Gallery: 2.3-rc1, Sirius theme and Matrix
PHP limit: 100M
Gallery accessible at Random Block on Front page OR
Forums and Galleries > Members Galleries

3 Gallery Blocks
1. Random Block (show on front only) works (BOTH)
2. Gallery Navigation (N/A) I think? Gallery Edit shows up at the bottom (SIRIUS)
2. Gallery Navigation Shows up at Album level (MATRIX)
3. Keywords Block (at header enabled for all pages) Does not work?. Only shows up at the album level. (BOTH)

Results:

Primary Links: Disappear at the Album level
Secondary Links: Disappear at the Album level
Drupal Blocks: Navigation, etc. (enabled for all pages) Disappear at the Album level

Login at at the Album level or Picture level instead of the home page; Gallery2 will be the frame of reference not Drupal theme.

Results:

Disabled the Gallery Menu module.

Primary Links: Viewable
Secondary Links: Viewable
Drupal Blocks: Navigation, etc. (enabled for all pages) Viewable

Login at the Album level or Picture level instead of the home page; Gallery 2 will be the frame of reference w/o any headers or blocks, etc. Login present. If you click on a pic, a redirect loop error occurs (Firefox).

NOTES

for website: seaandsnow.org
Gallery Module
Gallery2 URL or URI:
/main/gallery2/
Gallery2 filesystem path:
/hermes/web02/b2962/jovestec/seaandsnow/main/gallery2/
Embed URI:
/main/index.php?q=gallery2
Gallery base:
gallery2

Public path to your .htaccess file:
/main/gallery2/
Filesystem path to your .htaccess file:
/hermes/web02/b2962/jovestec/seaandsnow/main/gallery2/

Gallery Setting for URL Rewrite:
v/%path% (issue w/ gallery2 prefix, see http://gallery.menalto.com/node/81271)

lexthoonen’s picture

Hi profix898,

I saw you're trying to solve the blank menus with gallery/drupal.

I've got the same issue on: http://www.fotogeorgeburggraaff.nl/

I've moved this site to a new server (it was slow on the old one but worked), and since then, apart from the blank menus t had on the old site as well, it started producing the dreadful blank pages. I had to set the memory limit in php.ini to a ridiculous 256 not to get the blank pages. I think that's why the server sometimes just crashes. Can't even get in anymore via ssh then.

I'll send login details to you, maybe you want to have a look.

pjek’s picture

Version: 6.x-1.x-dev » 6.x-1.0

I can confirm that disabling the Gallery Menu module, solves the problem of the disappearing menu when accessing the embedded albums. Before disabling the Gallery menu module, my primary ans secondary menu's would disappear when entering an album on my website www.bodynsoulpartypix.com . Now that I have disabled the Gallery Menu module according to this thread, I have acces to the menus in the albums again.

modctek’s picture

I'm having this issue, and I don't have the Gallery2 Menu module enabled. And here's something that will really bend your mind. I'm using the same codebase for a multisite Gallery 2 install, with another drupal site sharing the same codebase (via multisite as well) as the problem site, and that one is having no problems. How's that for really weird!

I suspect that I've honked something up with the various symlinks, htaccess files, etc, but I'm too tired to sort it out at the moment.

GarP’s picture

Had the same problem that Fogg had when started this thread. Found a solution that worked for me at http://drupal.org/node/432092.

Which was --- Remove/comment out this line in gallery.module:

drupal_alter('gallery_page', $result, array());

Thanks to sparr who posted it, whom in turn thanked takahiro. And, also to Qlof for posting it in the node/432092.

koppie’s picture

Status: Active » Closed (duplicate)

That worked for me too. I'm going to mark this bug as a duplicate of the other. Thanks GarP!

Fogg’s picture

Thanks for this update. The mentioned fix works here as well.