Advertisement:

Author Topic: SMF fresh install linking js, styles, and images to localhost  (Read 1234 times)

Offline Alex4108

  • Jr. Member
  • **
  • Posts: 131
SMF fresh install linking js, styles, and images to localhost
« on: September 26, 2014, 01:51:01 PM »
Afternoon,

I recently installed two instances of SMF 2.0.8.  A dev and production instance.  Both instances are encountering the same problem.  When I load the page, I get no styles, images, or javascript.  After viewing the source, it seems that SMF is trying to access them from http://127.0.0.1/smf, instead of my board's URL, http://domain.name/

I checked the paths under the admin panel, and they're all set correctly.  I can confirm the resources exist by viewing the source and visiting them with the correct domain name instead of 127.0.0.1.

Please let me know of any possible solutions.  Thanks!

Offline Alex4108

  • Jr. Member
  • **
  • Posts: 131
Re: SMF fresh install linking js, styles, and images to localhost
« Reply #1 on: September 26, 2014, 01:52:42 PM »
Found the solution after digging through the admin panel one last time before I got off.

Admin > Configuration > Themes > Theme Settings

Click "Attempt to reset all themes" button at the bottom

links are repaired and styles load properly now.

/thread

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,630
    • StoryBB/StoryBB on GitHub
Re: SMF fresh install linking js, styles, and images to localhost
« Reply #2 on: September 28, 2014, 09:22:37 PM »
Are you using PHP 5.5 out of interest? I thought we'd fixed a bug related to that in the main installer...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline ZefiroDragon

  • Newbie
  • *
  • Posts: 1
Re: SMF fresh install linking js, styles, and images to localhost
« Reply #3 on: October 10, 2019, 04:11:44 PM »
I just encountered the same issue when doing a fresh test install.

Got the zip file for 2.0.15 (which seems to still be the newest version, despite it being 2 years old), unzipped it on my web server, setting the permissions as required. Clicking through the installer until it's finished.

When the forum then loads, all stylesheets and images are broken - pointing to 127.0.0.1 instead of my local domain name.

The fix mentioned by Alex4108 did work for me as well.

I'm running on Ubuntu 18.04.3 LTS with PHP 7.2.19-0ubuntu0.18.04.2 on that machine.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,630
    • StoryBB/StoryBB on GitHub
Re: SMF fresh install linking js, styles, and images to localhost
« Reply #4 on: October 10, 2019, 04:57:09 PM »
And you will until the team fixes the installer. This is a bug that has been in the installer since 2.0.7 (which I fixed in 2.0.6 but for some reason it didn't get applied to 2.0.7 and beyond)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.