Jump to content

PS 1.7.6 [PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2]


Recommended Posts

I am receiving this error when trying to install a new theme (theme is compatible with PS 1.7)...:"

An unexpected error occurred. [PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2]

Any idea what this is and how I can solve this?

Stefanie

Link to comment
Share on other sites

Hi,

It is due to: Missing theme configuration file which should be in located in /config/theme.yml

You should look into that .zip file and search there for another .zip inside - sometimes there are folders like prestashop1.6 and prestashop1.7.

In this child zip should be congig/theme.yml

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 3 weeks later...
On 8/20/2019 at 3:51 AM, haunter said:

Hi,

It is due to: Missing theme configuration file which should be in located in /config/theme.yml

You should look into that .zip file and search there for another .zip inside - sometimes there are folders like prestashop1.6 and prestashop1.7.

In this child zip should be congig/theme.yml

And with this file I should? 

Since I do find it but I haven't got a clue what to do with it ...  clueless I'm indeed :P

Edited by BenjiZ (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

Hello! Anyone with a solution for this problem?

I have duplicated the Classic theme, changed the name in the config file - and still it does now show up in the backend (Design > Theme and logo).

I also tried with zipping the new theme and selected "Import from FTP". The zip is selectable, but when saving, I get this error:

PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2

Regards, Magnus

Link to comment
Share on other sites

  • 1 month later...

Solution for error:"PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2"

Unzip template. Check any zip file or folder inside if has folder "themes". Copy the template (zip file) from "themes" to your website themes location. Refresh web browser. Go back to office. Click "+add new theme". Go to section "Import from FTP". Select the archive. last step is to "Use this theme". It take some time to finish. It should work. Good luck.

Edited by DTPrint
make it easier to understand (see edit history)
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

Hello guys,

I see that lots of PrestaShop 1.7 users are facing this issue. It may have different  reasons:

  1. As mention earlier, the "config.yml" file or folder might be missing. Go to your theme zip file, check if there's a folder called "config", a file called "config.yml" should be inside this folder. If you don't see the config folder or config.yml file, you may need to contact theme developer.
  2. The other reason might be multiple-zip-files inside each other. Sometimes your theme ZIP file contains other zip files for different PS versions or etc. If so, you need to extract it and upload the correct one. The correct zip file should contain the main theme files and folders like "assets, config, dependecies,...".
  3. A bug in PrestaShop 1.7 with ZIP files! Yes there's an issue (check here) in PrestaShop (at the time I'm writing this post, the latest version is PS 1.7.6.4) with ZIP files. You may check your theme zip file and see there is no problem with the config file or folder and there are no other zip files inside your theme zip file as well but you still get this error.
    A lot of theme developers use Windows for their development workspace and do their development using XAMPP or WAMP softwares. When they finish development, they click on "Export Current Theme" and PrestaShop generates a ZIP file automatically inside theme folder. Here the issue appears, if you upload this file in anyway, you'll get "PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2" error.
    It is caused since PrestaShop allows only "application/zip file type" but when you export the theme inside Windows it is generated in "application/x-zip file type".

To solve this issue (Issue No. 3):

  • First of all, you need to download "7-zip" software. Download and install the right version based on you OS type.
  • Extract your theme zip file in somewhere on your computer.
  • Select the extracted files, right click on them, go to "7-Zip" menu and click on "Add to archive...".
  • Define a name for it like "theme.zip" and click OK button (Do not remove the .zip extension and do not use Spaces in you file name. You can use the dash (-) character instead. E.g: my-theme.zip).
  • Now upload the zip file that is generated by 7-Zip into your shop.
  • The problem is solved :)

 

Enjoy your new theme!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
On 3/24/2020 at 11:53 PM, Mehrshad Zakerian said:

Hello guys,

I see that lots of PrestaShop 1.7 users are facing this issue. It may have different  reasons:

  1. As mention earlier, the "config.yml" file or folder might be missing. Go to your theme zip file, check if there's a folder called "config", a file called "config.yml" should be inside this folder. If you don't see the config folder or config.yml file, you may need to contact theme developer.
  2. The other reason might be multiple-zip-files inside each other. Sometimes your theme ZIP file contains other zip files for different PS versions or etc. If so, you need to extract it and upload the correct one. The correct zip file should contain the main theme files and folders like "assets, config, dependecies,...".
  3. A bug in PrestaShop 1.7 with ZIP files! Yes there's an issue (check here) in PrestaShop (at the time I'm writing this post, the latest version is PS 1.7.6.4) with ZIP files. You may check your theme zip file and see there is no problem with the config file or folder and there are no other zip files inside your theme zip file as well but you still get this error.
    A lot of theme developers use Windows for their development workspace and do their development using XAMPP or WAMP softwares. When they finish development, they click on "Export Current Theme" and PrestaShop generates a ZIP file automatically inside theme folder. Here the issue appears, if you upload this file in anyway, you'll get "PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2" error.
    It is caused since PrestaShop allows only "application/zip file type" but when you export the theme inside Windows it is generated in "application/x-zip file type".

To solve this issue (Issue No. 3):

  • First of all, you need to download "7-zip" software. Download and install the right version based on you OS type.
  • Extract your theme zip file in somewhere on your computer.
  • Select the extracted files, right click on them, go to "7-Zip" menu and click on "Add to archive...".
  • Define a name for it like "theme.zip" and click OK button (Do not remove the .zip extension and do not use Spaces in you file name. You can use the dash (-) character instead. E.g: my-theme.zip).
  • Now upload the zip file that is generated by 7-Zip into your shop.
  • The problem is solved :)

 

Enjoy your new theme!

 

I have tried all of this, including downloading the 7zip software. None of them have worked for me. 😕

Link to comment
Share on other sites

On 3/25/2020 at 3:53 PM, Mehrshad Zakerian said:

Hello guys,

I see that lots of PrestaShop 1.7 users are facing this issue. It may have different  reasons:

  1. As mention earlier, the "config.yml" file or folder might be missing. Go to your theme zip file, check if there's a folder called "config", a file called "config.yml" should be inside this folder. If you don't see the config folder or config.yml file, you may need to contact theme developer.
  2. The other reason might be multiple-zip-files inside each other. Sometimes your theme ZIP file contains other zip files for different PS versions or etc. If so, you need to extract it and upload the correct one. The correct zip file should contain the main theme files and folders like "assets, config, dependecies,...".
  3. A bug in PrestaShop 1.7 with ZIP files! Yes there's an issue (check here) in PrestaShop (at the time I'm writing this post, the latest version is PS 1.7.6.4) with ZIP files. You may check your theme zip file and see there is no problem with the config file or folder and there are no other zip files inside your theme zip file as well but you still get this error.
    A lot of theme developers use Windows for their development workspace and do their development using XAMPP or WAMP softwares. When they finish development, they click on "Export Current Theme" and PrestaShop generates a ZIP file automatically inside theme folder. Here the issue appears, if you upload this file in anyway, you'll get "PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2" error.
    It is caused since PrestaShop allows only "application/zip file type" but when you export the theme inside Windows it is generated in "application/x-zip file type".

To solve this issue (Issue No. 3):

  • First of all, you need to download "7-zip" software. Download and install the right version based on you OS type.
  • Extract your theme zip file in somewhere on your computer.
  • Select the extracted files, right click on them, go to "7-Zip" menu and click on "Add to archive...".
  • Define a name for it like "theme.zip" and click OK button (Do not remove the .zip extension and do not use Spaces in you file name. You can use the dash (-) character instead. E.g: my-theme.zip).
  • Now upload the zip file that is generated by 7-Zip into your shop.
  • The problem is solved :)

 

Enjoy your new theme!

Followed these steps using 7-Zip. Worked perfectly. 

Thanks!!

Link to comment
Share on other sites

Hi, I had the same problem and solved it.  here is the probably situation that creates the error. when you download the compressed zip theme from safari or other it uncompress the zip file automatically and save it in on computer as folder and it moves the original compressed zip file in trash. don't choose the uncompressed folder and compressed it zip another time to install the theme and this doesn’t works.

Instead go to trash and recover the original compressed zip file and install it and it works. 

sonam

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 4/16/2020 at 1:39 PM, sonamdorjee said:

Hi, I had the same problem and solved it.  here is the probably situation that creates the error. when you download the compressed zip theme from safari or other it uncompress the zip file automatically and save it in on computer as folder and it moves the original compressed zip file in trash. don't choose the uncompressed folder and compressed it zip another time to install the theme and this doesn’t works.

Instead go to trash and recover the original compressed zip file and install it and it works. 

sonam

Wow, thanks for that! Such an easy fix for a messy problem! I just wanted to say that. None of the above solutions had worked for me, so thank you!

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Hello! And I meet this problem a lot of times, trying to install my theme. It caused, that the steps I do was wrong. I installed the theme without problems, following the steps from this video:

https://www.youtube.com/watch?v=LuI-ynLYlGY

Link to comment
Share on other sites

On 20/08/2019 at 03:51, haunter said:

Salut,

Il est dû à: Fichier de configuration de thème manquant qui devrait être situé dans /config/theme.yml

Vous devriez regarder dans ce fichier .zip et y rechercher un autre .zip à l'intérieur - parfois il y a des dossiers comme prestashop1.6 et prestashop1 .7.

Dans ce zip enfant devrait être congig / theme.yml

Salut, Mrci pour cette info, elle est vraiment utile.

Link to comment
Share on other sites

hi,

the error is due to a folder inside the zip, you actually need the files of the theme inside the zip.

Wrong::: Theme.zip> theme folder > theme files

Correct::: Theme.zip > Theme Files

 

Please note that you need 7zip tool to create a zip file, other wise it wont work with rar or other zip tools.

 

Regards

Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...
On 3/25/2020 at 7:53 AM, Mehrshad Zakerian said:

Hello guys,

I see that lots of PrestaShop 1.7 users are facing this issue. It may have different  reasons:

  1. As mention earlier, the "config.yml" file or folder might be missing. Go to your theme zip file, check if there's a folder called "config", a file called "config.yml" should be inside this folder. If you don't see the config folder or config.yml file, you may need to contact theme developer.
  2. The other reason might be multiple-zip-files inside each other. Sometimes your theme ZIP file contains other zip files for different PS versions or etc. If so, you need to extract it and upload the correct one. The correct zip file should contain the main theme files and folders like "assets, config, dependecies,...".
  3. A bug in PrestaShop 1.7 with ZIP files! Yes there's an issue (check here) in PrestaShop (at the time I'm writing this post, the latest version is PS 1.7.6.4) with ZIP files. You may check your theme zip file and see there is no problem with the config file or folder and there are no other zip files inside your theme zip file as well but you still get this error.
    A lot of theme developers use Windows for their development workspace and do their development using XAMPP or WAMP softwares. When they finish development, they click on "Export Current Theme" and PrestaShop generates a ZIP file automatically inside theme folder. Here the issue appears, if you upload this file in anyway, you'll get "PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2" error.
    It is caused since PrestaShop allows only "application/zip file type" but when you export the theme inside Windows it is generated in "application/x-zip file type".

To solve this issue (Issue No. 3):

  • First of all, you need to download "7-zip" software. Download and install the right version based on you OS type.
  • Extract your theme zip file in somewhere on your computer.
  • Select the extracted files, right click on them, go to "7-Zip" menu and click on "Add to archive...".
  • Define a name for it like "theme.zip" and click OK button (Do not remove the .zip extension and do not use Spaces in you file name. You can use the dash (-) character instead. E.g: my-theme.zip).
  • Now upload the zip file that is generated by 7-Zip into your shop.
  • The problem is solved :)

 

Enjoy your new theme!

Hi there,

I checked and 1 and 2 are ok is not my problem... 3 would be same if my code error is 0 instead of 2? 

The problem is when we change the customer password in admin panel.

thank you

Link to comment
Share on other sites

  • 3 weeks later...

I am receiving this :

An unexpected error occurred. [PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2] 

 

The error is occurring whether I am importing the file from my computer or from FTP.

Noting this is the first time (new shop) I've attempted to add a theme.

I've added as an attachment, the folder layout of the zip file I am uploading.   

bwtheme_folder_ss1.PNG

Link to comment
Share on other sites

On 10/13/2020 at 5:27 PM, LightSakura said:

Hi there,

I checked and 1 and 2 are ok is not my problem... 3 would be same if my code error is 0 instead of 2? 

The problem is when we change the customer password in admin panel.

thank you

I'm not sure what your problem is. The issue I mentioned is causing when you change the theme. If you get it while changing admin password, that's something else. Maybe you can solve it by upgrading to the latest version.

Link to comment
Share on other sites

19 hours ago, Ob3yDesire said:

I am receiving this :

An unexpected error occurred. [PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2] 

 

The error is occurring whether I am importing the file from my computer or from FTP.

Noting this is the first time (new shop) I've attempted to add a theme.

I've added as an attachment, the folder layout of the zip file I am uploading.   

bwtheme_folder_ss1.PNG

Well it looks like your theme is for PrestaShop 1.6 based on the structure in the attached image. You cannot install any PS1.6 themes on PS1.7 since the theme structures are completely different on these versions.

Link to comment
Share on other sites

7 minutes ago, Ob3yDesire said:

Thank you for the response, can I please clarify (example ideally) of a PS 1.7 template layout?   So I make sure I am testing correctly.

One easy way to find out, is to check the theme config file. In PS1.6 the config file is in "themename/config.xml" path and in PS1.7 the config file is inside "themename/config/theme.yml" path.

Also, you can check the compatible versions inside config files as well.

Link to comment
Share on other sites

  • 4 weeks later...

Hi guys, I have the same problem.

I spent some time to determine the error it was caused for the config.yml.

My child theme worked fine but today crashing with Error 500 in the Theme section of the backoffice..

I maked test but don't understand why with one config.yml work fine but not with other.

With this don't working and crash with Error 500:

parent: warehouse
name: warehousechild
display_name: Warehouse child theme
version: 1.0
author:
  name: "IQIT"
assets:
  use_parent_assets: true
  css:
    all:
      - id: font-awesome
        path: assets/css/font-awesome/css/font-awesome.css
        media: all
        priority: 200

modules:
   to_enable:
     - revsliderprestashop
     - iqitadditionaltabs
     - iqithtmlandbanners
     - iqitcompare
     - iqitcontactpage
     - iqitcookielaw
     - iqitcrossselling
     - iqitcountdown
     - iqitelementor
     - iqitemailsubscriptionconf
     - iqitaddthisplugin
     - iqitfreedeliverycount
     - iqitlinksmanager
     - iqitmegamenu
     - iqitpopup
     - iqitproductsnav
     - iqitproducttags
     - iqitreviews
     - iqitsearch
     - iqitsizecharts
     - iqitthemeeditor
     - iqitwishlist
     - iqitextendedproduct
     - ps_emailsubscription
     - ph_simpleblog
     - ph_blog_column_custom
     - ph_relatedposts
     - iqitdashboardnews
     - iqitsociallogin
   to_disable:
     - ps_linklist
     - ps_mainmenu
     - ps_categorytree
     - ps_featuredproducts
     - ps_searchbar
     - ps_imageslider
     - ps_customtext
     - blockreassurance
     - ps_banner
     - ps_contactinfo
     - ps_socialfollow
     
  hooks:
    modules_to_hook:
      displayNav1:
      displayNav2:
        - ps_languageselector
        - ps_currencyselector
        - iqitwishlist
        - iqitcompare
      displayTopColumn:
        - revsliderprestashop
      displayHome:
        - revsliderprestashop
        - iqitelementor
      displayFooter:
        - iqitlinksmanager
        - iqitcontactpage
      displayLeftColumn:
        - ps_categorytree
        - ps_facetedsearch
      displayProductAdditionalInfo:
        - ps_sharebuttons
        - iqitproducttags
      displayAfterProductAddCartBtn:
        - iqitwishlist
        - iqitcompare
      displayCustomerAccount:
        - iqitwishlist
      displayProductListFunctionalButtons:
        - iqitwishlist
        - iqitcompare
      displayBeforeBodyClosingTag:
        - iqitwishlist
        - iqitcompare
        - iqitpopup
        - iqitcookielaw
      displayRightColumnProduct:
        - iqithtmlandbanners
      displayReassurance:
        - iqitaddthisplugin
      displayCustomerLoginFormAfter:
        - iqitsociallogin
      displayRegistrationBeforeForm:
        - iqitsociallogin
      displayFooterBefore:
      displayCheckoutLoginFormAfter:
        - iqitsociallogin
      displayBackOfficeHeader:
        - iqitelementor
      displayCMSDisputeInformation:
        - iqitelementor
      displayBlogElementor:
        - iqitelementor
      displayProductElementor:
        - iqitelementor
      displayCategoryElementor:
        - iqitelementor
  image_types:
    cart_default:
      width: 162
      height: 162
      scope: [products]
    small_default:
      width: 100
      height: 100
      scope: [products, categories, manufacturers, suppliers]
    medium_default:
      width: 540
      height: 540
      scope: [products, categories, manufacturers, suppliers]
    home_default:
      width: 640
      height: 640
      scope: [products]
    large_default:
      width: 780
      height: 780
      scope: [products, manufacturers, suppliers]
    category_default:
      width: 1003
      height: 200
      scope: [categories]
    stores_default:
      width: 115
      height: 115
      scope: [stores]
    thickbox_default:
      width: 1920
      height: 1920
      scope: [products]


theme_settings:
  default_layout: layout-full-width
  layouts:
    category: layout-full-width
    best-sales: layout-full-width
    new-products: layout-full-width
    prices-drop: layout-full-width

dependencies:
  modules:
    - iqitadditionaltabs
    - iqitaddthisplugin
    - iqitcompare
    - iqitcontactpage
    - iqitcookielaw
    - iqitcountdown
    - iqitcrossselling
    - iqitelementor
    - iqitemailsubscriptionconf
    - iqitextendedproduct
    - iqitfreedeliverycount
    - iqitlinksmanager
    - iqitmegamenu
    - iqitpopup
    - iqitproductsnav
    - iqitproducttags
    - iqitreviews
    - iqitsearch
    - iqitsizecharts
    - iqitsociallogin
    - iqithtmlandbanners
    - iqitthemeeditor
    - iqitwishlist
    - revsliderprestashop
    - ph_simpleblog
    - ph_blog_column_custom
    - ph_relatedposts
    - iqitdashboardnews

 

But with this works fine:

parent: warehouse
name: warehousechild
display_name: Warehouse child theme
version: 1.0
author:
  name: "IQIT"
assets:
  use_parent_assets: true
  css:
    all:
      - id: font-awesome
        path: assets/css/font-awesome/css/font-awesome.css
        media: all
        priority: 200

 

My idea it's add the Image config in the config.yml but those code part crashing with error 500.

Somebody have the answer to this?
The most extrange it's I'm copy those code for the config.yml of the father theme (modules, images, layout, etc)
Very thanks

Link to comment
Share on other sites

name: classic-rocket
display_name: Classic Rocket
version: 3.0.4
author:
  name: "Prestarocket"
  email: "[email protected]"
  url: "http://www.prestarocket.com"

meta:
  compatibility:
      from: 1.7.6.5
      to: ~

  available_layouts:
    layout-full-width:
      name: Full Width
      description: No side columns, ideal for distraction-free pages such as product pages.
    layout-both-columns:
      name: Three Columns
      description: One large central column and 2 side columns.
    layout-left-column:
      name: Two Columns, small left column
      description: Two columns with a small left column
    layout-right-column:
      name: Two Columns, small right column
      description: Two columns with a small right column

assets:
  # If you're using this theme as child and you want to load
  # the parent theme assets, uncomment this line.
#  use_parent_assets: true

  # The following lines are showing how to load assets in your page
  # Uncomment and change value to start loading css or js files
#  css:
#    all:
#      - id: custom-lib-style
#        path: assets/css/custom-lib.css
#    product:
#      - id: product-style
#        path: assets/css/product.css
#        media: all
#        priority: 200
#  js:
#    cart:
#      - id: cat-extra-lib
#        path: assets/js/cart-lib.js


global_settings:
  configuration:
    PS_IMAGE_QUALITY: png
  modules:
   to_enable:
     - ps_linklist
   to_disable:
     - ps_searchbar
  hooks:
    modules_to_hook:
      displayNav1:
        - ps_contactinfo
      displayNav2:
        - ps_languageselector
        - ps_currencyselector
      displayTop:
        - ps_customersignin
        - ps_shoppingcart
      displayNavFullWidth:
        - ps_mainmenu
      displayHome:
        - ps_imageslider
        - ps_featuredproducts
        - ps_banner
        - ps_customtext
      displayFooterBefore:
        - ps_emailsubscription
        - ps_socialfollow
      displayFooter:
        - ps_linklist
        - ps_customeraccountlinks
        - ps_contactinfo
      displayLeftColumn:
        - ps_categorytree
        - ps_facetedsearch
      displaySearch:
        - ps_searchbarjqauto
      displayProductAdditionalInfo:
        - ps_sharebuttons
      displayReassurance:
        - blockreassurance
      displayOrderConfirmation2:
        - ps_featuredproducts
      displayCrossSellingShoppingCart:
        - ps_featuredproducts

  image_types:
    cart_default:
      width: 125
      height: 125
      scope: [products]
    small_default:
      width: 98
      height: 98
      scope: [products, categories, manufacturers, suppliers]
    medium_default:
      width: 452
      height: 452
      scope: [products, manufacturers, suppliers]
    home_default:
      width: 250
      height: 250
      scope: [products]
    large_default:
      width: 800
      height: 800
      scope: [products, manufacturers, suppliers]
    category_default:
      width: 141
      height: 180
      scope: [categories]
    stores_default:
      width: 170
      height: 115
      scope: [stores]
    pdt_180:
      width: 180
      height: 180
      scope: [products]
    pdt_300:
      width: 300
      height: 300
      scope: [products]
    pdt_360:
      width: 360
      height: 360
      scope: [products]
    pdt_540:
      width: 540
      height: 540
      scope: [products]

theme_settings:
  default_layout: layout-full-width
  layouts:
    category: layout-left-column
    best-sales: layout-left-column
    new-products: layout-left-column
    prices-drop: layout-left-column
    contact: layout-left-column

dependencies:
  modules:
    - ps_searchbarjqauto
 

Link to comment
Share on other sites

On 11/29/2020 at 7:52 PM, gstar said:

name: classic-rocket
display_name: Classic Rocket
version: 3.0.4
author:
  name: "Prestarocket"
  email: "[email protected]"
  url: "http://www.prestarocket.com"

meta:
  compatibility:
      from: 1.7.6.5
      to: ~

  available_layouts:
    layout-full-width:
      name: Full Width
      description: No side columns, ideal for distraction-free pages such as product pages.
    layout-both-columns:
      name: Three Columns
      description: One large central column and 2 side columns.
    layout-left-column:
      name: Two Columns, small left column
      description: Two columns with a small left column
    layout-right-column:
      name: Two Columns, small right column
      description: Two columns with a small right column

assets:
  # If you're using this theme as child and you want to load
  # the parent theme assets, uncomment this line.
#  use_parent_assets: true

  # The following lines are showing how to load assets in your page
  # Uncomment and change value to start loading css or js files
#  css:
#    all:
#      - id: custom-lib-style
#        path: assets/css/custom-lib.css
#    product:
#      - id: product-style
#        path: assets/css/product.css
#        media: all
#        priority: 200
#  js:
#    cart:
#      - id: cat-extra-lib
#        path: assets/js/cart-lib.js


global_settings:
  configuration:
    PS_IMAGE_QUALITY: png
  modules:
   to_enable:
     - ps_linklist
   to_disable:
     - ps_searchbar
  hooks:
    modules_to_hook:
      displayNav1:
        - ps_contactinfo
      displayNav2:
        - ps_languageselector
        - ps_currencyselector
      displayTop:
        - ps_customersignin
        - ps_shoppingcart
      displayNavFullWidth:
        - ps_mainmenu
      displayHome:
        - ps_imageslider
        - ps_featuredproducts
        - ps_banner
        - ps_customtext
      displayFooterBefore:
        - ps_emailsubscription
        - ps_socialfollow
      displayFooter:
        - ps_linklist
        - ps_customeraccountlinks
        - ps_contactinfo
      displayLeftColumn:
        - ps_categorytree
        - ps_facetedsearch
      displaySearch:
        - ps_searchbarjqauto
      displayProductAdditionalInfo:
        - ps_sharebuttons
      displayReassurance:
        - blockreassurance
      displayOrderConfirmation2:
        - ps_featuredproducts
      displayCrossSellingShoppingCart:
        - ps_featuredproducts

  image_types:
    cart_default:
      width: 125
      height: 125
      scope: [products]
    small_default:
      width: 98
      height: 98
      scope: [products, categories, manufacturers, suppliers]
    medium_default:
      width: 452
      height: 452
      scope: [products, manufacturers, suppliers]
    home_default:
      width: 250
      height: 250
      scope: [products]
    large_default:
      width: 800
      height: 800
      scope: [products, manufacturers, suppliers]
    category_default:
      width: 141
      height: 180
      scope: [categories]
    stores_default:
      width: 170
      height: 115
      scope: [stores]
    pdt_180:
      width: 180
      height: 180
      scope: [products]
    pdt_300:
      width: 300
      height: 300
      scope: [products]
    pdt_360:
      width: 360
      height: 360
      scope: [products]
    pdt_540:
      width: 540
      height: 540
      scope: [products]

theme_settings:
  default_layout: layout-full-width
  layouts:
    category: layout-left-column
    best-sales: layout-left-column
    new-products: layout-left-column
    prices-drop: layout-left-column
    contact: layout-left-column

dependencies:
  modules:
    - ps_searchbarjqauto
 

Very very thanks, now I can try with other config. In my theme.yml some lines are different or don't exist maybe that lines are the reason to crash with error 500 the theme section in backoffice.

Link to comment
Share on other sites

  • 1 month later...
On 3/25/2020 at 9:53 AM, Mehrshad Zakerian said:

Hello guys,

I see that lots of PrestaShop 1.7 users are facing this issue. It may have different  reasons:

  1. As mention earlier, the "config.yml" file or folder might be missing. Go to your theme zip file, check if there's a folder called "config", a file called "config.yml" should be inside this folder. If you don't see the config folder or config.yml file, you may need to contact theme developer.
  2. The other reason might be multiple-zip-files inside each other. Sometimes your theme ZIP file contains other zip files for different PS versions or etc. If so, you need to extract it and upload the correct one. The correct zip file should contain the main theme files and folders like "assets, config, dependecies,...".
  3. A bug in PrestaShop 1.7 with ZIP files! Yes there's an issue (check here) in PrestaShop (at the time I'm writing this post, the latest version is PS 1.7.6.4) with ZIP files. You may check your theme zip file and see there is no problem with the config file or folder and there are no other zip files inside your theme zip file as well but you still get this error.
    A lot of theme developers use Windows for their development workspace and do their development using XAMPP or WAMP softwares. When they finish development, they click on "Export Current Theme" and PrestaShop generates a ZIP file automatically inside theme folder. Here the issue appears, if you upload this file in anyway, you'll get "PrestaShop\PrestaShop\Core\Domain\Theme\Exception\ThemeConstraintException code 2" error.
    It is caused since PrestaShop allows only "application/zip file type" but when you export the theme inside Windows it is generated in "application/x-zip file type".

To solve this issue (Issue No. 3):

  • First of all, you need to download "7-zip" software. Download and install the right version based on you OS type.
  • Extract your theme zip file in somewhere on your computer.
  • Select the extracted files, right click on them, go to "7-Zip" menu and click on "Add to archive...".
  • Define a name for it like "theme.zip" and click OK button (Do not remove the .zip extension and do not use Spaces in you file name. You can use the dash (-) character instead. E.g: my-theme.zip).
  • Now upload the zip file that is generated by 7-Zip into your shop.
  • The problem is solved :)

 

Enjoy your new theme!

Worked for me.

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

Can someone please explain the solution to this problem.

An unexpected error occurred. [PrestaShop\PrestaShop\Core\Domain\CmsPage\Exception\CmsPageException code 0]

I am trying to install new contact form on a new cms page called withdrawal form .

Here is the HTTML Form.

https://form.jotform.com/210591835951359.

I have enable iframe on preference as directed by jotform.

but still get these error when trying to install through source code.

image.thumb.png.c503fb86226ba891d12f8504292014c3.png

 

Can anyone help me with the solution to these issue as its very urgent.

 

Thank You.

Link to comment
Share on other sites

17 hours ago, justlanded11 said:

Can someone please explain the solution to this problem.

An unexpected error occurred. [PrestaShop\PrestaShop\Core\Domain\CmsPage\Exception\CmsPageException code 0]

I am trying to install new contact form on a new cms page called withdrawal form .

Here is the HTTML Form.

https://form.jotform.com/210591835951359.

I have enable iframe on preference as directed by jotform.

but still get these error when trying to install through source code.

image.thumb.png.c503fb86226ba891d12f8504292014c3.png

 

Can anyone help me with the solution to these issue as its very urgent.

 

Thank You.

Any one with valid solution?

Link to comment
Share on other sites

  • 6 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...