After migrating a Discourse installation from a subdirectory to a subdomain, the theme-javascripts domain was being called instead of the subdirectory. Magnetidog reported the issue and tried rebuilding the application without success. pfaffman suggested checking the URL and app.yml file, and Magnetidog found that the issue was caused by a double slash (//) in the URL. merefield asked about the hostname value, and Magnetidog suspected a database issue. The problem was ultimately solved by Magnetidog using the discourse remap command to update the URLs in the database:
./launcher enter app
discourse remap //theme-javascripts /theme-javascripts
This solution may help others experiencing similar issues after migration.
I have a Discourse installation which was living in a subdirectory and has now been moved to a subdomain. Everything seems to be working now, but we have a pending problem where Discourse calls the “theme-javascripts” domain instead of a subdirectory.
Maybe there is something left in your app.yml that’s referring to. . . hmm. . . something (like maybe a “/”) that’s making it add the https to the front?
Hey @merefield, not blank - the value is (hiding URL). But I suspect the same, or something along those lines, as the theme-javascript is being called with two slashes in front of it. I wonder if it could be some value in the database which was not updated after the move from the subdirectory. Trying to look into that.
I think I fixed it - all I had to do was a remap; not sure how that wrong URL was there in the first place, as the error appeared after a rebuild that was not done by me.
Anyhow, this is what I did to fix this:
> ./launcher enter app
> discourse remap //theme-javascripts /theme-javascripts
> Rewriting all occurrences of //theme-javascripts to /theme-javascripts
> THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES)
> YES
> theme_fields=4
> Done