AsgardCms / Platform

A modular multilingual CMS built with Laravel 5.
https://asgardcms.com/
MIT License
779 stars 240 forks source link

It seems to link module's javascript/css with wrong URL #93

Closed dhb52 closed 8 years ago

dhb52 commented 9 years ago

Running AsgardCMS 1.3.0, without any modification, it seems to link javascript/css with wrong URL(\ is not needed)

<link href="//localhost:8000/\modules/media/css/dropzone.css" rel="stylesheet" type="text/css" />
<script src="//localhost:8000/\modules/media/js/dropzone.js"></script>
<script src="//localhost:8000/\modules/media/js/init-dropzone.js"></script>
nWidart commented 9 years ago

Hm I don't have this issue locally, what OS etc. are you running this on ? This should be reported on the Modules package repository.

<link href="//asgard-dev/modules/media/css/dropzone.css" rel="stylesheet" type="text/css" />
<script src="//asgard-dev/modules/media/js/dropzone.js"></script>
aintdiego commented 9 years ago

I just installed Asgard and am having problems with linked stylesheets, too. Asgard is installed in a subdirectory (localhost/cms/) but the CSS (and the footer's Javascript files) are not linked correctly:

    <link media="all" type="text/css" rel="stylesheet" href="/themes/adminlte/vendor/bootstrap/dist/css/bootstrap.min.css">
    <link media="all" type="text/css" rel="stylesheet" href="/themes/adminlte/vendor/font-awesome/css/font-awesome.min.css">
    <link media="all" type="text/css" rel="stylesheet" href="/themes/adminlte/css/vendor/alertify/alertify.core.css">
    <link media="all" type="text/css" rel="stylesheet" href="/themes/adminlte/css/vendor/alertify/alertify.default.css">
    <link media="all" type="text/css" rel="stylesheet" href="/themes/adminlte/css/vendor/datatables/dataTables.bootstrap.css">
    <link media="all" type="text/css" rel="stylesheet" href="/themes/adminlte/vendor/admin-lte/dist/css/AdminLTE.css">
    <link media="all" type="text/css" rel="stylesheet" href="/themes/adminlte/vendor/admin-lte/dist/css/skins/_all-skins.min.css">
    <link media="all" type="text/css" rel="stylesheet" href="//localhost/cms/\modules/dashboard/gridstack/gridstack.min.css">
    <link media="all" type="text/css" rel="stylesheet" href="/themes/adminlte/css/asgard.css">

Footer's Javascript:

    <script src="/themes/adminlte/vendor/jquery/dist/jquery.min.js" type="text/javascript"></script>
    <script src="/themes/adminlte/vendor/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/themes/adminlte/js/vendor/mousetrap.min.js" type="text/javascript"></script>
    <script src="/themes/adminlte/js/vendor/alertify/alertify.js" type="text/javascript"></script>
    <script src="/themes/adminlte/vendor/iCheck/icheck.min.js" type="text/javascript"></script>
    <script src="/themes/adminlte/js/vendor/datatables/jquery.dataTables.js" type="text/javascript"></script>
    <script src="/themes/adminlte/js/vendor/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
    <script src="/themes/adminlte/js/vendor/jquery.slug.js" type="text/javascript"></script>
    <script src="//localhost/cms/\modules/core/js/keypressAction.js" type="text/javascript"></script>
    <script src="/themes/adminlte/vendor/admin-lte/dist/js/app.js" type="text/javascript"></script>
    <script src="/themes/adminlte/js/main.js" type="text/javascript"></script>
    <script src="/themes/adminlte/vendor/sisyphus/sisyphus.min.js" type="text/javascript"></script>
    <script src="//localhost/cms/\modules/dashboard/vendor/lodash/lodash.min.js" type="text/javascript"></script>
    <script src="//localhost/cms/\modules/dashboard/vendor/jquery-ui/ui/minified/core.min.js" type="text/javascript"></script>
    <script src="//localhost/cms/\modules/dashboard/vendor/jquery-ui/ui/minified/widget.min.js" type="text/javascript"></script>
    <script src="//localhost/cms/\modules/dashboard/vendor/jquery-ui/ui/minified/mouse.min.js" type="text/javascript"></script>
    <script src="//localhost/cms/\modules/dashboard/vendor/jquery-ui/ui/minified/draggable.min.js" type="text/javascript"></script>
    <script src="//localhost/cms/\modules/dashboard/vendor/jquery-ui/ui/minified/resizable.min.js" type="text/javascript"></script>
    <script src="//localhost/cms/\modules/dashboard/gridstack/gridstack.min.js" type="text/javascript"></script>
    <script src="/themes/adminlte/vendor/admin-lte/plugins/chartjs/Chart.js" type="text/javascript"></script>

Same thing happened with the message you recieve when you finish the installation process:

<p>You&#39;ve installed AsgardCMS and are ready to proceed to the <a href="/en/backend">administration area</a>.</p>

(It should be "/cms/en/backend".)

I'm running Uniform server on Windows 7. If I, too, should post this in the package you linked, then sorry (It's the first time I open an issue in Github.).

nWidart commented 9 years ago

Asgard does not support to be installed in a subdirectory.

Though I don't think this is related to the backslashes.

Again, this issue should be created on the modules package, this is not maintained by AsgardCms.

aintdiego commented 9 years ago

Oh ok then, sorry again. Does this mean it would not work in a subdomain?

nWidart commented 9 years ago

I've seen people using it on a subdomain. Making it work in subfolder should be a matter of linking to the assets in a different way..

aintdiego commented 9 years ago

Thanks! I'll try to make it work, then. Good job with the project, it looks promising!

dhb52 commented 9 years ago

I test the project on windows with php built-in serve

php artisan serve

I know that laravel does NOT support sub-directory deployment (at least not recommended)

And the link

<script src="//localhost:8000/\modules/media/js/dropzone.js"></script>

works with Firefox, but not wit Chrome

dhb52 commented 9 years ago

I open an issue here : pingpong-labs/modules Issue #194

joshbrw commented 8 years ago

Closing, as issue reported on pingpong-labs/modules