Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-09-05 06:08:28
- silashundt
- New Member
- Registered: 2006-09-05
- Posts: 3
anchor link quandry leads to safari bug?
Greetings,
I am transfering a hand-coded site over to textpattern, and am trying to replicate the anchor-link bahavior here (http://driftlessfolkschool.org/participants/ and http://driftlessfolkschool.org/courses)
Now, the way I have it set up in textpattern (not anywhere on line yet, sorry) is with each one of the old pages as an article in a section. This seems logical.
The issue is, no matter what way I tinker with the anchor links, (currently using the “a name” method, I can’t get them to actually go to that spot on the page. Until I realized that it seems to be due to a safari (v2.0.4 (419.3)) bug that it is not working.
In fact, it seems that in this scenario (indexing to articles against each other through anchor links in textpattern) causes safari to severely wank out. It started throughing in extra characters, ect.
here is some more code to show what I have done. If anyone can point out obvious dumb things, that would be nice: (all of the corresponding a name=”” values have been checked, and work properly)
a href=”../courses/3/#herbs-part-one […] > (worked in gecko browsers, only loaded the courses page in safari)
a href=”http://localhost:8888/courses/3/#herbs-part-one […] > result: ditto
a href=”http://localhost:8888/courses/#herbs-part-one […] > result: ditto
a href=”http://localhost:8888/courses#herbs-part-one […] > result: ditto
any txp tag magic might help?
thanks in advance,
-sjh
Offline
Re: anchor link quandry leads to safari bug?
Does this help ?
~Nick
Offline
#3 2006-09-05 07:22:58
- silashundt
- New Member
- Registered: 2006-09-05
- Posts: 3
Re: anchor link quandry leads to safari bug?
These may be part of the problem, but my cursory trial and error with that solution did not show any indication of the problem budging. Plus, my code already includes a closely wrapped div element.
<code>
<div class=“section”>
<h3><a name=“blacksmithing”>Blacksmithing</a></h3>
[…]
</div>
</code>
there are larger div elements that these sections are contained in, which I will diddle with next.
Thanks for the quick response,
-sjh
Offline
Re: anchor link quandry leads to safari bug?
While I don’t have access to Safari, why don’t you try using an ID instead? EX:
<code>
<h3 id=“blacksmithing”>Blacksmithing</h3>
</code>
is the same as
<code>
<h3><a name=“blacksmithing”>Blacksmithing</a></h3>
</code>
Alternatively, you could add the ID to the div instead of the h3.
Last edited by deldindesign (2006-09-05 07:39:13)
Offline
#5 2006-09-06 03:16:38
- christopher.stumm
- New Member
- Registered: 2006-09-06
- Posts: 2
Re: anchor link quandry leads to safari bug?
I’ve run into the same problem myself. I’ve tried setting both, id, name, etc. to see if the anchor would work and still no success. I looked at that article myself – seems to be high on the google ranks – and it did not help one bit unfortunately. Mine doesn’t budge. I looked at other sites, to see if what I was doing was wrong, and I couldn’t find a problem.
Offline
#6 2006-09-07 18:46:55
- christopher.stumm
- New Member
- Registered: 2006-09-06
- Posts: 2
Re: anchor link quandry leads to safari bug?
Here is a prime example of a situation where it doesn’t work in safari:
http://www.openbrackets.com/
click on the “comments” link and you’ll see instead of being opened where the comments start, it sits at the top. I noticed that if the link is on the same page as the anchor, it seems to work fine.
Offline
#7 2006-09-07 21:42:45
- silashundt
- New Member
- Registered: 2006-09-05
- Posts: 3
Re: anchor link quandry leads to safari bug?
exactly.
Offline
#8 2007-02-11 12:58:01
- monkeynotes
- Member
- From: UK
- Registered: 2005-04-13
- Posts: 41
Re: anchor link quandry leads to safari bug?
I am experiencing the same problems with my site. What I have so far found is that Safari requires the <a> to be a named anchor; for example your anchor should look like this: <a name="comment"></a>, however for some reason even this does not always work. I have seen it work here: http://mac.7motion.com/software.php#webdev But I cannot make it work on my site, I really cannot figure out what I am doing wrong. Clicking on a link within the page to jump to the anchor works, but using just the URL method does not. I welcome any ideas on this.
Edit: Strangely anchor links in this forum work in Safari and they only link to ids in divs. Try this link in Safari: http://forum.textpattern.com/viewtopic.php?pid=140084#p140084
Last edited by monkeynotes (2007-02-11 13:21:25)
Offline