Gallery strange Url behavior into Mambo
kromm
Joined: 2005-04-21
Posts: 5 |
![]() |
Mambo 4.5.2.1 Integration between the Gallery and Mambo is fine, that is, the gallery's mainpage is integrated within Mambo and uses the Mambo template. The following urls are links to albums within the gallery: Quote:
Firefox 1.0.3 The "firefox url" shows "%5C" after the domain-name, which is the same as a backslash. If I manually remove "%5C/", the url is alright. The "IE url" doesn't show the domain-name. If I manually add the domain-name, the url is alright. The standalone gallery works great. What on earth is going on here? There are several threads with this same question, but unfortunately with no solution. I mailed the author of the integrator 'gallery/contrib/mambo' but hasn't replied yet. Anybody? |
|
larsbrink
![]()
Joined: 2004-05-24
Posts: 6 |
![]() |
Hi kromm, I have the same problem. with the same configuration. More info is that the server hosting the mambo/gallery is Windows 2000. I dont know about the FireFox thing but the IE problem is exactly like. Standalone works. Anyone have a patch or a clue where to look for this? |
|
syn
Joined: 2005-03-10
Posts: 14 |
![]() |
larsbrink wrote:
Hi kromm, I have givven kromm a potential fix and am awaiting a reply. I just thought of something else that may cause it.. (I have fixed it, but forget how). |
|
larsbrink
![]()
Joined: 2004-05-24
Posts: 6 |
![]() |
Hi Syn! Could you send the same to me please? You might have it in your sent mail? HavocDK [at] oddguys [dot] com ..or if you lost it a file to look into? Regards. |
|
kromm
Joined: 2005-04-21
Posts: 5 |
![]() |
Unfortuanely the files 'syn' has sent me don't do the trick (I Mailed 'syn' about this). Files have been send through pm to larsbrink |
|
brockster
Joined: 2005-04-21
Posts: 6 |
![]() |
Quote:
Internet Explorer 6.0 I have the same problem on win2k3. Any fix yet? |
|
Bluesuede
![]()
Joined: 2003-02-25
Posts: 14 |
![]() |
Hi I have exactly the same problem: Firefox shows the urls for Gallery with a \/ added in front of index.php eg: http://www.sitename.com/\/index.php?option=com_gallery etc etc And IE simply removes the domain name entirely. Odd...anyone come up with a solution yet? |
|
syn
Joined: 2005-03-10
Posts: 14 |
![]() |
some more things to try... if (isset($option)) { $GALLERY_MODULENAME = $option; $mamboDir = getcwd(); $GALLERY_EMBEDDED_INSIDE = 'mambo'; $GALLERY_EMBEDDED_INSIDE_TYPE = 'mambo'; to if (isset($option)) { $GALLERY_MODULENAME = $option; $mamboDir = (substr(PHP_OS, 0, 3) == 'WIN') ? strtolower(getcwd()) : getcwd();; $GALLERY_EMBEDDED_INSIDE = 'mambo'; $GALLERY_EMBEDDED_INSIDE_TYPE = 'mambo'; and in session.php if (empty($gallery->app->sessionVar)) { $gSessionVar = "gallery_session_" . md5(getcwd()); } else { $gSessionVar = $gallery->app->sessionVar . "_" . md5($gallery->app->userDir); } to if (empty($gallery->app->sessionVar)) { $gSessionVar = "gallery_session_" . md5((substr(PHP_OS, 0, 3) == 'WIN') ? strtolower(getcwd()) : getcwd()); } else { $gSessionVar = $gallery->app->sessionVar . "_" . md5($gallery->app->userDir); } let me know if that fixes things. |
|
brockster
Joined: 2005-04-21
Posts: 6 |
![]() |
Syn, |
|
kromm
Joined: 2005-04-21
Posts: 5 |
![]() |
@syn Removed the Gallery from Mambo. Installed Gallery into Mambo after the fix. Created a new link on the main menu to component 'Gallery'... No change.. If I knew which part of Mambo or the Gallery is responsible for creating the links, I could try and find a solution. So if somebody could point me in the right direction this would be much appreciated as well.. |
|
338LM
Joined: 2005-04-26
Posts: 1 |
![]() |
I have the exact same problem. I would love to get this working, please help! |
|
Bluesuede
![]()
Joined: 2003-02-25
Posts: 14 |
![]() |
Anyone able to help? |
|
kromm
Joined: 2005-04-21
Posts: 5 |
![]() |
I'm trying to figure this out myself, but my PHP skills are not that high so it will take some time.. There's also a thread for this at forum.mamboserver.com http://forum.mamboserver.com/showthread.php?t=40743 but no solution either... |
|
syn
Joined: 2005-03-10
Posts: 14 |
![]() |
well.. i can zip up my current gallery dir and up it to whomever wants it... |
|
blssdwlf
Joined: 2005-05-04
Posts: 2 |
![]() |
This is a possible fix. (This is for Gallery 1.5/Mambo 4.5.2.1 using the contrib/mambo component on Windows 2k/Apache 2/PHP 4.3.11) Look in your init.php file in your gallery directory. Starting line 368 you should see: if (!empty($gallery->session->mambo)) { $mosConfig_host = $gallery->session->mambo->mosConfig_host; $mosConfig_user = $gallery->session->mambo->mosConfig_user; $mosConfig_password = $gallery->session->mambo->mosConfig_password; $mosConfig_db = $gallery->session->mambo->mosConfig_db; $mosConfig_dbprefix = $gallery->session->mambo->mosConfig_dbprefix; $MOS_GALLERY_PARAMS = $gallery->session->mambo->MOS_GALLERY_PARAMS; add $gallery->session->mambo->mosRoot = dirname($_SERVER['PHP_SELF']); before } elseif (!empty($mosConfig_db)) { $gallery->session->mambo->mosRoot = dirname($_SERVER['PHP_SELF']); if (substr($gallery->session->mambo->mosRoot, -1) != '/') { $gallery->session->mambo->mosRoot .= '/'; } Somehow the mosroot variable wasn't getting set and ended up with a \ which threw off the makeGalleryUrl function in url.php Fun tracing through Hope that works for others that might be having this problem. |
|
blssdwlf
Joined: 2005-05-04
Posts: 2 |
![]() |
Ok, upon further testing, the above fix works for IE but not Firefox. Not entirely sure if thats because of dirname()'s behavior was changed recently to have \ on windows platforms... soo here is a fix for that: In the same file, replace the added line: $gallery->session->mambo->mosRoot = dirname($_SERVER['PHP_SELF']); with $gallery->session->mambo->mosRoot = str_replace("\\","/",dirname($_SERVER['PHP_SELF'])); there is also an identical line below it in the elseif code block - feel free to replace that one too. |
|
Bluesuede
![]()
Joined: 2003-02-25
Posts: 14 |
![]() |
Many thanks - I'll give it a try later on and let you know how it turns out! :D |
|
Bluesuede
![]()
Joined: 2003-02-25
Posts: 14 |
![]() |
Fantastic! Thanks a bunch - it worked like a charm - my gallery component now works properly in both Firefox and IE :D |
|
kromm
Joined: 2005-04-21
Posts: 5 |
![]() |
Yahooooooooo..... I feel like wanting to run around the room for a mile or two with my hands in the air... This is absolutely great... the long awaited solution... Thank you thank you thank you, blssdwlf You made my day... !!! And thank you Bluesuede for adding a link to this solution at forum.mamboserver.com |
|
brockster
Joined: 2005-04-21
Posts: 6 |
![]() |
Thank's blssdwlf, it worked |
|
albrown
Joined: 2005-07-11
Posts: 4 |
![]() |
I have noticed the same problem and I am linking to another thread that has more information. For me this did not totally resolve the problem and it does not address the same problem for the random imgae block producing the same problem. http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=152338#152338 From that thread: albrown wrote:
I applied the patch and all seemed well at that time. A few hours later I was checking some things out using firefox (my normal browser) and the "\" was back. As an experiment I tried the site with IE and the URL was ok. I couldn't believe it but I could see it both were on the screen at the same time. Pages generated within a second or so of each other. A short while later it is back to being right in firefox again and IE was still ok. Since while looking into this on ocassion I have seen it do "//\" only on firefox. Any help appreciated. |
|
pine
Joined: 2004-11-14
Posts: 2 |
![]() |
I have the same problem also with random block like albrown said. i put this code: $gallery->session->mambo->mosRoot = str_replace("\\","/",dirname($_SERVER['PHP_SELF'])); before the if statement and now it works for everything, even for random block. I also didn't notice any other problems with that. so it work's for me :wink: |
|
maximus007
Joined: 2004-10-08
Posts: 6 |
![]() |
thanks for the help, this worked You should make sure this is added into 1.51 |
|