I've come to this conclusion through the process of module elimination by disabling each 1 by 1. When linking to a page which appends an anchor tag to the url (ie: http://example.com/node#comments), the page will jump to the top of the page. This also happens when clicking on comment subject titles which also use the anchor tag to jump to specific points on the page.

I'm not too sure which part of this module is effecting this functionality but I noticed a couple of lines of code that supposedly are there to prevent this sort of issue (through reading the code comments). Line 236 in the tabledrag.js file (though this probably only effects table functions).

CommentFileSizeAuthor
#17 tableheader-929670-17.patch4.44 KBderikson
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dale42’s picture

I encountered this problem in 6.x-2.x-dev (2009-Apr-23).

Downgrading to 6.x-1.1 resolved the problem.

Apfel007’s picture

what is jquery doing with an anchor tag?

Apfel007’s picture

anyone out there who is able to explain this..

This line is called if I use an anchor:

reference to undefined property events[type][handler].data

Line 337

What means that?

My anchors are displayed in the bottom of the page, if I click an anchor, the page went to the top...

I can't go to vers. 1. cause of tabs panel style.

loonybin’s picture

when I was updating jquery from 1.2.6 to 1.3.2 I got the problem that my lightbox opens on an ancer tag (). currently was downgrading back to 1.2.6 and I will wait till a stable version is out of jquery 1.3.2 or higher for drupal 6.x

jswap’s picture

Version: 6.x-2.x-dev » 6.x-2.0-alpha1

I had this same problem with jQuery Update 6.x-2.0-alpha1. My users were unable to use the "New" links in the forum.
Downgrading to 6.x-1.1 resolved the problem.

This is a fairly serious bug, IMHO.

rkodrupal’s picture

i've been dealing with this bug for a while (http://drupal.org/node/934098) and can confirm it's a bug in 6.x-2.0-alpha1 ...

still a problem with 6x.2x as of April 19, 2011 - 19:14

will downgrade to 6.x-1.1 and see what other issues that causes ...

... i can confirm downgrading to 6.x-1.1 fixes the anchor link problem for nodes having attachments.

rkodrupal’s picture

boo ... downgrading to 6.x.1.1 breaks collapsiblock ... so i'm stuck at 6.x.2.0-alpha1

just to be clear the conflict is between jquery update and drupal core optional - load module (v. 6.19).

unenable either one of these modules and anchor links for articles with attachments will work again.

k

Tanis.7x’s picture

See http://drupal.org/node/893538

Applying the patch in #8 seems to have fixed it for me.

rkodrupal’s picture

Thx for pointing this out Tanis.7x ... worked for me too.

oops ... i tested it on localhost and it worked, but it did not work on the hosted website ... it turns out localhost didn't have the problem to begin with (and it's an exact copy of the hosted site) ... weird ... more investigation is underway.

K

stockliasteroid’s picture

I'm having the same issue. Any anchor links on the page (these were just created via TinyMCE/WYSIWYG) require two clicks to work. Disabling jquery_update fixes the issue, and downgrading to 1.1 also fixes it. Unfortunately colorbox requires 2.0, so that's a deal breaker. I'll try to figure out what's up with it...

Update: Fixed it by upgrading jQuery to 1.4.4. Not sure what the exact issue was, but I did have to install the previously mentioned patch to get tabledrag to work. Not sure if there will be other side effects, but this was a critical client issue, so I'm chancing it for now.

rkodrupal’s picture

i tried the patched tabledrag and the 1.4.4 jquery in both the /misc and the jquery_update/replace folders but no joy.

a question for stockliasteroid: does your anchor tag work when the destination folder has an attachment? If so, can you also tell me what version of jquery_update you used? I'm on 6.x-2.0-alpha1 ...

Thx

alanpeart’s picture

Subscribe.

jgoodwill01’s picture

subscribe

stockliasteroid’s picture

Sorry, should have followed up... 1.4.4 ended up having too many other compatibility issues with jquery_update (tabledrag, etc, didn't work correctly anymore, even with latest jquery_update), so I ended up dumping it and going with jQuery.simpleScroll as a "solution". I'd rather not have to rely on a script-only solution, but that's all I had time for.

John Carbone’s picture

Ran into the same issue, but I tracked it down to some incompatibility between jquery 1.3.2 and /misc/collapse.js. Disabling jquery_update or removing collapse.js (for debugging) fixes the issue, but neither is a real option. Also tried updating the module's js to the latest version of jquery, but that did not work either. Still looking for a viable solution.

m1n0’s picture

What's the status of this issue? It's very weird that no one took care of this...it's a quite critical bug imo...

derikson’s picture

FileSize
4.44 KB

The patch in http://drupal.org/node/325810#comment-5340860 fixed the problem for me.

I've modified the patch to apply to jquery_update instead of Drupal core.

zkrebs’s picture

This worked for me - strange ---- big bug.

jordan8037310’s picture

@Derikson

Unfortunately that patch for jquery_update did not work for me. Installed the most recent version of jquery_update (6.x-2.0-alpha1)

I went ahead and applied the core patch (http://drupal.org/node/325810#comment-5340860) as well but no luck either. Anyone else have ideas?

EDIT: My apologies, I had a Filtered HTML input format that was wrongly stripping out the anchor tags. Patch works fine.

jvieille’s picture

Any hope this will be committed?

basvredeling’s picture

Version: 6.x-2.0-alpha1 » 6.x-2.x-dev
Status: Active » Closed (fixed)

Changing to 6.x-2.x-dev and selecting jquery 1.7 in admin/config/development/jquery_update also resolves this issue.
Marking this as fixed cause it is unlikely that this alpha-1 patch is still applicable and it is solved upstream.

apillon’s picture

Thanks a lot derikson you saved my life...

Unfortunately upgrading to 6.X-2.x-dev and using jquery 1.7 was breaking my dynamic display blocks...