Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 6:31 am (All times are UTC )

 




Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
Posted: Sun Jun 18, 2006 6:37 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Apr 03, 2006 12:52 am
Posts: 18
The anchor is not within content, it's in my template, in the footer.


Top
   
 
Posted: Mon Jun 19, 2006 5:17 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Dec 29, 2005 2:01 pm
Posts: 18
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.


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:_.-]*"

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.

Top
   
 
Posted: Mon Jun 19, 2006 7:04 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Apr 03, 2006 12:52 am
Posts: 18
havshoei wrote:
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.


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:_.-]*"

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';



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".

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.


Top
   
 
Posted: Mon Jun 19, 2006 7:17 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Apr 03, 2006 12:52 am
Posts: 18
Anyways,

I give up. I am ripping the anchor out of this site, and unsubscribing from this thread.


Top
   
 
Posted: Mon Jun 19, 2006 11:33 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Aug 29, 2005 7:59 pm
Posts: 104
stingrey wrote:
The modified /mambots/content/mossef.php file in SVN attached.



I can confirm that this fix works for me, using 404SEF. Thanks a lot, this was a nasty bug!!!

_________________
* "The philosophers have only interpreted the world; the point is to change it." (Karl Marx) http://www.marxist.com
* "I am convinced that the way to build a new and better world is not capitalism. Capitalism leads us straight to hell."
(Hugo Chavez) http://www.handsoffvenezuela.org


Top
  E-mail  
 
Posted: Mon Jun 19, 2006 1:13 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 7:55 pm
Posts: 104
Location: Maine
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:
Code:
<a href="#program">The Program</a><br />
<a href="#schedule">Program Schedule</a><br />


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?

_________________
Think for yourself, question authority.


Top
  E-mail  
 
Posted: Mon Jun 19, 2006 3:19 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Mon Aug 15, 2005 4:36 pm
Posts: 2399
Location: Marikina, Metro Manila, Philippines
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?

What happens if you use Core SEF.

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.

_________________
God grant me the Serenity to Accept the things I cannot change, the Courage to change the things I can and the Wisdom to know the Difference.


Top
  E-mail  
 
Posted: Tue Jun 20, 2006 2:08 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Aug 18, 2005 7:55 pm
Posts: 104
Location: Maine
stingrey wrote:
What happens if you use Core SEF.


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.

Thanks for your help, I'll contact Emir.

_________________
Think for yourself, question authority.


Top
  E-mail  
 
Posted: Tue Jun 20, 2006 2:14 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Jan 28, 2006 12:00 am
Posts: 334
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.

_________________
http://www.castus.co.uk


Top
  E-mail  
 
Posted: Tue Jun 20, 2006 2:30 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Sat Sep 10, 2005 10:31 pm
Posts: 823
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.


Hi castus,

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


Top
   
 
Posted: Tue Jun 20, 2006 3:36 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Jan 28, 2006 12:00 am
Posts: 334
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.

_________________
http://www.castus.co.uk


Top
  E-mail  
 
Posted: Mon Jun 26, 2006 12:25 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Jan 28, 2006 12:00 am
Posts: 334
Has anyone looked into this further?

_________________
http://www.castus.co.uk


Top
  E-mail  
 
Posted: Mon Jun 26, 2006 12:44 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Mon Aug 15, 2005 4:36 pm
Posts: 2399
Location: Marikina, Metro Manila, Philippines
castus wrote:
Has anyone looked into this further?

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.

Please start a new thread in the `Joomla! 1.0.x_Q&T` forum to ensure that we can followup on this issue.

_________________
God grant me the Serenity to Accept the things I cannot change, the Courage to change the things I can and the Wisdom to know the Difference.


Top
  E-mail  
 
Posted: Mon Jun 26, 2006 12:55 pm 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Jan 28, 2006 12:00 am
Posts: 334
Ok, thanks.

_________________
http://www.castus.co.uk


Top
  E-mail  
 
Posted: Tue Jun 27, 2006 12:54 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Mar 16, 2006 12:47 am
Posts: 45
Great Fix Stingrey,

Thanks for your efforts!

Cheers, works PERFECT!


Top
  E-mail  
 
Posted: Mon Jul 10, 2006 4:07 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Jan 12, 2006 9:10 pm
Posts: 99
Location: Lake Michigan
can anyone confirm that this new file works with 1.0.10?


thanks


Top
  E-mail  
 
Posted: Mon Jul 10, 2006 4:08 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Aug 29, 2005 7:59 pm
Posts: 104
Yes it works for me.

_________________
* "The philosophers have only interpreted the world; the point is to change it." (Karl Marx) http://www.marxist.com
* "I am convinced that the way to build a new and better world is not capitalism. Capitalism leads us straight to hell."
(Hugo Chavez) http://www.handsoffvenezuela.org


Top
  E-mail  
 
Posted: Mon Jul 10, 2006 4:12 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Jan 12, 2006 9:10 pm
Posts: 99
Location: Lake Michigan
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


Top
  E-mail  
 
Posted: Mon Jul 10, 2006 4:27 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Mon Aug 29, 2005 7:59 pm
Posts: 104
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...

_________________
* "The philosophers have only interpreted the world; the point is to change it." (Karl Marx) http://www.marxist.com
* "I am convinced that the way to build a new and better world is not capitalism. Capitalism leads us straight to hell."
(Hugo Chavez) http://www.handsoffvenezuela.org


Top
  E-mail  
 
Posted: Mon Jul 10, 2006 4:49 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Jan 12, 2006 9:10 pm
Posts: 99
Location: Lake Michigan
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


Top
  E-mail  
 
Posted: Tue Jul 11, 2006 7:12 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Tue Jul 11, 2006 6:43 am
Posts: 2
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.


Last edited by mont on Tue Jul 11, 2006 7:15 am, edited 1 time in total.

Top
   
 
Posted: Thu Aug 17, 2006 7:01 am 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Thu Mar 02, 2006 3:27 am
Posts: 109
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?


Top
  E-mail  
 
Posted: Sun Oct 08, 2006 3:10 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Oct 05, 2006 6:54 pm
Posts: 9
Thanks stingrey, to me the anchor navigation works fine with modified mossef, 404SEF and accessible Joomla 1.0.11a. Finally!


Top
   
 
Posted: Mon Oct 16, 2006 5:13 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Sep 19, 2006 2:31 pm
Posts: 5
Has anyone found a fix for this yet?  I tried installing the fix above (mossef.php) and it did not work either.


Top
  E-mail  
 
Posted: Tue Oct 24, 2006 8:15 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Feb 06, 2006 3:46 am
Posts: 22
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.


Top
   
 
Posted: Tue Oct 24, 2006 3:39 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Sep 19, 2006 2:31 pm
Posts: 5
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?


Top
  E-mail  
 
Posted: Mon Oct 30, 2006 9:49 pm 
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 12:21 pm
Posts: 2742
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?

_________________
"The Mambot Creator" - MultiThumb, Mosif, Htmlfix, MosHide...
http://kreacom.dk/mambot


Top
  E-mail  
 
Posted: Mon Oct 30, 2006 10:01 pm 
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 12:21 pm
Posts: 2742
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  :(

_________________
"The Mambot Creator" - MultiThumb, Mosif, Htmlfix, MosHide...
http://kreacom.dk/mambot


Top
  E-mail  
 
Posted: Tue Oct 31, 2006 6:25 am 
User avatar
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Jan 28, 2006 12:00 am
Posts: 334
Does adding the following into your template work?

Code:
<?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>

_________________
http://www.castus.co.uk


Top
  E-mail  
 
Posted: Tue Oct 31, 2006 7:58 am 
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 18, 2005 12:21 pm
Posts: 2742
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.

_________________
"The Mambot Creator" - MultiThumb, Mosif, Htmlfix, MosHide...
http://kreacom.dk/mambot


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 posts ]  Go to page Previous  1, 2, 3  Next

Quick reply

 



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group