GET ------ net::ERR_ABORTED 404 (Not Found) - laravel

Good Evening.... I am getting error for CSS and JS file and showing in console.
Few are as below - Getting this error for 1 page only and for other pages all CSS and JS files are working fine.
While checking the error, i point out the url of 8000/mypagename/....plugin/
is that ok or did i done something wroung. ?
GET http://127.0.0.1:8000/viewBuffalo/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css
net::ERR_ABORTED 404 (Not Found)
GET http://127.0.0.1:8000/viewBuffalo/plugins/datatablesbuttons/css/buttons.bootstrap4.min.css
net::ERR_ABORTED 404 (Not Found)
I tried to check the file location but they are ok and as mentioned other pages are working fine...
Thanks in Advance...

As per your Your explanation If you have added your css and js inside head tag, you should use asset() provided by laravel like below example.
<link rel="stylesheet" href="{{ asset('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css') }}">
I consider your plugins folder is inside of public folder.

Related

Error 404: https://fonts.googleapis.com/css

One module in our Prestashop platform inserts the google link below:
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,regular,500,600,700,100,200,800,900%7CDM+Serif+Display:regular,italic&subset=latin%2Clatin-ext?ver=8739" type="text/css" media="all">
But the browser reports ERROR 404: But when I insert and check the URL into the browser manually - it works?
Does this kind of google link needs to be ref. to in a special way or does any other tags need to be added to it before it will work?
To be honest I'm not 100% sure how I got this right by click around in the dev. console. But this URL here works:
https://fonts.googleapis.com/css?family=Poppins:300,regular,500,600,700,100,200,800,900%7CDM+Serif+Display:regular,italic&subset=latin%2Clatin-ext?ver=7489

CodeIgniter 404 error log when no visible issue present

I have CodeIgniter configured to store errors. Every time I refresh a page I get a new message in my logs ERROR on 2017-08-04 00:07:59 with message: 404 Page Not Found: Framework_assets/css. The page loads correctly with no errors (visible).
Both folders are valid, I'm not receiving any 404 errors in dev console (all css files are loading correctly).
I access all my scripts in my view like so:
<link href="<?php echo ASSETS_DIR; ?>/css/fileupload.css" rel="stylesheet">
where define('ASSETS_DIR', '/framework_assets');
I found this: https://forum.codeigniter.com/thread-65040.html but it really doesn't answer my question. For example, why am I only getting a not found for the css when I do the same to get my js files? <script type="text/javascript" src="<?php echo ASSETS_DIR; ?>/js/messaging.js"></script>
After hours I found this line at the end of my css:
/*# sourceMappingURL=toolkit-inverse.css.map */
Deleted it (the file didn't exist) and no more logs.

Laravel - Failed to load resource error 500

I've a problem with my website, the layout load properly (and CSS) but no JS and page in yield.
I've copy paste the layout of my other website, inclued tje JS and CSS file, I do not understand why it does not work while on other sites it's good..
Code for include the JS and CSS file: <script src="{{url('js/jquery.min.js')}}"></script>
As you can see, the page is empty, and this is not normal.
Image of error:
Ahh... ok.
I've forget to DL From:: into my project. Sorry
I had the same problem when I was creating a recent Laravel project however mine was narrowed down too 2 problems. 1 being the JS had an error and 2nd was the way I called it.
I fixed it by doing the following:
<script type="text/javascript" src="{!! asset('js/jquery.min.js') !!}"></script>

css and js files in laravel5.3 is not correct

I have installed Laravel5.3 and install Auth scaffolding after that I went to register
http://localhost/laravel53/public/register
the page is messy and no css ans js loaded correctly and in browser console I can see:
"NetworkError: 404 Not Found - http://localhost/css/app.css" and
"NetworkError: 404 Not Found - http://localhost/js/app.js"
and in C:\xampp\htdocs\laravel53\resources\views\layouts\app.blade.php the link to css file is not correct
<!-- Styles -->
<link href="/css/app.css" rel="stylesheet">
but when remove / from href the path become correct.
the question now is: Is this bug in laravel5.3 or any way to solve this issue without removing /
In layout css path is hardcoded to '/css/app.css'. Please replace it with this {{url('/css/app.css')}}

works in page inspector but not in debug

is there any reason for something to work in page inspector and not in real debug mode?
In particular I'm using fullcalendar.min.js (JQuery plugin) in some tab content and I see it very well in page inspector but when debug the calander is not shown..
in header:
<link rel="stylesheet" href="./../../Content/fullcalendar.css" type="text/css" media="all" />
<script src="./../../Scripts/js/fullcalendar.min.js"></script>
in body:
<section class="tab events-tab">
<section class="events-tab-inner">
<div id="calendar"></div>
</section>
</section>
in console of the web page loading I have the below errors (I'm not sure they are directly related to my calendar thing):
GET http://localhost:3516/SITE/css/images/star-off.png 404 (Not Found) jquery.min.js:2
Invalid App Id: Must be a number or numeric string representing the application id. all.js:56
event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery.min.js:3
FB.getLoginStatus() called before calling FB.init(). all.js:56
GET http://localhost:3516/SITE/css/images/star-off.png 404 (Not Found) jquery.min.js:2
Based on your console output that you've included above, it seems that there are a few errors. Not sure why they would work in page inspector and not debug though. It seems like it should be breaking everywhere. Let's approach each error one by one:
1. Invalid Image Paths
It appears that you may be using jQuery UI for some features within your code. The jQuery UI suite contains images located in the /images directory when you download the .zip file that the CSS references as background-images. These images are expected to be nested on directory in from the location of the CSS file. For example,
[CSS Directory]
-> jquery-ui.min.css
[images]
-> star-off.png
-> ...
-> etc.
The only way to change this structure is to modify the relative urls within the minified jQuery UI CSS file.
2. Facebook JavaScript SDK error
I have never personally used the Facebook JavaScript SDK. However, that is what it appears you are using. From the error it sounds like you never initialize the Facebook object via FB.init() before you call FB.getLoginStatus(). Try this:
<script type="text/javascript">
/* Locate your FB.getLoginStatus() call and place FB.init() before it */
FB.init();
FB.getLoginStatus();
</script>
Other than that, you may need to refer to their documentation for how to properly initialize the FB object for use.
Hope this helps. Good luck and happy coding! :)

Resources