Direct links not loading for certain users, detailed explanation included

Hey guys,

This might be a bit of a weird one, today i noticed that SOME direct links seem to not work and just go to “loading” and don’t actually load.

If you are on the forum already and click a link it works fine (single page app design i get it)

But any ideas what’s causing this? seems to only be if you logged in

For example going to
and clicking any link is fine but going directly to for example
will result in this

However going to for example post 160 instead of 189 will work,
now you may be thinking thats because there is only 170 posts, however clicking “to bottom” will set the URL to 189 despite not working. this results in copying the wrong url’s etc and causing issues when sharing links to other places.

Also presumably discourse should detect that the URL is invalid and just load the topic instead of a specific post on the topic?

I hope this is an easy fix :thinking:

EDIT: upon further investigation it seems to be only a few accounts, so far mine (admin) and a moderator called Louage, if not logged in it works fine, if logged in as a test user it works fine (both as a user and a mod), if logged in as my self it doesn’t… hmmm strange

Other moderators are also fine… this is a strange one :thinking:


It sounds like an issue with a theme component or plugin (that append-tag-apim maybe?). You might try safe-mode.

Thanks for the reply, funny you say that, just literally tried that moments ago, unfortunately the same thing

that’s my own plugin, GitHub - CyanLabs/discourse-append-tag-apim: Simple plugin that appends the apim tag to sync1,sync2,sync3,sync4 tagged topics doesn’t do a lot. works if you’re not logged in.

It does appear unlikely to be the problem.

I’d say to remove both of the un-officiall plugins and rebuild as a next step.

Thanks, I will try that now, obviously if it’s only affecting 2 users it’s not a big deal but i can’t be sure it’s only affecting those 2 users and not more.

1 thing to note is I am using the separate data/web containers but both are up to date so doubt that matters?

Unfortunately no luck with that, same thing

I’d try different browsers next.

If it’s just those two users then it’s something with them, I guess.

The links work for other users, so it’s not likely a Discourse bug.

Browser makes no difference, tried phone chrome, chrome on windows, edge, etc, as soon as i am logged in on my account those links don’t work, same for Louage, for other mods it’s fine. for my test account it’s fine.

I don’t see how this isn’t a Discourse bug, even if it’s something specific to the user accounts themself that would still make it a discourse bug, where the bug originates though, who knows. but this is definitely a issue on discourse’s end, how can it be a user’s computer when it works fine on the same users computer (mine, as a different logged in user on Discourse)

I mean it literally says “require” is not defined, that surely means something isn’t loading properly from discourse when trying to view these links

I appreciate your help though but this definitely a server side issue not a client.

Sorry for the double post but i also just noticed that this topic


do not work at all either. i wonder if this is related?

EDIT: ok this actually was related to the flag plugin, but the initial issue still persists.

EDIT2: Nothing in any of the log files that are useful

Started GET "/t/sync-3-4-22251-feedback-issues/6515/9999" for xxxx at 2023-05-01 16:21:07 +0000
Processing by TopicsController#show as HTML
  Parameters: {"slug"=>"sync-3-4-22251-feedback-issues", "topic_id"=>"6515", "post_number"=>"9999"}
  Rendered topics/show.html.erb within layouts/application (Duration: 8.2ms | Allocations: 7009)
  Rendered layout layouts/application.html.erb (Duration: 19.8ms | Allocations: 16957)
Completed 200 OK in 237ms (Views: 20.3ms | ActiveRecord: 0.0ms | Allocations: 179458)

EDIT3: This definitely seems to be a discourse bug, seems to be certain posts that are causing the issue, for example i can access
(341 and below)

but i can not access
(342 and above)

So i split the topic, now the split topic breaks but the original topic works, so 100% related to some post in this topic somewhere… posts up to 150 work, anything after 150 does not… so strange.

1 Like

And if only for some users? Is it network related? If you access from a different network will it work?

No, it’s specifically the user, doesn’t matter what browser, what network, what device if I’m logged in as me (or Louage) including impersonation it does not work.

As far as i’m concerned this is still a bug in Discourse, so i’ve moved it to bug

I am not sure how we can get together some repro steps to investigate this? :thinking:

Does it happen with all admin and/or mod accounts? Are there any more details in the /logs that could pin it down further?

And you’ve checked safe mode?

1 Like


Unfortunately not, it only happens with my account (Admin) and Louage’s account (Moderator)

/logs shows nothing at all unfortunately, same for all the log files mentioned in the log topic

Safe mode makes no difference (mentioned above but you might have missed it)