Jump to content

Can't Permanently Save Page Layout


Bill Dalton

Recommended Posts

I can save the change to page layout, for example add a right side column. It will save until I clear cache and then revert back to full page default.

 

I haven't yet tried adding content to the column. Perhaps that would make it stick. However, this does seem to be a bug. If I save layout as 2 column it should remain 2 column after clearing smarty.

 

PS 1.7.2.3

Default Classic

Default modules only

Link to comment
Share on other sites

Ok, already reported here, http://forge.prestashop.com/browse/BOOM-3222

 

This bug has existed from beginning. They hope to fix it by PS 1.7.3.1

 

So currently we are testing PS 1.7.2.3 - October 14, 2017

 

According to release cycle, PS 1.7.3.1 was to be released in August 2017, so we are far behind. Just have to wait it out. I need the right column on my product page. 

http://build.prestashop.com/news/announcing-our-2017-release-schedule/

Link to comment
Share on other sites

When you change the theme layout an override file is created 

 

\app\cache\prod\themes\classic\shop1.json

 

When cache is cleared \classic\shop1.json is deleted.

 

I have not yet found where the default settings for Classic are stored. Not in the database where you might expect and dosen't seem to be in theme.yml

 

So the only work around I know is if you need to change default theme columns, do not use the clear cache button. Manually delete cache files if needed.

 

If anyone knows where the code is that controls using a file in a temporary cache for settings that are important and permanent please let me know. It would be easy to have the shop1.json file written elsewhere, but the logic to use that file would need to be corrected as well.

 

Also backup \app\cache\prod\themes\classic\shop1.json if you accidently clear the cache you can restore settings by restoring \app\cache\prod\themes\classic\shop1.json with your backup. You will need to also recreate the directory "\classic\" as well.

Link to comment
Share on other sites

The good news is that themes\classic\config\theme.yml is the default settings file. Simply find this section and add the change there. For example I added "product: layout-right-column".

 

The problem I had is that .yml files seem to be very fussy about how the info is structured. When you add a new page in the list it has to be entered perfectly inline with the rest of the entry's or you'll get error 500 loading your web site. Removing the entry restores your site.

 

I basically had to cut & past one of the entry's that already existed and then edit that. Weird but a good work around until this is fixed.

 

theme_settings:
  default_layout: layout-full-width
  layouts:
    product: layout-right-column
    category: layout-left-column
    best-sales: layout-left-column
    new-products: layout-left-column
    prices-drop: layout-left-column
    contact: layout-left-column
  • Like 1
Link to comment
Share on other sites

Why does YAML forbid tabs?

Tabs have been outlawed since they are treated differently by different editors and tools.
And since indentation is so critical to proper interpretation of YAML, this issue is just too
tricky to even attempt. Indeed Guido van Rossum of Python has acknowledged that allowing TABs
in Python source is a headache for many people and that were he to design Python again, he
would forbid them.

 

http://www.yaml.org/faq.html

 

So when adding entry's use spaces not tabs.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
  • 7 months later...

Hello,

I am in 1.7.3.0 and I don't want to go through a migration to solve this so I will go for the theme.yml modifiction

Can anyone tell me how I should change the layout for the search result page?

I tried :

search: layout-left-column

But it didn't work.

Thanks for your help

Link to comment
Share on other sites

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