Jump to content

Error installing theme


Recommended Posts

Hi,

I'm have trouble installing a new theme, based on the 'classic' theme.

When i make a copy of the classic theme and try some minimal changes (for replicating the error):
- rename folder to classic2
- change config.yml (name: classic2, display_name: Classic2)
- zip to classic2.zip and use 'import from ftp' to add this new theme

I get the following error:

This theme is not valid for PrestaShop 1.7

Warning on line 340 in file **/src/Core/Addon/Theme/ThemeManager.php
[2] file_get_contents(**/app/cache/dev/sandbox/5b0976d81cfdc//config/theme.yml): failed to open stream: No such file or directory

Notice on line 49 in file **/src/Core/Addon/Theme/Theme.php
[8] Undefined index: name

I'm i doing something wrong?

 

Thnx

Edited by John-nl (see edit history)
Link to comment
Share on other sites

  • 8 months later...
On 5/26/2018 at 6:14 PM, John-nl said:

Hi,

I'm have trouble installing a new theme, based on the 'classic' theme.

When i make a copy of the classic theme and try some minimal changes (for replicating the error):
- rename folder to classic2
- change config.yml (name: classic2, display_name: Classic2)
- zip to classic2.zip and use 'import from ftp' to add this new theme

I get the following error:

This theme is not valid for PrestaShop 1.7

Warning on line 340 in file **/src/Core/Addon/Theme/ThemeManager.php
[2] file_get_contents(**/app/cache/dev/sandbox/5b0976d81cfdc//config/theme.yml): failed to open stream: No such file or directory

Notice on line 49 in file **/src/Core/Addon/Theme/Theme.php
[8] Undefined index: name

I'm i doing something wrong?

 

Thnx

How did you solved it?

Link to comment
Share on other sites

  • 7 months later...

Hi,

I had the same problem.
The errors are not very informative, misleading even.
The solution was found by checking the compressed classic.zip: you see only content, not the main classic folder.

So the problem in my case was that i zipped the main directory with the content, instead of only the content of the theme


To do it right: 

  1. Export the classic file from the admin interface
  2. Unzip it to "classic" folder
  3. Go to the /config folder and change in the config.yml the name and display_name  ("classicplus")
  4. Go up one directory level (so you are now in root of the "classic" folder)
  5. Select all files and folders
  6. Compress to zip, with the name for file as given in the namefield ("classicplus.zip")
  7. That file you can upload as a theme

Hope this helps someone!

  • Like 1
Link to comment
Share on other sites

  • 10 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...