# Erratic behaviour when clicking an attachment link

**URL:** https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842
**Category:** Bug
**Created:** [April 22, 2015, 7:11pm UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842 "2015-04-22T19:11:34Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![georgiano](https://avatars.discourse-cdn.com/v4/letter/g/58956e/32.png) [@georgiano](https://meta.discourse.org/u/georgiano)
#### Post date: [April 22, 2015, 7:11pm UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842/1 "2015-04-22T19:11:34Z")

</div>

> [@](#):
>
> Continuing the discussion from [Clicking an attachment link works only once](https://meta.discourse.org/t/clicking-an-attachment-link-works-only-once/24927/4):

These bugs are probably related.  
My config requires users to be logged on to download attachments.

I have several attachments in one post.

**Firefox**

1. When logged off user first time clicks attachment, popup window appears saying login is required. Any consecutive clicks on the same attachment does nothing.
2. Clicking another attachment renders empty page.

If there is only one attachment in post then see fact 1  
After reloading page same behaviour happens.

**Internet explorer**  
Clicking any attachment always shows 404 error page.

**access.log**  
GET requests on attachments return 404.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 22, 2015, 10:35pm UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842/2 "2015-04-22T22:35:35Z")

</div>

Probably a bug. @zogstrip can you take a look after polls deployed tomorrow?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 27, 2015, 8:19pm UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842/3 "2015-04-27T20:19:35Z")

</div>

This should be fixed now 🐅

[https://github.com/discourse/discourse/commit/ad3d2269b2b76c45fcdcfba9a5a6379c2cf140ee](https://github.com/discourse/discourse/commit/ad3d2269b2b76c45fcdcfba9a5a6379c2cf140ee)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 27, 2015, 10:56pm UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842/4 "2015-04-27T22:56:31Z")

</div>



---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 28, 2015, 5:39am UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842/5 "2015-04-28T05:39:59Z")

</div>



---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 28, 2015, 5:40am UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842/6 "2015-04-28T05:40:12Z")

</div>

OP says the bug is not fixed @zogstrip.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 28, 2015, 6:06pm UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842/7 "2015-04-28T18:06:57Z")

</div>

It should now be fixed 🐧

[https://github.com/discourse/discourse/commit/5783e908ea5741515c62f7aa51055e04f8faa635](https://github.com/discourse/discourse/commit/5783e908ea5741515c62f7aa51055e04f8faa635)

---

<div class="post-metadata">

### Author: ![georgiano](https://avatars.discourse-cdn.com/v4/letter/g/58956e/32.png) [@georgiano](https://meta.discourse.org/u/georgiano)
#### Post date: [April 28, 2015, 6:39pm UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842/8 "2015-04-28T18:39:04Z")

</div>

I’ve checked and it works now. 👍  
Thank you.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 28, 2015, 6:48pm UTC](https://meta.discourse.org/t/erratic-behaviour-when-clicking-an-attachment-link/27842/9 "2015-04-28T18:48:29Z")

</div>


