ziishaned / opus

Open source knowledge base application for Teams
Other
1.23k stars 158 forks source link

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

Closed nekromoff closed 6 years ago

nekromoff commented 7 years ago

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.

nekromoff commented 7 years ago

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

nekromoff commented 7 years ago

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.