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. ...
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 ...
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 ...
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 "...
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
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',...
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 ...
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/...
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-...
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
...
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: ...
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
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 ...
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, ...
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)...
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.
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 ...
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 ...
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/...
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.
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.
...
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.
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 ...
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 ...
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 ...
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 ...
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-...
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
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
windows × 80magento2 × 38
magento2.3 × 9
cron × 8
installation × 8
xampp × 8
localhost × 6
wamp × 6
magento-1.9 × 5
php × 5
error × 5
development × 5
magento-1.8 × 4
docker × 4
magento-2.1 × 3
admin × 2
magento-1 × 2
magento2.4 × 2
patches × 2
magento2.2.2 × 2
elasticsearch × 2
server-setup × 2
cli × 2
crontab × 2
static-content × 2