ziishaned / opus

Open source knowledge base application for Teams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong linking of CSS and JS in <head> causes resources 404

nekromoff opened this issue · comments

Resources do not get loaded as they are incorrectly pointing to 404 non-existing files.

in /resources/views/layouts/master.blade.php:
there are incorrect URLs used:

        <link rel="shortcut icon" type="image/png" href="/img/favicon.png">
		<link rel="stylesheet" href="/css/bootstrap.min.css">
		<link rel="stylesheet" href="/css/app.css">
		<link rel="stylesheet" href="/css/font-awesome.css">
		<link rel="stylesheet" href="/plugins/jcrop/Jcrop.min.css">
		<link rel="stylesheet" href="/css/toastr.min.css">
		<link href="/plugins/ckeditor/plugins/codesnippet/lib/highlight/styles/github.css" rel="stylesheet">
		<link href="/plugins/vakata-jstree/dist/themes/default/style.css" rel="stylesheet">
		<link href="/plugins/atjs/jquery.atwho.min.css" rel="stylesheet">
		<link href="/plugins/select2/select2.min.css" rel="stylesheet">

These should be relative to the public directory instead of being relative to the root directory.

Once the opening slash / is removed, everything loads fine.

This also applies for all other JS files linked in master.blade.php.

Actually, the correct solution is to use this blade function:
{{ asset('css/file.css') }}
{{ asset('js/file.js') }}

OK, the incorrect use of URLs seems to be more widespread that I have thought.

You are furthermore incorrectly linking to the AJAX URLs, so they also give 404 and basic functions such as loading members, tags etc. does not seem to be working.

Anyway, although wonderful looking, the software is currently not usable in this state at all.