Unable to render CSS in MAMP localhost - css

I am experiencing something very strange when implementing the Metronic Admin panel into a new Laravel project. I have broken everything up into partial blade files, and included all CSS and JS using the standard
{{ asset('...') }}
blade syntax. The problem I am facing is the loading of a single CSS file, in that all browsers will hit this point and stop. What is even weirder is that there are no console errors and no output in the performance tab in Chrome, everything just hangs.
The CSS file in question is
<link href="{{ asset('admin/demo/demo3/base/style.bundle.css') }}" rel="stylesheet" type="text/css" />
Unminified, this CSS file is 55,000 lines long so I'm not too sure if this is something to do with just the sheer size of the file, however, leaving Chrome for 15 minutes has not produced any results at all.
I am able to open the static HTML file from the download folder, which links to this same file and renders perfectly fine, using the file:// method, but when these files are added into the localhost path, the same problem happens again. This leads me to believe this is not a problem with Laravel, but a problem with the localhost instance instead.
The localhost is running the latest version of MAMP on Windows 10, not had any other problems with any other sites, just this single CSS file.
I can also see in the Apache access.log file that these assets are being found with a 200 status code
127.0.0.1 - - [29/May/2018:21:05:41 +0100] "GET /digitaltools/public/home HTTP/1.1" 200 623
127.0.0.1 - - [29/May/2018:21:05:41 +0100] "GET /digitaltools/public/admin/vendors/base/vendors.bundle.css HTTP/1.1" 200 357894
127.0.0.1 - - [29/May/2018:21:05:41 +0100] "GET /digitaltools/public/admin/demo/demo3/base/style.bundle.css HTTP/1.1" 200 1736133
Any help would be greatly appreciated.

After a clean install of MAMP this seems to have solved the problem. Very strange behaviour.

Related

Using uninitialized "redirecttoindex" variable

Suddenly out of nowhere I can not log in into my WordPress site. The site is working but wp-admin is not. In the error log I get:
2022/07/04 23:45:58 [warn] 31793#31793: *300658 using uninitialized "redirecttoindex" variable, client: ip.000.000.000, server: mydomain.com, request: "GET /wp-admin/HTTP/2.0", host: "mydomain.com"
How can I debug this? I have just got this site for maintenance and I am not very familiar with WordPress. Should I diff it with the original version and see if files are modified?
I scanned the code and there are no redirecttoindex variables. Is something up with nginx?
I also can not find anything on google with such a query.
Server API: FPM/FastCGI
PHP Version 7.4.26
nginx/1.20.2
You confirm the other pages in the sites this working well ? If the answer is Yes, you need the check if exists some plugin what redirect the route of wp-admin for new route. First we have to activate the debug mode in the wordpress in the file wp_config find de const WP_DEBUG and set true.
P.S: Don´t activate the DEBUG in the product view.

CSS code not being applied to my flask application

I am learning how to build flask applications. But, whenever I write some CSS code, and link that to my html template, the css never gets applied. No matter what I do.
Here is the line that links my html template to my css file:
<link rel="stylesheet" href="{{ url_for('static',filename='css/base.css') }}">
Here is what I did:
I tried restarting my server.
I searched for this online. This is what I found: CSS not being applied in Flask app. However, even that did not help.
I believe my server does not find my css file, because this is the entire output in my terminal:
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Restarting with stat
* Debugger is active!
* Debugger PIN: 222-949-106
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [11/Nov/2020 21:18:46] "GET /login HTTP/1.1" 200 -
127.0.0.1 - - [11/Nov/2020 21:18:47] "GET /login HTTP/1.1" 200 -
As you can see, my css file is not mentioned anywhere. Where is the mistake?
Please help me.
I hope this is because of the cache. The browser will load CSS once from the server and then it will be stored in the cache memory.
You do remove the cache memory by Shift + F5.
Note: If you may think that the server does not find your CSS file, but if it can't able to find the file, you may encounter with 404 error. In your case, you didn't get that error. So the only possible answer is CACHE.

Error KnpSnappyBundle / wkhtml - ConnectionRefusedError

I have an incomprehensible problem.
I have used this bundle many times, and I understand the main logic to generate a pdf from a twig view.
But on my two last project i have this kind of error:
Error: Failed to load https://mydomain/bundles/bundle/css/bootstrap.css, with network status code 1 and http status code 0 - Connection refused
Exit with code 1 due to network error: ConnectionRefusedError
I have tried:
HTTP and HTTPS url
chmod 777 on var/cache folder - try acl
disable all parameters of wkhtml
update wkhtml
Disable extends twig view - ihave made a new file with full HTML
Clean controller use assets
filter / absolute_url filter / or web_url variable to prefix assets
On my development environment (Windows), i didn't have any problem.
This problem appeared when I work on production environment, based on Debian 9 with nginx, php 5.6, mariadb 10.0* and letsencrypt certificate.
I can't load any assets for now.
Does anyone have an idea??
Ok i have found a workaround. I use this trick :
create a global variable with this path :
pdf_url: '%kernel.root_dir%/../web'
then i call my assets like this :
<link href="{{ pdf_url}}/bundles/css/bootstrap.css" rel="stylesheet">
Its a not the ebst solution, but its works.

Directory Forbidden Neat Bourbon in Wordpress Editor

We are creating a theme on Wordpress that makes use of Neat Bourbon. On the frontend everything works great. On the backend we are trying to display the content the way it will look so we also call Neat Bourbon. Our issue is Neat bourbon throws an error in nginx that the directory is forbidden. This is the only directory showing this error.
[error] 11438#0: *290 directory index of "/var/www/wp-content/mu-
plugins/folder/bower_components/neat/core/neat/" is forbidden, client:
XX.XX.XX.XXX, server: www.example.com, request: "GET /wp-content/mu-
plugins/folder/bower_components/neat/core/neat/ HTTP/2.0", host:
"www.example.com", referrer:
"https://www.example.com/wp-admin/post.php?
post=1318&action=edit"
Permissions are all the same:
List of folders and their permissions
Any help would be greatly appreciated.
Seems like your GET url is incorrect. The last neat is a sass file and not a directory.
Depending on how you are running your imports, the path should be one of the following.
/wp-content/mu-
plugins/folder/bower_components/neat/core/neat
/wp-content/mu-
plugins/folder/bower_components/neat/core/_neat.scss
See: https://github.com/thoughtbot/neat/blob/master/package.json#L28

Symfony2.5.0 fresh install - No route found for "GET /", 404 Not Found - NotFoundHttpException

Hi I am new to symforny2
I have just installed symfony2 on my easyphp server. When I open web directory symfony try to open app.php. For some reason I got this output:
No route found for "GET /"
404 Not Found - NotFoundHttpException
1 linked Exception: ResourceNotFoundException »
[2/2] NotFoundHttpException: No route found for "GET /" +
[1/2] ResourceNotFoundException: +
Logs -
Stack Trace (Plain Text) +
When I open app_dev.php, everything looks normal.
Why do I get this 404 error on app.php ? Is that normal or is this a bug in symfony2.5.0
(demos in app_dev.php are working well)
Thank You for your support.
Regards
See one of my previous answer: symfony2 - how to switch from "dev" to "prod"?
Symfony wraps multiple environment. When you access the app.php front controller, you're on the prod environment whereas when you access app_dev.php, you're on the dev environment.
Knowing that, the demo bundle shipped with the standard edition is only enable on the dev environment according to the AppKernel. So, it is normal you can access the demo page on the dev front controller and get a 404 on the prod front controller.

Resources