Css etc files not being generated - site not styled

Kirsty Pollock Posted in Beginning Developers 7 years ago

I installed OSSN and I can get to the front page, but it is not styled at all.

Looking at the source, it is looking for a bunch of css and js that I think might be generated from php - but that hasn't happened for me, by the looks of it.

What did I miss?

("MY-SITE" is obviously not meant literally, it is the path to my site !)

<link rel="stylesheet" type="text/css" href="http://<MY-SITE>/css/view/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://<MY-SITE>/css/view/ossn.default.css" />
<script type="text/javascript" src="http://<MY-SITE>t/vendors/jquery/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://<MY-SITE>/vendors/jquery/jquery-arhandler-1.1-min.js"></script>
<script type="text/javascript" src="http://<MY-SITE>t/js/view/ossn.language.js"></script>
<script type="text/javascript" src="http://<MY-SITE>/js/view/opensource.socialnetwork.js"></script>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=PT+Sans:400italic,700,400" />
<script type="text/javascript" src="http://<MY-SITE>/themes/goblue/vendors/bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.4/css/jquery-ui.css" />

My site top level folder structure looks like this:
folder top level

Replies
vn Vu Nguyen Replied 3 years ago

Please modify these files <root>/themes/goblue/plugins/default/theme/page
- page.php
- administrator.php

Add this line in <head> section

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

Hope can help.

German Michael Zülsdorff Replied 7 years ago

You're welcome.
I'm always happy getting positive feedback like that, last not least because it may motivate others not to give up even if things look really weird in the beginning.

German Kirsty Pollock Replied 7 years ago

Right that works. Thanks for the help and the confirmation of my hunch!

German Kirsty Pollock Replied 7 years ago

If it is down to DNS mapping (which makes total sense), then that's easy solved, as you say. I'll either just buy the domain or run it locally on a WAMP stack. Off to test that...

German Michael Zülsdorff Replied 7 years ago

To put it simply: Since DNS is a mandantory pre-requisite for running a website correctly, I wouldn't spend any time on searching for tricks how to make it work without. There are a lot of comfortable virtual appliances available (e.g. https://www.turnkeylinux.org/lampstack ) you can run on your local PC inside a vmware player and set up with a locally known hostname/url.
That's what I 'recommend and that's in fact the way I'm doing all my Ossn stuff and testing.

German Kirsty Pollock Replied 7 years ago

I set the display_errors value on the database directly, but still get no error log.

Should I try a reinstall? My ISP guy says rewrites should definitely be on, but I have yet to successfully test this out.

German Kirsty Pollock Replied 7 years ago

[sitename]/administrator 404s

I tried enabling error handling by creating the file DISPLAY_ERRORS in the very root. No error log file was created. (I tried it under public_html as well, in case I had misunderstood what was meant by root) still nothing

All the site links on index.php 404.

German Kirsty Pollock Replied 7 years ago

Judging by front end error output (from Chrome), nothing in the "view" folder is there / this folder is not correctly mapped.

i.e. none of the css, js files are found.

German Kirsty Pollock Replied 7 years ago

> The directories and files displayed in screenshot 1 actually don't
> have a 1:1 counterpart in your physical directory structure. Right
> that's where mod_rewrite comes in: mapping physical locations to
> virtual ones.

Ah, gotcha. Of course, that makes sense (I'm not a *nix geek but familar with the concept from elsewhere)

I get a 404 on that URI.

I just had a thought. I have no DNS listing for this domain (yet, I want to test it all before I buy a domain ideally!) , it all has to go via the IP address. Could there be some settings in OSSN that therefor need changing?

Thanks very much for all this, by the way!

German Michael Zülsdorff Replied 7 years ago

No, it's not that easy as it looks at first sight. :)

The directories and files displayed in screenshot 1 actually don't have a 1:1 counterpart in your physical directory structure. Right that's where mod_rewrite comes in: mapping physical locations to virtual ones.
Before asking your provider why this isn't working, make sure your installation is complete. A good starting point would be to verify the themes directory tree for completeness.

Additional you can switch on error reporting (see https://www.opensource-socialnetwork.org/wiki/view/1954/how-to-enable-ossn-error-reporting) and search for hints in the log file.