Need help? Check out our Support site, then


Anchor points keep disappearing

  1. My anchor points (for page jumps) keep disappearing. I created a page http://morewarmth.wordpress.com/insurance/ with a table of contents at the top, and lots of anchor points to jump to in the body. I tested these extensively, and they worked fine. Today, I realized they were no longer working. I edited the page in "text mode" and all the anchor points were gone. I added two back in, including at the top. I did an "Update", looked, and the anchor points were gone. What's going on? Thanks!
    Blog url: http://morewarmth.wordpress.com/

  2. I can now easily reproduce this problem: In WordPress.com, I edit the page http://morewarmth.wordpress.com/insurance/

    I switch to "Text" mode and, at the beginning of the page, enter this:

    I switch to "Visual" mode, then immediately switch back to "Text" mode. The new text has disappeared.

    What am I doing wrong? How can I get my anchor points back in the page, and keep them there? Thanks!

  3. [Great, the text even disappears in this forum. OK, I'll that again, using the backtick character.]

    I can now easily reproduce this problem: In WordPress.com, I edit the page http://morewarmth.wordpress.com/insurance/

    I switch to "Text" mode and, at the beginning of the page, enter this:

    <a name="top"></a>

    I switch to "Visual" mode, then immediately switch back to "Text" mode. The new text has disappeared.

    What am I doing wrong? How can I get my anchor points back in the page, and keep them there? Thanks!

  4. I have the exact same problem! I hope someone posts a solution. I'm searching online as well.

  5. I am having this problem as well.

  6. I am having the exact same problem:
    http://en.forums.wordpress.com/topic/new-and-existing-anchor-points-keep-disappearing

    Switching to the Visual editor strips the "name" attribute from the <a> HTML tag. So <a name="jumphere">Here</a> becomes <a>Here</a>.

    I think I've found the solution. The "name" attribute is not supported in HTML 5. Instead of "name" use the "id" attributes. It's a pity that WordPress HTML validation code just removed "name" instead of replacing it with "id".
    Use <a id="jumphere">Here</a> instead of <a name="jumphere">Here</a>.

  7. nleviatan: Changing from "name" to "id" fixed everything! Thanks so much!

    This has been a frustrating experience with WordPress. "name" worked until recently. Apparently, they changed to "id" and silently broke a bunch of pages. As you point out, they could easily have changed "name" to "id" automatically.

    Even worse, the online documentation, last updated in August 2012, still gives the wrong information (tells you to use "name")!:

    http://en.support.wordpress.com/splitting-content/page-jumps/

    At the least, the documentation should be updated.

    Thanks again!

  8. Dear everybody, see also the discussion in the topic: http://en.forums.wordpress.com/topic/new-and-existing-anchor-points-keep-disappearing
    I think it is a new WP bug or a secret change of algorithms. It seems that many of us has this problem nowadays in 4 new topics about anchors and page jumps.

  9. nleviatan's fix worked for me as well. Thanks!

  10. Sorry for my previous reply - nleviatan is right.

  11. Howdy all,

    Sorry about this - we are aware of the issue, and are investigating it. We didn't deprecate anything, it's just a bug. I'll update this thread once I know anything further.

  12. I am having the same problem using the "name" attribute. After reading this discussion, I thought using "id" would solve the problem, but that is not working for me, either. When I switch to visual from text, WP is wiping out even my code.

    Please help! We use this feature a lot, and several of our pages don't make sense without anchors!

  13. I suggest you read what Staff said immediately above your own post into this thread.

    I'll update this thread once I know anything further. http://en.forums.wordpress.com/topic/anchor-points-keep-disappearing?replies=14#post-1040200

  14. I understand very little about html, have always used Panos's tips for "jumps" to other pts. in a post by copying his code verbatim.
    Now I have been banging my head in frustration for two days or more at having to redo all my "jumps" before finally figuring out that they break every time I edit a post.

    It all works again after I laboriously reinstall the destination html (still using the same code panos provided)---until the next time I do an edit. What's weird is it's only the jumps within a post that break. Jumps from one post to a section in another post still work even after I edit...

  15. For super admins it does work! It probably has to do with the user roles?

  16. @platt85, does your fix (nleviatan's fix?) 'stick' even after you edit the post again? And does it "stick" if you edit both in text and in visual mode?

  17. I meant, either in text or in visual mode..

  18. @ingridcc, no i didn't fix anything. I just noticed that I'm the Super Admin in my wpmu install and everything works fine. But one of my coworkers had this problem, and setting him to a Super Admin too, he can now add the ID attribute and it doesn't disappear

  19. technologyofcopyright
    Member

    I found something interesting that may help to find the bug.

    It behaves differently if you put <a id="yournamehere"></a> in as a top level tag vs. embedding the tag inside another tag. In the former case, the editor keeps the tag at first but then removes it the second time you switch to Visual mode (or save the page). In the latter case, it keeps the tag and works fine.

  20. Thanks for figuring this out nleviatan!

  21. Ok using the "id" instead of "name does not work for me completely. The code still disappears when I go back to the Text editor after going to the Visual editor. :( Any ideas?

  22. Thanks for reporting that, spohrte, it saves me the trouble of going in to all my jumps and redoing them...I really wasn't eager to do that.

    My own solution is that I have just been carefully avoiding doing any editing in the visual editor. If I only edit in the text editor, there are no problems.
    By the way there is a non-css way to get a much more readable font for your text editor, through an awesome "greasemonkey" workaround that Airodyssey (from these forums) created:
    http://userscripts.org/scripts/show/104072
    Makes the text editor actually readable instead of an illegible jumble.

  23. Thanks for the tip ingridcc. I will also have to avoid using the Visual editor for the time being which is not optimal but you gotta go what you gotta do, right? Hopefully it will get fixed soon.

  24. Following the discovery from techonologyofcopyright about embedding the anchor inside another tag:

    In the former case, the editor keeps the tag at first but then removes it the second time you switch to Visual mode (or save the page). In the latter case, it keeps the tag and works fine.

    I tried moving my anchors into other locations and within tags and it worked. Not a perfect solution because you may have to add some element you don't need, but I can switch between the visual editor and back without losing the anchors.

  25. I'm having exactly the same problem - I'm trying to complete NaNoWriMo on a password-protected page and, for my followers/readers, I'm using anchors (date updated) as the 'bookmark' so they can pick up and run with it.

    50,000 words towards a novel in a month is testing in itself without having to reload the anchors on a daily basis.

    Is there any sign of a fix? If not, I'm just putting a redirect onto my Blogger account.
    Thanks, Zeb.

  26. The Visual Editor should no longer be stripping certain code attributes - such as "name" - from anchor tags. Please let me know if anyone is still experiencing the issue.

  27. Hello,
    I just tested this with the "id" code and it still got wiped when I went back to the HTML editor after going to the Visual Editor. Thanks.

  28. Hi spohrte - I wasn't able to replicate this on a test site. Would you mind sending me a link to a post where this is happening so I can take a look?

Topic Closed

This topic has been closed to new replies.

About this Topic