I've scoured documentation and forums for a clue here. Normally I'd find a different solution, but this seems to be such a unique, easy-to-use module and I'd like to solve this!

My problem is simple to describe: I've followed all the steps for installation closely and carefully, created gallery directories and added pictures. But when I go to manage my galleries, the links for the galleries redirect me to the front page. While the address bar continues to read "mysite.com/?fld=/galleries", all I see is the front page.

I'm totally baffled and hoping someone can help me! (I'm a total drupal newb who has managed well with other modules)

Happy to provide more info if it will help troubleshoot this.


Gutz-Pilz’s picture

I have the same Problem !

it would be nice if somebody can help...

Gutz-Pilz’s picture

the problem is... activate 'clean-urls'.

if u can't activate it. go to ftp and search in the .htacces file for ' Options +FollowSymLinks ' (without ' ') and put a ' # ' for it (without ' ')
(like that # Options +FollowSymLinks)...

otherwise rename .htacces to something like a***ole
or delete it...

sorry for my english, i'm a German. but this will solve ur problem !

gaia’s picture

Hi there,

same problem here. i followed the instructions of Gutz-Pilz, but the links in "manage" still redirect to front page.

can somebody help?

gaia’s picture


deej_1977’s picture

Version: 5.x-4.1 » 6.x-1.2

Same problem here. Solution presented by Gutz does not work unfortunately. Files reside under /sites/default/files/albums. Followed the step-by-step from authors homepage but to no avail. PHP is v5, MySQL also v5.

Ronja111’s picture

Version: 6.x-1.2 » 5.x-4.1

Yes, I've got the same problem. Why is that? Is there somebody who knows the solution or maybe needs some more configuration-information? I'm using Drupal 5.10, MySWL 5.0.51a, PHP 5.2.6.

Ronja111’s picture

I just managed to get everything to work by activating the "clean-url" setting, but I prior didn' get it to work by disabling the "Options +FollowSymLinks"-line proposed by Gutz-Pilz. Is there anybody who has a solution for those of us without the possibility of using clean-urls?

gaia’s picture

activating "clean url" is not an option for me, too. any others ideas?

ttaylor797’s picture

Version: 5.x-4.1 » 6.x-3.0
Category: support » bug
Status: Postponed (maintainer needs more info) » Needs review

I have D6.11, Brilliant Gallery 6.x-3.0, and clean URLs enabled (and properly working)

When I click on the admin link "Configure permissions"; which, shows as:

I get redirected to:

I have drupal in a sub directory, so the above just shows the my test server's root directory :p

It looks like function brilliant_gallery_perms() in brilliant_gallery.module (line 261) is at fault:
header("Location: /?q=admin/user/permissions#module-brilliant_gallery");

I have changed that line to the following:
global $base_path;
header("Location: $base_path/admin/user/permissions#module-brilliant_gallery");

I hope that helps someone else.... it worked for me ;)

thrillahill’s picture

Just wanted to post that Clean Urls fixed the problem for us too.

RegB’s picture

I thought this module was such a perfect solution to the needs of my website. We didn't want to bloat our database with images. We loved the option of relying on the file system instead. However, after installing and configuring this module, we hit this problem and had to stop. We cannot use clean URLs. Such a pity.

fkelly’s picture

Issue summary: View changes

I am using the 7.x series of BG but have the same problem: with clean urls disabled BG manage redirects back to the home page.

In version = "7.x-1.8" the source of the problem is located in the program brilliant_gallery_manage.inc at lines 29 through 36:

  # Non-clean URLs need removing ?q=
  $path = str_replace("?q=", "", $path);
  if ($galleryfolder <> '') {
	 $rp .= '/' . $galleryfolder;

Basically, when you are admin/config and go to manage brilliant gallery the program brings up the list of directories within your gallery directory and sets a link such as:


where the text following the ? becomes a "GET" value on the next page load. (Hope I am saying this right technically). The code I quoted strips this off (so the value of $GET['fld'] that is tested later in the program is not set (and causes a warning error too).

With clean urls turned on the link quoted above gets set to:


and thus can bring you back to the gallery manage screen with fld set.

Actually, I am not satisfied with this explanation. I think I'm in the right ballpark though ... clearly without clean urls set the manage screen is not working. If the program author was looking in he could maybe address this more definitively but I will try to see if I can find a code solution that might work. The str_replace listed above should just be replacing "?=" which is why I'm not satisfied that I have the total diagnosis.

I'm fortunate to have a test localhost system where I can set clean urls on and off without affecting anything else.

fkelly’s picture

Looking further but not definite yet.

When you do the "manage" page display a list item is created. The code is $result .= '<li><a href="?fld=' . $galleryfolder . $path_middle . '">' . $galleryfolder . $path_middle . $rootfolder . '</a></li>';

with clean urls turned on the href contains the full path /admin/config/brilliant_gallery/manage and with clean urls turned off it only it just contains the ?fld=galleries after the root url of your site. I don't see where the brilliant gallery manage program is inserting the part about /admin/config/brilliant_gallery/manage so I have to think this is something Drupal is inserting when clean urls are on. I'm not sure what a programmatic solution is and I don't know that much about how clean urls work. Probably there is a discussion about this out in Drupal forums somewhere.

Until there is a solution to this (perhaps there is a way to check if clean urls are on and programmatically insert "/admin/config/brilliant_gallery/manage" into the href if clean urls are off.

fkelly’s picture

Working on this further but not fully understanding how clean urls work ... and referring back to my previous post to avoid duplicating statements ...

regardless of whether clean urls are on or off the link in the list item that links to the gallery (or album) folder that you've placed locally is the same. At least as presented in html and evidenced when you go into view source mode on the output. This is to say: '<li><a href="?fld=' . $galleryfolder . $path_middle . '">' . $galleryfolder . $path_middle . $rootfolder . '</a></li> which translates into something like
a href of fld='galleries".

What's strange to me is that when clean urls are turned on and you move the cursor over the link, the link shown is the full link "localhost/admin/config/brilliant_gallery/manage ..." when clean urls are on and just "localhost" when clean urls are off. So something is "intercepting" the html on the page and substituting in the full url with clean urls on. I tried turning javascript off but that doesn't keep the interception from happening. I'm thinking css or something else that I don't understand. I've searched all around for an answer but not having any luck yet.

On my test system (I'm not recommending this for general use!" I modified the code that produces the link to "hard-code" the full link. As per:

$result .= '<li><a href=/admin/config/brilliant_gallery/manage/?fld=' . $galleryfolder . $path_middle.'>' . $galleryfolder . $path_middle . $rootfolder . '</a></li>';

On my localhost system this seems to put in a working link for both the clean url and non-clean url situation, in limited testing. But we really need the author or someone more expert with Drupal code to address this.

While they are at it, I'm not sure what value there is to having the js and css directories listed on the manage page. As far as I can tell there is nothing you can "manage" in them. Right now, there probably should be just one gallery or image or album directory listed with the possibility of having more down the road. But if the directory doesn't have any image files in it, it probably should be filtered out.