Hot answers tagged

60 votes
Accepted

Magento 2 CSS and JavaScript not loading from correct folder

SOLUTION # 1 (IF YOU WANT TO EDIT XML FILE) I would like you to download Magento 2 zip from magentocommerce.com/download with sample data, create a new db in phpmyadmin, extract zip in htdocs folder. ...
Fayyaz Khattak's user avatar
52 votes
Accepted

Invalid template file magento2.3.0

Yes, This is the problem with windows. Windows uses "\" as separator, the array "directories" contains entries with "/" as separator, so the check will always fail. So you need to fix this by ...
Saurabh Dwivedi's user avatar
22 votes

Invalid template file magento2.3.0

For me, solution worked is by going to the file \vendor\magento\framework\View\Element\Template\File\Validator.php and replacing the below function definition as below: protected function ...
Tejas Vyas's user avatar
17 votes

Magento 2 CSS and JavaScript not loading from correct folder

you just need to update the apache2.conf file. On Ubuntu 16.04 Open and edit the file /etc/apache2/apache2.conf Navigate to the place in the apache2.conf file <Directory /var/www/> Change "...
S.A's user avatar
  • 171
14 votes

Magento 2 CSS and JavaScript not loading from correct folder

For me it was simply because mod_rewrite wasn't enabled. sudo a2enmod rewrite and service apache2 restart
Haim's user avatar
  • 2,114
13 votes

Magento 2 CSS and JavaScript not loading from correct folder

Here is the simplest solution if showing version name in css path like : pub/static/version323334/ then run this query in mysql INSERT INTO core_config_data (path, value) VALUES ('dev/static/sign',...
Surendra Kumar Ahir's user avatar
13 votes
Accepted

Magento 2 : Running magento 2 on windows using windows subsystem for Linux (WSL)

Introduction: The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop ...
Vivek Kumar's user avatar
  • 4,965
11 votes

Magento 2 CSS and JavaScript not loading from correct folder

If you are facing problem of css and js page load design after installation in magento2 please follow the following step-: open the terminal and navigate to magento web root $ cd /var/www/html/...
Arvind's user avatar
  • 119
8 votes
Accepted

Magento 2: Unable to write file into directory. Access forbidden

I just updated to Magento 2.1.6 on Windows and had this same issue. I did a little searching and came across a post on Github here. In a nutshell you need to do two things in vendor/magento/module-...
Mike Levy's user avatar
  • 775
7 votes

Magento 2 CSS and JavaScript not loading from correct folder

I had the same issue resolved by adding sudo nano /etc/apache2/apache2.conf Modify this <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None ...
Chaitanya's user avatar
  • 107
6 votes
Accepted

Magento Module - Linux Vs Windows?

the only thing you should pay attention to is not having class names with uppercase letters inside the class path. This works on both: Namespace_Module_Model_Classname. This may fail on linux: ...
Marius's user avatar
  • 198k
6 votes

Invalid template file magento2.3.0

Magento 2.3 does not support windows. You can find my solution here: enter link description here
Vincent's user avatar
  • 61
5 votes

Magento 2 CSS and JavaScript not loading from correct folder

Try to disable cache if you do not disable it before Make sure you have the latest version of Magento with clean code. If you modify or customize something make sure fix all errors. Run several ...
mrtuvn's user avatar
  • 3,263
4 votes

Css and Js files are not loading in admin panel and storefront

Follow below steps: Make new static folder under pub folder and copy .htaccess file from old pub/static folder to new static folder. Run query in database : INSERT INTO core_config_data (scope, ...
mighty_hk's user avatar
  • 693
4 votes

Invalid template file magento2.3.0

In Magento 2.2.9 replace /vendor/magento/framework/View/Element/Template/File/Validator.php isPathInDirectories function code with this code protected function isPathInDirectories($path, $directories)...
Sanaullah Ahmad's user avatar
3 votes

Magento 2 CSS and JavaScript not loading from correct folder

In my case I accidentally deleted .htaccess file from ROOT/pub/ and ROOT/pub/staticfolders. Then it is started working when I revert it back.
Elavarasan's user avatar
3 votes

Invalid template file magento2.3.0

It's the core issue of not just Magento 2.3.0, but I faced that problem in Magento 2.2.7 as well. In order to make the code work on windows instead of using realpath just use the $path argument passed ...
Magebuddies's user avatar
2 votes

Magento 2 CSS and JavaScript not loading from correct folder

Solved !!! Run following commands in CLI interface of your Magento2 root folder: php bin/magento setup:static-content:deploy php bin/magento indexer:reindex Then delete var folder by this command ...
Mukesh Prajapati's user avatar
2 votes

Indexers invalid and cron job notification

You have to run indexing command. if you are using windows than run below command in cmd. you have to run these commands in your magento root directory: php bin/magento indexer:reindex php bin/...
Chintan Kaneriya's user avatar
2 votes

Indexers invalid and cron job notification

you have issue of indexing. You can indexing using cli, Commnad php magento indexer:reindex After successfully run indexing , your issue are gone. Thanks.
Rakesh Jesadiya's user avatar
2 votes

Indexers invalid and cron job notification

reindex magento2 using command Your path like var\www\html\magento2\bin Now You have to enter command sudo php magento indexer:reindex Show your index management all indexes are re-indexed. ...
Denish Vachhani's user avatar
2 votes

Indexers invalid and cron job notification

You can create cron.bat file like this @echo off cls :start echo This is a loop cd %magento_root% bin/magento cron:run sleep 10 goto start to emulate cron.
KAndy's user avatar
  • 20.7k
2 votes

Indexers invalid and cron job notification

You must configure a cron.job in your server to automate a some internal tasks like reindexing, email sending and cleaning between others, there is 3 cron jobs in magento2 you will find all ...
MauroNigrele's user avatar
  • 3,005
2 votes

Does ANYONE run Magento 2 on Windows 7?

Yes, I'm using 7. I would recommend against using xampp with m2 because even when you do get it working, it's too slow. I've had the best results using a vagrant box from Alan Kent available here ...
Aaron Allen's user avatar
  • 8,969
2 votes
Accepted

How to use modman in windows for xampp server

modman does not work on Windows. For Windows you can use the modman-php port, it's not super stable on all platforms, but it works on Windows. But you have to run it with permissions to create ...
Fabian Schmengler's user avatar
2 votes

is it possible to install magento on iis server?

According to the Magento System Requirements IIS is not supported out of the box by Magento: Operating System : Linux x86-64 Web Server: Apache 2.x Nginx 1.7.x However, it seems like some people ...
Raphael at Digital Pianism's user avatar
2 votes

Magento 2: Unable to write file into directory. Access forbidden

There is a simple way to solve this issue: in vendor/magento/module-catalog/Model/View/Asset/Image.php:226 remove the 'DIRECTORY_SEPARATOR' private function getRelativePath($result) { $result = $this-...
Jitendra Mohanta's user avatar
2 votes

Css and Js files are not loading in admin panel and storefront

Run Commands from your Magento root directory php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f
Ashna's user avatar
  • 518
2 votes

Invalid template file magento2.3.0

As mentioned the issue is Windows compatability. But I would recommend to change it a bit differently to work even when migrating systems, e.g. for local development on Windows and later deployment on ...
Christian's user avatar
2 votes

How to solve Magento 2.3 Sample Data Installation RuntimeException Error in Windows 7?

Give write permission to the generated folder. If in windows right click the generated folder and remove the read-only flag. or if in linux. Go the magento root folder and run this command. sudo ...
Muhammad Mannan Masood's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible