Subfolder Issues


(Joshua Rosenfeld) #1

Just discovered another bug with subfolder installs. Wanted to get it detailed here, as well as all the other bugs I’ve found with subfolder installs (detailed deep in other topics).

  1. :white_check_mark: Link on admin dashboard doesn’t respect subfolder. Instead of pointing to it points to For reference, it’s this link:
  2. Mini profiler doesn’t work. It does not appear at all, and the following error is in the console:
  3. :white_check_mark: Right clicking or Ctrl/Shift clicking the logo in the top right does not respect subfolder, points to instead of (Left clicking works, I’ve been told the router catches that)
  4. :white_check_mark: docker_manager long polling.

Subfolder support with Docker
Issue embedding when discourse is hosted in a subfolder
Non-standard port breaks uploads
Dashboard upgrade link broken (subdirectory bug)
(Jeff Atwood) #2

@neil can you take a look at these next week?

(Neil Lalonde) #3

Sure. The first two are in other libraries, and the 3rd one should be easy to fix.

(Neil Lalonde) #4

I fixed the 3rd issue.

I also have a fix for the first issue in docker_manager, but am having trouble compiling it because of npm issues I think… Will try to sort it out.

(Joshua Rosenfeld) #5

Can confirm that it works, thanks! Good luck with the other two.

(Jeff Atwood) #6

Any news on this one Neil?

(Neil Lalonde) #7

This one is now fixed. I’ll look at miniprofiler next.

(Joshua Rosenfeld) #8

Thanks for all your work @neil, I’ve got one more subfolder issue for you (maybe)…

We’ve had issues since installing Discourse with the progress bar/upgrade log in Docker Manager. Specifically, it doesn’t update automatically when updating - we have to refresh the page each time to see if it is complete. Forgot that I reported this awhile back, but since we seem to be collating subfolder issues here, figured I should report it again.

Old post


Yeah, the biggest outstanding issue I have with subfolder support is that the message-bus long polling url doesn’t get populated correctly on the admin upgrades page.

see Message Bus doesn't respect subfolder and Non-standard port breaks uploads

(Neil Lalonde) #10

I’m looking at making the upgrade app aware of subfolder. There are a few issues with it as mentioned before. Hard-code urls that break on subfolder, progress bar doesn’t work, message bus doesn’t work.

(Neil Lalonde) #11

Wait, I’m upgrading a test instance to try out some fixes, and… the progress bar and log are working fine. This is before I’ve deployed any fixes:

@jomaxro Are you sure it’s broken? :confounded:

(Joshua Rosenfeld) #12

Pretty sure…I’ve never had it work for me.

Just to check - you’re running Discourse on something other than port 80 and proxying, right?

Here’s what I see in the console (Chrome): Failed to load resource: the server responded with a status of 404 (Not Found)

And now this:

POST 404 (Not Found)
send @ docker-manager-vendor-5ae6424….js:3
ajax @ docker-manager-vendor-5ae6424….js:3
h @ docker-manager-vendor-5ae6424….js:17
t @ docker-manager-vendor-5ae6424….js:17
(anonymous) @ docker-manager-vendor-5ae6424….js:17

And here’s long polling settings:

(Neil Lalonde) #13

That long polling base url is wrong. You have to use an absolute url.

I do see the message-bus urls without the subfolder, but they still work. I’ll fix so it includes the base url.

(Joshua Rosenfeld) #14

Ah, I was following this guide:

So should I change it, or are you changing something in core?

(Neil Lalonde) #15

Well that’s a shame. It’s a wiki post, and that incorrect info was added by @mrded.

(Joshua Rosenfeld) #16

Looks like @Falco made that change - Sep 25, '15. Regardless of the blame, what do I (and others) need to do going forward? Change it in site settings, or wait for code changes to core?

(Neil Lalonde) #17

I’m not changing anything regarding support for long polling base url. If it works, then I guess the docs are right as long as message bus ends up using the correct absolute path.

(Jeff Atwood) #18

Can we add validation to the field to prevent this problem from biting others in the future? Or update the help text for it?

(Joshua Rosenfeld) #19

@codinghorror, this PR has been pending for a bit…

(Jeff Atwood) #20

Does that really help? @neil just said it has to be an absolute URL.