[FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
-
- Joomla! Apprentice
- Posts: 18
- Joined: Mon Apr 03, 2006 12:52 am
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
The anchor is not within content, it's in my template, in the footer.
-
- Joomla! Apprentice
- Posts: 18
- Joined: Thu Dec 29, 2005 2:01 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Please note that core SEF only handels anchors that comply with HTML 4, that means only strings matching the pattern "[A-Za-z][A-Za-z0-9:_.-]*"danimal wrote: I installed the fix and it still doesn't work. with core joomla sef or open sef.
i believe this had to do with anchors within content items. my problem is all my anchors redirect me to the home page. they will work on the home page though.
A link as [href="#5"] pointing to an anchor [] do not match this pattern as it do not start with a letter "A-Za-z" (upper- or lower case letter in the range A to Z), it starts with a digit.
Change your anchors to comply with the above (e.g. "a5") then it should work.
[added]
I my templete file i do this:
// Page URI
$temp = split('index.php', $_SERVER['REQUEST_URI']);
$link = sefRelToAbs('index.php' . @ $temp[1]);
$head_link = $link . '#to_top';
Last edited by havshoei on Mon Jun 19, 2006 5:27 am, edited 1 time in total.
-
- Joomla! Apprentice
- Posts: 18
- Joined: Mon Apr 03, 2006 12:52 am
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
You are referring to the site i had posted above, the site is currently now on their server and the anchor in question follow the rules, it is called "top".havshoei wrote:Please note that core SEF only handels anchors that comply with HTML 4, that means only strings matching the pattern "[A-Za-z][A-Za-z0-9:_.-]*"danimal wrote: I installed the fix and it still doesn't work. with core joomla sef or open sef.
i believe this had to do with anchors within content items. my problem is all my anchors redirect me to the home page. they will work on the home page though.
A link as [href="#5"] pointing to an anchor [] do not match this pattern as it do not start with a letter "A-Za-z" (upper- or lower case letter in the range A to Z), it starts with a digit.
Change your anchors to comply with the above (e.g. "a5") then it should work.
[added]
I my templete file i do this:
// Page URI
$temp = split('index.php', $_SERVER['REQUEST_URI']);
$link = sefRelToAbs('index.php' . @ $temp[1]);
$head_link = $link . '#to_top';
the anchors in the nav have been renamed as well to none numerical names
(the script i used as the starting point i found on the moo/fx forums had them named that way.)
I know how to use anchors, the problem is in joomla. If i turn off sef they work, if I turn them on they dont.
But please people, keep trying to poke holes in my code instead of looking at the real problem. Joomla!
It has been doing this since version 1.0.8. and i even had to toss a nav i made into an iframe to work around the problem in the last joomla site i did about 4 weeks ago.
-
- Joomla! Apprentice
- Posts: 18
- Joined: Mon Apr 03, 2006 12:52 am
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Anyways,
I give up. I am ripping the anchor out of this site, and unsubscribing from this thread.
I give up. I am ripping the anchor out of this site, and unsubscribing from this thread.
-
- Joomla! Enthusiast
- Posts: 109
- Joined: Mon Aug 29, 2005 7:59 pm
Re: [ NOT FIXED!!!] Links to anchor don't work after 1.0.7 to 1.0.9 update
I can confirm that this fix works for me, using 404SEF. Thanks a lot, this was a nasty bug!!!stingrey wrote: The modified /mambots/content/mossef.php file in SVN attached.
- eric
- Joomla! Enthusiast
- Posts: 107
- Joined: Thu Aug 18, 2005 7:55 pm
- Location: Maine
- Contact:
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Thanks for posting the fix.. although I'm still having some trouble. Maybe it has something to do with the fact that I'm using SEF Advance?
When I turn off SEF, the anchors work fine. When I turn on SEF, the anchors don't show in any of the links.
For example, if my page is located here
http://www.domain.com/thing1/thing2/document/
The HTML for the anchor links is written like this in the editor:
However the address that they link to are all the same (without the anchor as part of the link) like this:
http://www.domain.com/thing1/thing2/document/
Any ideas? suggestions?
When I turn off SEF, the anchors work fine. When I turn on SEF, the anchors don't show in any of the links.
For example, if my page is located here
http://www.domain.com/thing1/thing2/document/
The HTML for the anchor links is written like this in the editor:
Code: Select all
<a href="#program">The Program</a><br />
<a href="#schedule">Program Schedule</a><br />
http://www.domain.com/thing1/thing2/document/
Any ideas? suggestions?
Think for yourself, question authority.
- stingrey
- Joomla! Hero
- Posts: 2756
- Joined: Mon Aug 15, 2005 4:36 pm
- Location: Marikina, Metro Manila, Philippines
- Contact:
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
What happens if you use Core SEF.eric wrote: Thanks for posting the fix.. although I'm still having some trouble. Maybe it has something to do with the fact that I'm using SEF Advance?
If it works with Core SEF then it is more likely the problem may be in SEF Advance - but I have no way of testing this myself and if you believe it is an issue with SEF Advance you shoudl contact the developer.
Rey Gigataras
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me
Partner, Business Development & Project Manager, Event Manager, Sports Coach
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me
Partner, Business Development & Project Manager, Event Manager, Sports Coach
- eric
- Joomla! Enthusiast
- Posts: 107
- Joined: Thu Aug 18, 2005 7:55 pm
- Location: Maine
- Contact:
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
I set up a clean test install of Joomla with the sample data, created a new content item with anchors, and applied the fixed mossef.php file. Anchors worked fine with and without core SEF enabled.. I installed the latest version of SEF Advance and had the same problem as I described earlier.stingrey wrote:What happens if you use Core SEF.
Thanks for your help, I'll contact Emir.
Think for yourself, question authority.
-
- Joomla! Explorer
- Posts: 338
- Joined: Sat Jan 28, 2006 12:00 am
- Contact:
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Thanks for the bug fix it seems to have worked a treat for my content items. However like danimal says if it is in the template, then it doesn't work, as is the case with me.
I have a link in a menu which is for accessibility and skips the content for people using screen readers.
This link isn't working with the fix, and is showing as http://www.castus.co.uk/#content rather than showing the page that you're on with #content at the end.
I have a link in a menu which is for accessibility and skips the content for people using screen readers.
This link isn't working with the fix, and is showing as http://www.castus.co.uk/#content rather than showing the page that you're on with #content at the end.
-
- Joomla! Guru
- Posts: 842
- Joined: Sat Sep 10, 2005 10:31 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Hi castus,castus wrote: This link isn't working with the fix, and is showing as http://www.castus.co.uk/#content rather than showing the page that you're on with #content at the end.
could you please post the relevant code that prints out the anchor? Without knowing what exactly you do it is hard to find a bug
Best,
Enno
We may not be able to control the wind, but we can always adjust our sails
-
- Joomla! Explorer
- Posts: 338
- Joined: Sat Jan 28, 2006 12:00 am
- Contact:
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Umm well, as all of the above posters I had a problem with my anchors when using SEF.
Now since applying the patch that stingrey posted it is now fine again.
But when I set up a menu link (link/url) with #content in it, it doesn't work.
It goes to the site root/#anchor.
I hope this makes more sense and thanks for the help.
Now since applying the patch that stingrey posted it is now fine again.
But when I set up a menu link (link/url) with #content in it, it doesn't work.
It goes to the site root/#anchor.
I hope this makes more sense and thanks for the help.
-
- Joomla! Explorer
- Posts: 338
- Joined: Sat Jan 28, 2006 12:00 am
- Contact:
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Has anyone looked into this further?
- stingrey
- Joomla! Hero
- Posts: 2756
- Joined: Mon Aug 15, 2005 4:36 pm
- Location: Marikina, Metro Manila, Philippines
- Contact:
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Please note this issue has not been examined as it differed from teh original report of this thread and this thread is now in the 'Resolved' forum which means it is less visible to the team.castus wrote: Has anyone looked into this further?
Please start a new thread in the `Joomla! 1.0.x_Q&T` forum to ensure that we can followup on this issue.
Rey Gigataras
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me
Partner, Business Development & Project Manager, Event Manager, Sports Coach
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me
Partner, Business Development & Project Manager, Event Manager, Sports Coach
-
- Joomla! Explorer
- Posts: 338
- Joined: Sat Jan 28, 2006 12:00 am
- Contact:
- 72dpi
- Joomla! Intern
- Posts: 55
- Joined: Thu Mar 16, 2006 12:47 am
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Great Fix Stingrey,
Thanks for your efforts!
Cheers, works PERFECT!
Thanks for your efforts!
Cheers, works PERFECT!
- josey
- Joomla! Enthusiast
- Posts: 100
- Joined: Thu Jan 12, 2006 9:10 pm
- Location: Lake Michigan
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
can anyone confirm that this new file works with 1.0.10?
thanks
thanks
-
- Joomla! Enthusiast
- Posts: 109
- Joined: Mon Aug 29, 2005 7:59 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Yes it works for me.
- josey
- Joomla! Enthusiast
- Posts: 100
- Joined: Thu Jan 12, 2006 9:10 pm
- Location: Lake Michigan
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
cool, you're quick.
when i replaced the file, i just get redirected to the top of the page, however not to the home anymore. i'll try reestablishing my anchors. i am using sef advance, i don't think that sould affect anything though.
any suggestions appreciated
when i replaced the file, i just get redirected to the top of the page, however not to the home anymore. i'll try reestablishing my anchors. i am using sef advance, i don't think that sould affect anything though.
any suggestions appreciated
-
- Joomla! Enthusiast
- Posts: 109
- Joined: Mon Aug 29, 2005 7:59 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Make sure you have relative links and anchors. I use 404SEF and it works there. Are you doing a full upgrade to 1.10 or are you just trying to make the anchors work on an old version? You should update to 1.10 anyway...
- josey
- Joomla! Enthusiast
- Posts: 100
- Joined: Thu Jan 12, 2006 9:10 pm
- Location: Lake Michigan
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
i see now above that eric had conflicts when using sef advance too. i just pm him. but what do your relative links look like? index.php?option=com_content&task=view&id=1&Itemid=2
thanks
thanks
-
- Joomla! Fledgling
- Posts: 2
- Joined: Tue Jul 11, 2006 6:43 am
Should it work for 1.0.10?
I have just added the "patched" file to a clean install of 1.0.10 downloaded today, which is showing the same symptoms.
No success. I have unpublished the SEF mambot to solve the problem.
No success. I have unpublished the SEF mambot to solve the problem.
Last edited by mont on Tue Jul 11, 2006 7:15 am, edited 1 time in total.
-
- Joomla! Enthusiast
- Posts: 109
- Joined: Thu Mar 02, 2006 3:27 am
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
We are also still having the same problem even after applying the modified patch in /mambots/content/mossef.php.
Using J! 1.0.10, and 404SEF. I also tried with 404SEF turned off and still no luck.
What else could be the problem?
Using J! 1.0.10, and 404SEF. I also tried with 404SEF turned off and still no luck.
What else could be the problem?
-
- Joomla! Apprentice
- Posts: 9
- Joined: Thu Oct 05, 2006 6:54 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Thanks stingrey, to me the anchor navigation works fine with modified mossef, 404SEF and accessible Joomla 1.0.11a. Finally!
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Sep 19, 2006 2:31 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Has anyone found a fix for this yet? I tried installing the fix above (mossef.php) and it did not work either.
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Feb 06, 2006 3:46 am
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
From a quick look at my source code the problem was -- this creates a base for all links meaning anchors won't work. I don't know a fix for your specific problem, but if you download your source, remove this line, and throw in a browser, the anchors will then work fine... so that may be a starting point.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Sep 19, 2006 2:31 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Dan,
Thanks for the reply. Forgive me for being ignorant but what to you mean my "throw in a browser". Do you mean to define the browser (I.E.) in the code?
Thanks for the reply. Forgive me for being ignorant but what to you mean my "throw in a browser". Do you mean to define the browser (I.E.) in the code?
-
- Joomla! Hero
- Posts: 2747
- Joined: Thu Aug 18, 2005 12:21 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
I have the same problem. The fix included in this thread does not help. But Dan2 has put me in the right direction. There surely is a base href in the template, but not inserted by me!
It is inserted on line 193 in frontend.php. If I comment out the line, the anchors work perfectly.
Now I will se if it has any sideeffects.
Does anyone know if the base href is needed at all?
It is inserted on line 193 in frontend.php. If I comment out the line, the anchors work perfectly.
Now I will se if it has any sideeffects.
Does anyone know if the base href is needed at all?
"The Mambot Creator" - MultiThumb, Mosif, Htmlfix, MosHide...
http://kreacom.dk/mambot
http://kreacom.dk/mambot
-
- Joomla! Hero
- Posts: 2747
- Joined: Thu Aug 18, 2005 12:21 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Yes, it is very much needed!
SEF doesn't work if this line is removed. Get just garbled text.
Now, this is bad: with base href, anchors doesn't work. Without base href, nothing works.
Seems to be a major design flaw in the sef built into Joomla
SEF doesn't work if this line is removed. Get just garbled text.
Now, this is bad: with base href, anchors doesn't work. Without base href, nothing works.
Seems to be a major design flaw in the sef built into Joomla
"The Mambot Creator" - MultiThumb, Mosif, Htmlfix, MosHide...
http://kreacom.dk/mambot
http://kreacom.dk/mambot
-
- Joomla! Explorer
- Posts: 338
- Joined: Sat Jan 28, 2006 12:00 am
- Contact:
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
Does adding the following into your template work?
Code: Select all
<?php
// Page URI
$temp = split('index.php', $_SERVER['REQUEST_URI']);
$link = sefRelToAbs('index.php' . @ $temp[1]);
?>
<a href="<?php echo $link; ?>#content" class="caccess">Skip to Content</a>
-
- Joomla! Hero
- Posts: 2747
- Joined: Thu Aug 18, 2005 12:21 pm
Re: [FIXED] Links to anchor don't work after 1.0.7 to 1.0.9 update
No, unfortunately not. The anchor problem is all around, not just on the frontpage.
Besides, I have discovered that it gets even worse with JoomFish because the language specifation is added after the anchor, like
#anchor/lang,en_GB/
I don't want to spend more time on this, so I just disable SEF. Standard SEF isn't that useful anyway.
Besides, I have discovered that it gets even worse with JoomFish because the language specifation is added after the anchor, like
#anchor/lang,en_GB/
I don't want to spend more time on this, so I just disable SEF. Standard SEF isn't that useful anyway.
"The Mambot Creator" - MultiThumb, Mosif, Htmlfix, MosHide...
http://kreacom.dk/mambot
http://kreacom.dk/mambot