Anchors won't work

Permalink
Does anyone know what to do if the anchors does not work. even after it is linked properly.

 
agedman replied on at Permalink Reply
agedman
Is this an anchor in a content block? Is it using an absolute url or a link to a page in the site? -- or is it a link to a file? Do you have pretty urls enabled? Is this happening on a public site? If so, it would be helpful if you could post the url. If not, what does your browser show in the status bar when you hover over the link?
byubusin replied on at Permalink Reply
The url ishttp://www.byubusinessphd.net/Programs/index.php?cID=97...

I have a hyperlink and anchor within the same block. (title headers) I noticed that when an anchor is created and linked that it keeps it active only long enough to create the hyperlink. But when everything is saved and published the anchor disappears if you want to go edit it. I believe Pretty urls is enabled, but I'll have to check.
agedman replied on at Permalink Reply
agedman
Pretty urls shouldn't matter. I misunderstood your question -- sorry.

So you're saying that when you insert an anchor in the content block and then switch to html view in the editor, you see the anchor show up looking something like this: <a name="OB"></a> but it's not getting saved when you publish? -- weird! I looked through the source of your page and didn't see any anchors.

I can't reproduce this problem on my installation. Are you running version 5.4.0.5? It's possible that this posthttp://www.concrete5.org/community/forums/usage/anchor-links-to-ano... might give you some other things to check (such as running your page through a validator), though I don't think the bug discussed there could be affecting your page.

edit: When I ran the validator on your page, it found an unescaped ampersand in the text (Q&A) of this link:
<a href="/Programs/phd-prep/"> PhD Q&A</a>
I wonder if that could have anything to do with the problem.

edit: When I type "Q&A" in the text of a link in the wysiwyg, TinyMCE is correctly escaping it so that the source of the page becomes something like
<a href="url">Q&amp;A</a>
-- so I wonder how the unescaped ampersand ended up in your source... I'm using a Content block. I assume that's what you're using too.