en Jump to content
  • 0
Wesleyva

PS 1.6.0.8 Theme problem

Question

Hello,

 

I have got a problem with my themes after the upgrade to 1.6.0.8. When i select the defealt theme everything works fine. But when i select my custom theme my navigation dropdown is broken. And all the others links and roll-overs doesn't work correct anymore...

 

Greets,

Wesley 

Share this post


Link to post
Share on other sites

18 answers to this question

Recommended Posts

  • 0

Were you at 1.5 before the update? Make sure your custom theme is compatible with 1.6. (1.5 theme will not work) Check with your theme developer and see if they have a version updated for 1.6

Share this post


Link to post
Share on other sites
  • 0

Dear Whispar1 i came from 1.6.0.6. and made the theme by my own by only editeting the css styles. It looks like some Javascript is broken but i havent changed anything.  

Share this post


Link to post
Share on other sites
  • 0

Check if you have bottom code in your templates header.tpl:

{if isset($js_defer) && !$js_defer && isset($js_files) && isset($js_def)}
    {$js_def}
    {foreach from=$js_files item=js_uri}
    <script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script>
    {/foreach}
{/if}

If not, put it just after this code:

{if isset($css_files)}
    {foreach from=$css_files key=css_uri item=media}
        <link rel="stylesheet" href="{$css_uri|escape:'html':'UTF-8'}" type="text/css" media="{$media|escape:'html':'UTF-8'}" />
    {/foreach}
{/if}

Share this post


Link to post
Share on other sites
  • 0

in addition - is there any chance to see it live? i mean, website with error in menu module?

I have used the rollback option but right now i have updated it again. See www.koixl.com for the problem

Share this post


Link to post
Share on other sites
  • 0

I have used the rollback option but right now i have updated it again. See www.koixl.com for the problem

Okay i am getting close... i have copied the topmenu.js from the defealt theme to my custom theme and it is almost working correctly. For one reason the css has been changed a little bit... One subcat hase been moved to another position without chancing the css... Not the biggest problem but i am asking myself why to update anymore. Everytime i have got this little bugs over again.

 

Sorry for the bad english... We have got more footbal skills... :D  :D  :D 

 

Greets,

Wesley 

Share this post


Link to post
Share on other sites
  • 0

Hi,

 

Did someone find a solution ?

 

I am in the same situation : after upgrading from 1.6.0.5 to 1.6.0.8, my theme does not work correctly anymore, like if JS was disabled : no more rollover menu, no more popup galleries on product page, etc.

 

The theme was bought on Prestashop Addons 10 days ago, from a certified developer, so I think the mistake probably is on Prestashop... What happened to the JS between 1.6.0.5 and 1.6.0.8 ???

Share this post


Link to post
Share on other sites
  • 0

I had the same exact problem. After upgrading my staging server from 1.6.0.6 to 1.6.0.8 my top menu, slider and other JS related modules did not function properly in the FO. Viewing the source of my FO homepage revealed that all of my previous JS scripts (including jQuery) were missing!

 

It was dioniz solution here that helped me discover the cause of the missing JS. My custom edited theme (copied from Bootstrap v1.6.0.6) now seems to work, but I am planning to take a more comprehensive approach.

 

I'm using an awesome free tool (https://sourcegear.com/diffmerge/) to do the following:

  1. Compare for changed files between Bootstrap v1.6.0.6 theme and my custom theme, so I know what I changed (mostly .tpl)
  2. Start with latest Bootstrap theme and replicate above changes, so I'll have all new / changed functionality

Not doing the same for CSS.. WAAAY too many changes to do that!Hope this helps.

Share this post


Link to post
Share on other sites
  • 0

Hi Rom

I follow your advice solution 1 and i fix my problem but what is better the solution 1 or 2

and if is 2 can you explain what to modify to header tpl

Regards

Share this post


Link to post
Share on other sites
  • 0

Nice find guys! It's effort like this and, most importantly, reporting back when you find a solution solutions that makes this work for others - bravo!

Share this post


Link to post
Share on other sites
  • 0

Rom, I can't believe they added a feature to disable moving JS to the bottom.. I had a piece of tracking code for my Marketing Automation system (www.getrainmaker.com) that had to stay intact and it took me a WEEK to make class override to skip that one.. All that work for nothing!! LOL

Share this post


Link to post
Share on other sites
  • 0

Yan, since I'm online, I'll try to explain until Rom is able to respond—I know what it's like waiting when you have an issue :/

 

Prior to introducing the setting: Advanced settings > Performance, activate "Put JS at the end", PS always moved JS files and inlined scripts to the bottom of the page, even if you added them to header.tpl.

 

I expect if you enable the above, that functionality will continue. And if you disable, I expect any JS added to header.tpl (or anywhere else) will stay there, unchanged.

Share this post


Link to post
Share on other sites
  • 0

With js files at the end, sites are loading faster and your site will load even if external js fail to load.

Some theme's and modules didn't work with js at the end and there were many complaints about that.

That's why they made ti this way so you can have js at the beginning or at the end of file.

But to for that to work, they had to add code to header.tpl.

And if you made custom theme before 1.6.0.8, you need to add that code to your custom theme.

Share this post


Link to post
Share on other sites
  • 0

dioniz, just FYI for everyone: what happened to me was that my custom theme of course did not have the new code in header.tpl that PS 1.6.0.8 now uses for JS deferral and the result was NO JS anywhere in the FO, assuming the default setting of the new Advanced settings > Performance > "Put JS at the end" setting as I didn't even know it was added.

 

This must be breaking many people's themes as the default settings result in no JS at all!

Share this post


Link to post
Share on other sites
  • 0

Hi Yan,

 

I stopped at solution 1, but about solution 2 this is what I understood :

 

On the topic I found, they give the code lines to add in themes/yourtheme/header.tpl :

http://www.prestashop.com/forums/topic/338300-solved-1607-no-js-files-loaded/#post_id_1707846

( message #8 from "El Patron" )

It seems those lines appeared recently in Prestashop and its default theme, and if you do not add them to your custom theme, you will get no JS at all.

In message #11, Dioniz explains the exact place to insert those lines

 

 

Solution 1 vs 2 :

 

If S1 works with your theme, go for it !

Like Abdulk & Dioniz explained, moving JS at the bottom of the code is a good habit to accelerate the rendering of a page, especially on mobile devices with slow connections and/or limited processing power...

 

If your theme just cannot work this way, then go for solution 2.

 

+ Solution 1.5 ( for your Marketing Automation system, Abdulk ?): I know it is not clean coding, but if you only need to include a specific JS file at the beginning of your code, you can still "hardcode" it alone in header.tpl, and let the rest at the bottom !

Share this post


Link to post
Share on other sites
  • 0

abdulk, i had same problem with my theme as you and many people did. I'm talking here about that matter so as many people can see it and not loose hours of work.

Share this post


Link to post
Share on other sites

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More