Anchor points keep disappearing

  • Author
    Posts
  • #1040239

    morewarmth
    Member

    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/

    The blog I need help with is morewarmth.wordpress.com.

    #1040367

    morewarmth
    Member

    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!

    #1040368

    morewarmth
    Member

    [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!

    #1040426

    erinnv
    Member

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

    #1040473

    teofilo
    Member

    I am having this problem as well.

    #1040476

    justpi
    Member
    #1040492

    nleviatan
    Member

    I am having the exact same problem:
    https://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>.

    #1040507

    justpi
    Member
    #1040508

    morewarmth
    Member

    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!

    #1040515

    evitae
    Member

    Dear everybody, see also the discussion in the topic: https://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.

    #1040518

    teofilo
    Member

    nleviatan’s fix worked for me as well. Thanks!

    #1040540

    justpi
    Member

    Sorry for my previous reply – nleviatan is right.

    #1040556

    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.

    #1040573

    rebeccacso
    Member

    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!

    #1040575

    timethief
    Member

    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. https://en.forums.wordpress.com/topic/anchor-points-keep-disappearing?replies=14#post-1040200

    #1040595

    ingridcc
    Member

    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…

    #1040600

    platt85
    Member

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

    #1040601

    ingridcc
    Member

    @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?

    #1040602

    ingridcc
    Member

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

    #1040603

    platt85
    Member

    @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

The topic ‘Anchor points keep disappearing’ is closed to new replies.