Create Node/1 with link to Node/2#landingspot
Create Node/2 with anchor called landingspot
Attach a file to Node/2 (Upload module form)

Click on the link in Node/1 (Node/2#landingspot) and it takes you to Node/2, but not to the anchor point

Hit Enter with Node/2#landingspot in the URL entry field (while Node/2 is being Viewed) and it jumps down to the anchor point

... syntax is good, but jump to the anchor doesn't work when coming from another node

Delete the attachment and the anchor works as advertised.

I was using myURL/node/1211#to as the landing spot for a link coming from node/1210

Using Firefox, Windows XP.

Comments

rkodrupal’s picture

By the way, don't know if its related, but cloning a node with an attachment does not clone the attachment. That's how I was able to uncover the root cause for my anchor links not working (I cloned the node with the attachment-anchor, and redirected the link to the clone and it worked).

rkodrupal’s picture

More information.

1st comment (of 2)

I noticed when a node/1 jump-link to node/2#anchorlink arrives at the destination node (node/2) the anchor 'does' seem to focus for a brief moment on the anchorlink ... but then apparently gets hijacked and the focus jumps to the top of the destination node.

When the link for the attachment gets loaded it for some reason insists on a top-of-page focus?

2nd comment (of 2)

This bug applies to Firefox 3.6.11 and Opera 10.51. It does 'not' apply for IE 6.0 (where the anchor links work just fine even with an attachment).

I'm using the upload module.form for my attachments.

Any thoughts out there in Drupal-land?

rkodrupal’s picture

ping... to keep the issue alive ...

pfrenssen’s picture

Status: Active » Closed (cannot reproduce)

I can't reproduce this on 6.20. Steps taken to reproduce:

  • I installed a fresh 6.20 site with the Garland theme.
  • Made a first story node with the a link to /node/2#landingspot.
  • Made a second story node, added a long dummy text and put an anchor in the middle with name="landingspot".
  • Tested the link, it jumped to the anchor as expected.
  • Enabled the core Upload module and attached a file to node 2.
  • Tested the link, it jumped to the anchor as expected.

I have tested with the following browsers: Firefox 3.6.13 (linux), Chromium 8.0.552.224 (linux), Internet Explorer 8.0.6001.18702 (XP), Firefox 3.6.13 (XP).

Can you please retest this while making sure you use a core theme and have all contributed modules disabled?

rkodrupal’s picture

your request will take me a bit of time to do. your test looks exact though, so it won't surprise me if it is a contributed module (or one of my hacks to same). i'll get the intern to start disabling contributed mods on a localhost until it starts working (at least we have them all sorted by date of install).

thanks for your reply.

pfrenssen’s picture

Yes that would be a good way to narrow down the problem. From your description it sounds like the display of page is being affected by a piece of javascript.

saslib’s picture

Just ran into similar problem here but within the same node. When I click on a link to an anchor within a node, FF4 and IE9 browsers on Windows Vista jumped to anchor for a fraction of second then to top. Deleted attachment from the node and the anchor links worked. Using Full HTML input format.

rkodrupal’s picture

i'll see if i can get back to playing with this issue this week. Still unresolved on my end.

rkodrupal’s picture

...and the culprit is ... drum roll ... jquery update.
i'm currently at jquery update 6.x-2.0-alpha1 ... but this has been around for a while, and i seem to recall just recently updating this module ... so the issue has been around with jquery update for a while.

i'll post a link to this thread in the issue queue for that module. ... oops, already in the jquery update issue queue ... http://drupal.org/node/929670

k