Magento 2.2 CSS not loading
I have installed Magento 2.2 on hosted server (rewrite mod is on) and I have since 2 days a problem with .css file.
First of all, I deactivated on MYSQL static sign - "dev/static/sign => 0", so I don't have any "version15...." folder on /pub/static/.
I have cleaned all cache files and deploy all the things, what magento needs:
rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/tmp/ var/generation/ pub/static/frontend/
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:db-data:upgrade
php bin/magento dev:source-theme:deploy
php bin/magento setup:static-content:deploy
If I launch my page on firefox, I see that Magento want access to https://www.at-handel.at/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css
I checked the path and it's correct. I have ext-all.css file on this path, but Firefox/Internet Explorer/Safari don't show me. It's not only on frontend, it's also on backend - https://www.at-handel.at/arkaplan
I have also checked the permissons on /var or /pub/static/ - 755
What can I do now??? Please help me.
magento2 css
add a comment |
I have installed Magento 2.2 on hosted server (rewrite mod is on) and I have since 2 days a problem with .css file.
First of all, I deactivated on MYSQL static sign - "dev/static/sign => 0", so I don't have any "version15...." folder on /pub/static/.
I have cleaned all cache files and deploy all the things, what magento needs:
rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/tmp/ var/generation/ pub/static/frontend/
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:db-data:upgrade
php bin/magento dev:source-theme:deploy
php bin/magento setup:static-content:deploy
If I launch my page on firefox, I see that Magento want access to https://www.at-handel.at/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css
I checked the path and it's correct. I have ext-all.css file on this path, but Firefox/Internet Explorer/Safari don't show me. It's not only on frontend, it's also on backend - https://www.at-handel.at/arkaplan
I have also checked the permissons on /var or /pub/static/ - 755
What can I do now??? Please help me.
magento2 css
add a comment |
I have installed Magento 2.2 on hosted server (rewrite mod is on) and I have since 2 days a problem with .css file.
First of all, I deactivated on MYSQL static sign - "dev/static/sign => 0", so I don't have any "version15...." folder on /pub/static/.
I have cleaned all cache files and deploy all the things, what magento needs:
rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/tmp/ var/generation/ pub/static/frontend/
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:db-data:upgrade
php bin/magento dev:source-theme:deploy
php bin/magento setup:static-content:deploy
If I launch my page on firefox, I see that Magento want access to https://www.at-handel.at/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css
I checked the path and it's correct. I have ext-all.css file on this path, but Firefox/Internet Explorer/Safari don't show me. It's not only on frontend, it's also on backend - https://www.at-handel.at/arkaplan
I have also checked the permissons on /var or /pub/static/ - 755
What can I do now??? Please help me.
magento2 css
I have installed Magento 2.2 on hosted server (rewrite mod is on) and I have since 2 days a problem with .css file.
First of all, I deactivated on MYSQL static sign - "dev/static/sign => 0", so I don't have any "version15...." folder on /pub/static/.
I have cleaned all cache files and deploy all the things, what magento needs:
rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/tmp/ var/generation/ pub/static/frontend/
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:db-data:upgrade
php bin/magento dev:source-theme:deploy
php bin/magento setup:static-content:deploy
If I launch my page on firefox, I see that Magento want access to https://www.at-handel.at/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css
I checked the path and it's correct. I have ext-all.css file on this path, but Firefox/Internet Explorer/Safari don't show me. It's not only on frontend, it's also on backend - https://www.at-handel.at/arkaplan
I have also checked the permissons on /var or /pub/static/ - 755
What can I do now??? Please help me.
magento2 css
magento2 css
edited Dec 22 '17 at 15:42
Abhishek Panchal
3,4783929
3,4783929
asked Dec 22 '17 at 15:38
mertremmertrem
111
111
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Firstly, static files signing tells browsers if there are changes on the website page and instructs them to refresh their saved caches. So, it's better to leave it on. Though, not sure if it works that way on developer mode.
I presume your Magento is set to Developer mode. You don't need to run
setup:static-content:deploy
On Developer mode. Just refresh the page several times and symlinks to css/js/images/etc in pub/static/... will be created automatically.
I had a problem with css not taking effect once, it was very persistent and drove me nuts. In the end, it turned out to be browser cache. Try fully clearing your browser caches.
Make sure your css file is located in the path you have given in the css link. Place your css links in default_head_blocks.xml like:
<css src="Vendor_Modulename::css/magicmenu.css" /> <--this css will be located in appcodeVendorModulenameviewfrontendwebcss
<css src="css/styles.css" /> <--this css will be located in appdesignfrontendVendorthemenamewebcss
Thank you for your answer! I cleared my browser cache and also I have installed another browser (Chrome) and tested - no css! I don't know why I don't see any css -.-
– mertrem
Dec 23 '17 at 9:48
Please, see my updated answer. Are you sure you have given correct file path in your css links?
– Iveta Allogenes
Dec 23 '17 at 19:51
By the way, is this Magento localhost installation? Or is it deployed on live server?
– Iveta Allogenes
Dec 23 '17 at 19:53
add a comment |
On Ubuntu 16.04, using apache2 I was also facing the same issue.
Activated the mod_rewrite module with
sudo a2enmod rewrite
and restarted the apache with
sudo service apache2 restart
My issue resolved.
add a comment |
Please check if your host supports all htaccess rules; i faced this problem before and my problem solved with rewriting
<Files>
rules in pub htaccess folder and it’s worked
For example
<Files RELEASE_NOTES.txt>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
To
<Files RELEASE_NOTES.txt>
order allow,deny
deny from all
</Files>
New contributor
Ahmed Atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f206952%2fmagento-2-2-css-not-loading%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Firstly, static files signing tells browsers if there are changes on the website page and instructs them to refresh their saved caches. So, it's better to leave it on. Though, not sure if it works that way on developer mode.
I presume your Magento is set to Developer mode. You don't need to run
setup:static-content:deploy
On Developer mode. Just refresh the page several times and symlinks to css/js/images/etc in pub/static/... will be created automatically.
I had a problem with css not taking effect once, it was very persistent and drove me nuts. In the end, it turned out to be browser cache. Try fully clearing your browser caches.
Make sure your css file is located in the path you have given in the css link. Place your css links in default_head_blocks.xml like:
<css src="Vendor_Modulename::css/magicmenu.css" /> <--this css will be located in appcodeVendorModulenameviewfrontendwebcss
<css src="css/styles.css" /> <--this css will be located in appdesignfrontendVendorthemenamewebcss
Thank you for your answer! I cleared my browser cache and also I have installed another browser (Chrome) and tested - no css! I don't know why I don't see any css -.-
– mertrem
Dec 23 '17 at 9:48
Please, see my updated answer. Are you sure you have given correct file path in your css links?
– Iveta Allogenes
Dec 23 '17 at 19:51
By the way, is this Magento localhost installation? Or is it deployed on live server?
– Iveta Allogenes
Dec 23 '17 at 19:53
add a comment |
Firstly, static files signing tells browsers if there are changes on the website page and instructs them to refresh their saved caches. So, it's better to leave it on. Though, not sure if it works that way on developer mode.
I presume your Magento is set to Developer mode. You don't need to run
setup:static-content:deploy
On Developer mode. Just refresh the page several times and symlinks to css/js/images/etc in pub/static/... will be created automatically.
I had a problem with css not taking effect once, it was very persistent and drove me nuts. In the end, it turned out to be browser cache. Try fully clearing your browser caches.
Make sure your css file is located in the path you have given in the css link. Place your css links in default_head_blocks.xml like:
<css src="Vendor_Modulename::css/magicmenu.css" /> <--this css will be located in appcodeVendorModulenameviewfrontendwebcss
<css src="css/styles.css" /> <--this css will be located in appdesignfrontendVendorthemenamewebcss
Thank you for your answer! I cleared my browser cache and also I have installed another browser (Chrome) and tested - no css! I don't know why I don't see any css -.-
– mertrem
Dec 23 '17 at 9:48
Please, see my updated answer. Are you sure you have given correct file path in your css links?
– Iveta Allogenes
Dec 23 '17 at 19:51
By the way, is this Magento localhost installation? Or is it deployed on live server?
– Iveta Allogenes
Dec 23 '17 at 19:53
add a comment |
Firstly, static files signing tells browsers if there are changes on the website page and instructs them to refresh their saved caches. So, it's better to leave it on. Though, not sure if it works that way on developer mode.
I presume your Magento is set to Developer mode. You don't need to run
setup:static-content:deploy
On Developer mode. Just refresh the page several times and symlinks to css/js/images/etc in pub/static/... will be created automatically.
I had a problem with css not taking effect once, it was very persistent and drove me nuts. In the end, it turned out to be browser cache. Try fully clearing your browser caches.
Make sure your css file is located in the path you have given in the css link. Place your css links in default_head_blocks.xml like:
<css src="Vendor_Modulename::css/magicmenu.css" /> <--this css will be located in appcodeVendorModulenameviewfrontendwebcss
<css src="css/styles.css" /> <--this css will be located in appdesignfrontendVendorthemenamewebcss
Firstly, static files signing tells browsers if there are changes on the website page and instructs them to refresh their saved caches. So, it's better to leave it on. Though, not sure if it works that way on developer mode.
I presume your Magento is set to Developer mode. You don't need to run
setup:static-content:deploy
On Developer mode. Just refresh the page several times and symlinks to css/js/images/etc in pub/static/... will be created automatically.
I had a problem with css not taking effect once, it was very persistent and drove me nuts. In the end, it turned out to be browser cache. Try fully clearing your browser caches.
Make sure your css file is located in the path you have given in the css link. Place your css links in default_head_blocks.xml like:
<css src="Vendor_Modulename::css/magicmenu.css" /> <--this css will be located in appcodeVendorModulenameviewfrontendwebcss
<css src="css/styles.css" /> <--this css will be located in appdesignfrontendVendorthemenamewebcss
edited Dec 23 '17 at 19:50
answered Dec 22 '17 at 20:26
Iveta AllogenesIveta Allogenes
10011
10011
Thank you for your answer! I cleared my browser cache and also I have installed another browser (Chrome) and tested - no css! I don't know why I don't see any css -.-
– mertrem
Dec 23 '17 at 9:48
Please, see my updated answer. Are you sure you have given correct file path in your css links?
– Iveta Allogenes
Dec 23 '17 at 19:51
By the way, is this Magento localhost installation? Or is it deployed on live server?
– Iveta Allogenes
Dec 23 '17 at 19:53
add a comment |
Thank you for your answer! I cleared my browser cache and also I have installed another browser (Chrome) and tested - no css! I don't know why I don't see any css -.-
– mertrem
Dec 23 '17 at 9:48
Please, see my updated answer. Are you sure you have given correct file path in your css links?
– Iveta Allogenes
Dec 23 '17 at 19:51
By the way, is this Magento localhost installation? Or is it deployed on live server?
– Iveta Allogenes
Dec 23 '17 at 19:53
Thank you for your answer! I cleared my browser cache and also I have installed another browser (Chrome) and tested - no css! I don't know why I don't see any css -.-
– mertrem
Dec 23 '17 at 9:48
Thank you for your answer! I cleared my browser cache and also I have installed another browser (Chrome) and tested - no css! I don't know why I don't see any css -.-
– mertrem
Dec 23 '17 at 9:48
Please, see my updated answer. Are you sure you have given correct file path in your css links?
– Iveta Allogenes
Dec 23 '17 at 19:51
Please, see my updated answer. Are you sure you have given correct file path in your css links?
– Iveta Allogenes
Dec 23 '17 at 19:51
By the way, is this Magento localhost installation? Or is it deployed on live server?
– Iveta Allogenes
Dec 23 '17 at 19:53
By the way, is this Magento localhost installation? Or is it deployed on live server?
– Iveta Allogenes
Dec 23 '17 at 19:53
add a comment |
On Ubuntu 16.04, using apache2 I was also facing the same issue.
Activated the mod_rewrite module with
sudo a2enmod rewrite
and restarted the apache with
sudo service apache2 restart
My issue resolved.
add a comment |
On Ubuntu 16.04, using apache2 I was also facing the same issue.
Activated the mod_rewrite module with
sudo a2enmod rewrite
and restarted the apache with
sudo service apache2 restart
My issue resolved.
add a comment |
On Ubuntu 16.04, using apache2 I was also facing the same issue.
Activated the mod_rewrite module with
sudo a2enmod rewrite
and restarted the apache with
sudo service apache2 restart
My issue resolved.
On Ubuntu 16.04, using apache2 I was also facing the same issue.
Activated the mod_rewrite module with
sudo a2enmod rewrite
and restarted the apache with
sudo service apache2 restart
My issue resolved.
answered Nov 13 '18 at 7:41
PMBPMB
347220
347220
add a comment |
add a comment |
Please check if your host supports all htaccess rules; i faced this problem before and my problem solved with rewriting
<Files>
rules in pub htaccess folder and it’s worked
For example
<Files RELEASE_NOTES.txt>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
To
<Files RELEASE_NOTES.txt>
order allow,deny
deny from all
</Files>
New contributor
Ahmed Atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Please check if your host supports all htaccess rules; i faced this problem before and my problem solved with rewriting
<Files>
rules in pub htaccess folder and it’s worked
For example
<Files RELEASE_NOTES.txt>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
To
<Files RELEASE_NOTES.txt>
order allow,deny
deny from all
</Files>
New contributor
Ahmed Atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Please check if your host supports all htaccess rules; i faced this problem before and my problem solved with rewriting
<Files>
rules in pub htaccess folder and it’s worked
For example
<Files RELEASE_NOTES.txt>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
To
<Files RELEASE_NOTES.txt>
order allow,deny
deny from all
</Files>
New contributor
Ahmed Atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Please check if your host supports all htaccess rules; i faced this problem before and my problem solved with rewriting
<Files>
rules in pub htaccess folder and it’s worked
For example
<Files RELEASE_NOTES.txt>
<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>
</Files>
To
<Files RELEASE_NOTES.txt>
order allow,deny
deny from all
</Files>
New contributor
Ahmed Atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 2 hours ago
New contributor
Ahmed Atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 2 hours ago
Ahmed AtefAhmed Atef
364
364
New contributor
Ahmed Atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Ahmed Atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Ahmed Atef is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f206952%2fmagento-2-2-css-not-loading%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown