[SOLVED] wrong paths/URLs - conflicting with superfish menu?

Discussion regarding Joomla! 1.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
colorado2rein
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Feb 08, 2009 5:13 am
Location: Lafayette, CO USA

[SOLVED] wrong paths/URLs - conflicting with superfish menu?

Post by colorado2rein » Sat Mar 21, 2009 10:23 pm

Thanks in advance for help asap! I'm not entirely sure which board this belongs under, but I believe it's a Joomla issue. I searched but could not seem to describe it well as I didn't get any results. I see the error on IE7 and FF, the main browsers I currently test in.

This is my first Joomla site, and I'm not a programmer. I paid someone to install the superfish menu you see here: http://www.downthefence.net. It's at the top and bottom of the page. About 70% of the time it works well. BUT lots of times it doesn't; I uploaded a screenshot in FF and IE (top and bottom menus, which are duplicates here, please take a look: jenniferleiker.com/crazymenu.html

This morning when I got the error I made note of the URLs that were generated as I browsed the site when the big ugly menu issues were visible. Note that this only lasted about three minutes; after that it was fine. I originally thought it was a jQuery issue and posted over there. I'm now thinking that it's more a joomla x extension issue or something about the way/order the page is loaded in that causes the errors. Here is a typical URLS when it's messed up:

http://www.downthefence.net/index.php/m ... Itemid=191

Now, what's key here is that obviously there can be no folder named modules IN or UNDER the index.php file! So something about the paths is wonky, however the superfish menu is ALWAYS involved in the messed up paths.

Does that help diagnose at all?

I think this is part of the issue, but not all: it always loads/flashes vertically, then pops up horizontally where it should be. I think this is addressed here: http://www.learningjquery.com/2008/10/1 ... t#more-105 but I don't know enough to follow the steps even. If I were confident at all in jquery I would have done it... I'm just a little freaked out when it does not even refer to certain files in the article, just assumes you know what you're doing. And obviously I don't! :(

PLEASE, please please help, it's driving me nuts. The original programmer does not speak or understand English well and does not see a problem. Look at the screenshots - it is!
Last edited by colorado2rein on Mon Mar 23, 2009 6:50 am, edited 1 time in total.

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by kenmcd » Sun Mar 22, 2009 6:16 am

.
There are errors in how this menu is set-up.

Links have a double index.php
h##p://www.downthefence.net/index.php/index.php?option=com_content&view=section&id=5&Itemid=64

In your underlying page code I can see things such as:
h##p://www.downthefence.net/index.php"><img src="/templates/DownTheFence_Ver15/images/logo.png"
and
h##p://downthefence.net/index.php/modules/mod_superfishmenu/tmpl/js/jquery.js

Two issues with these:
First, the /index.php/ should not be there at all unless you have enabled SEF features, and this does not appear to be the case.
Second, everything should either be with www. or without it.
No mix and match or there will be problems.
It appears both have been used in various places.

- Check the menu set-up.
- Check your live_site setting in your Joomla configuration.php file.
- Make sure all Joomla SEF features are Off in Global Configuration > Site > SEO Settings
██ LibreTraining

colorado2rein
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Feb 08, 2009 5:13 am
Location: Lafayette, CO USA

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by colorado2rein » Mon Mar 23, 2009 2:50 am

Thank you, Ken! I will look into it right away. Much appreciated and I will post back.

colorado2rein
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Feb 08, 2009 5:13 am
Location: Lafayette, CO USA

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by colorado2rein » Mon Mar 23, 2009 3:14 am

Ken,

I did the following things, listed backward from your list.

1. In my global configuration, the SEO setting of 'Use Apache mod_rewrite' was set to 'Yes' while the others were set to 'No'. The icon said that the htaccess.txt file should be changed to .htaccess if it was set to yes; mine was not. I left the htaccess.txt file alone and switched the Apache setting to 'No'.

2. My configuration file has no value at all in the live_site setting... is that what I want?

3. Check the menu set up how, exactly? Which files? The only spot that looked like suspect to me (not knowing php) in the mod_superfishmenu folder was this section in the helper.php file:

// Menu Link is a special type that is a link to another item
if ($item->type == 'menulink')
{
$menu = &JSite::getMenu();
if ($newItem = $menu->getItem($item->query['Itemid'])) {
$tmp = clone($newItem);
$tmp->name = '<span><![CDATA['.$item->name.']]></span>';
$tmp->mid = $item->id;
$tmp->parent = $item->parent;
} else {
return false;
}
} else {
$tmp = clone($item);
$tmp->name = '<span><![CDATA['.$item->name.']]></span>';
}

$iParams = new JParameter($tmp->params);
if ($params->get('menu_images') && $iParams->get('menu_image') && $iParams->get('menu_image') != -1) {
$image = '<img src="'.JURI::base(true).'/images/stories/'.$iParams->get('menu_image').'" alt="'.$item->alias.'" />';
if($tmp->ionly){
$tmp->name = null;
}
} else {
$image = null;
}
switch ($tmp->type)
{
case 'separator' :
return '<span class="separator">'.$image.$tmp->name.'</span>';
break;

case 'url' :
if ((strpos($tmp->link, 'index.php?') === 0) && (strpos($tmp->link, 'Itemid=') === false)) {
$tmp->url = $tmp->link.'&Itemid='.$tmp->id;
} else {
$tmp->url = $tmp->link;
}
break;

default :
$router = JSite::getRouter();
$tmp->url = $router->getMode() == JROUTER_MODE_SEF ? 'index.php?Itemid='.$tmp->id : $tmp->link.'&Itemid='.$tmp->id;
break;
}

Is something in there causing my issues? Or did you mean in one of the .js files, which I don't know how to open, :( let alone modify.

The logo code in my template file was h##p://www.downthefence.net/index.php. I changed it to h##p://downthefence.net. Is this correct?

Thanks SO much for your help!

colorado2rein
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Feb 08, 2009 5:13 am
Location: Lafayette, CO USA

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by colorado2rein » Mon Mar 23, 2009 3:17 am

I'm not sure if it's coincidence or not, but my menu is appearing broken again, since I just did the changes mentioned (#1) in the last post. Should I switch back to Apache mod_rewrite and change the htaccess.txt to .htaccess? *bites nails*

colorado2rein
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Feb 08, 2009 5:13 am
Location: Lafayette, CO USA

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by colorado2rein » Mon Mar 23, 2009 3:44 am

Okay, some more stuff:

I opened and looked at all the .js files in Notepad and it doesn't seem like anything in there is relevant - but that's not knowing much about it.

I did plan to do SEF, but I had so much going on I was going to wait until the end before worrying about it. Was that the wrong approach and I should have tackled that from the beginning? So if my fix is in disabling (or keeping disabled, rather) the SEO settings, is that really what I want?

Again, I very much appreciate the help, and hopefully this would help someone else down the road. I can't tell you how much time these forums have helped me just in reading threads.

Jenn

colorado2rein
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Feb 08, 2009 5:13 am
Location: Lafayette, CO USA

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by colorado2rein » Mon Mar 23, 2009 3:56 am

Okay, now it looks like I'm spamming my own thread. To correct what I wrote above about the .htaccess file; I missed seeing that it was in fact in my root directory, along with the htaccess.txt file I referred to. Don't know if that's relevant.

Can you tell I'm desperate?

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by kenmcd » Mon Mar 23, 2009 4:20 am

.
I accessed the site via www.downthefence.net
Now your top and bottom menus work for me - before they did not work at all.

When working on your site be sure to turn-off all caches.

Also be sure to clear your browser cache after you have made changes.
Stuff left in your browser cache can cause unexpected behavior.
I am in the habit of always using <Control>+<F5> which forces a full page refresh.

I clicked around for awhile and everything seems to be working properly now.
:)


(com_hobi2 - that's funny)

.
██ LibreTraining

colorado2rein
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Feb 08, 2009 5:13 am
Location: Lafayette, CO USA

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by colorado2rein » Mon Mar 23, 2009 5:07 am

Whew! Well, I hope that's it then. All I did was switch off the Apache mod_rewrite SEO setting in Global Configuration and -yes- once I turned off my cache and Ctrl+F5 everything was well. I do hit Ctrl+F5 often but I had NOT turned off my cache in Joomla. Thank you!

I really hope that's all there was to it - the menu seems to be loading MUCH faster now as well.

So now that I have your attention - what should I do about the SEF thing, since it looks like I need to turn the core Joomla functionality for that off? Can you recommend the best third party extension for it? I use SOBI2 (obviously - plus two clones of it... don't forget frobi!) as well as jFusion, phpBB3, etc, etc. ad nauseum.

Thanks SO much, Ken (Joomla hero indeed).

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by kenmcd » Mon Mar 23, 2009 6:06 am

.
Always have all SEF Off when working on your site - or you will make yourself crazy.
It adds another potential level of error which breaks other things.
Make sure everything works without SEF first.
This removes the SEF issues while you develop your entire site.
Then deal with the SEF issues last after everything else is already working.

Caches Off.
SEF Off.
While building your site.

I would not enable any SEF until you do some more research and education.
And you test thoroughly on your local testing website.
See discussion about using sh404SEF with SOBI2 here:
http://www.sigsiu.net/forum/index.php/t ... 200.0.html
Hopefully you have learned your lesson on this. ;)

Also:
You need a pathway/breadcrumbs on your site SOBI2 pages.
Do not see pathway on com_sobi2 pages or com_hobi2.
SOBI2 does not have page content titles in categories - a usability 101 defect which confuses users.
So users get lost in SOBI2 directories rather easily.
Only workaround without hacking code is to fallback on the breadcrumbs.
Maybe you just overlooked enabling the Breadcrumbs module on those component links.


Like your site. Looks nice.

.
██ LibreTraining

colorado2rein
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Sun Feb 08, 2009 5:13 am
Location: Lafayette, CO USA

Re: Joomla generate wrong paths/URLs - conflicting with menu?

Post by colorado2rein » Mon Mar 23, 2009 6:37 am

Yes! I was thinking the same thing on the breadcrumbs! I just enabled them. I do think it's VERY easy to get lost in SOBI without them and we sure don't want that.

Thanks for the clear direction/warning on the SEF - it was my hunch to wait until the end (I'm not sure how I even set that Apache setting) and I'm glad that was correct. So I've definitely learned my lesson on Cache OFF SEF OFF for Joomla - thank you!

And thanks on the compliment. This site definitely represents a lot of man... er - woman hours so far and many more left.

Next up: WordPress MU integration! (Followed by world domination, of course!) ;-)

dtempleton
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Jun 02, 2010 5:26 pm

Re: [SOLVED] wrong paths/URLs - conflicting with superfish m

Post by dtempleton » Wed Jun 02, 2010 5:31 pm

Sorry to resurrect an old thread, but I was having a similar problem and solved it differently.

I was getting url's from the main menu that looked like h##P://site.com/index.php/page1 which would deliver the page content without the template. At times I even gor h##P://site.com/index.php/index.php when following the menu back to the home page.

My cure was to go to Global configuration:site"SEO settings and turn *off* "search engine friendly URLs. I had selected this because it seemed the right thing to do.

the other two settings in SEO are also off and were before.

Thanks for this thread that pointed me in the right direction.

Dennis


Locked

Return to “Performance - Joomla! 1.5”