Jump to content

Homeslider stopped working - but I never touched it!


Recommended Posts

My homeslider has been working perfectly for weeks.

Meanwhile I've been adding products to my store.

I haven't done anything at all to the homeslider and yet suddenly the images have stopped sliding. All that can be seen is Image #1, static. 

I've looked at my store in Chrome, IE and Firefox.

All looks the same. Static slider. :(

I've temporarily taken the (unfinished) store out of maintenance mode so that I can give a link to any helpful person who can make sliders work again.

Hoping someone can help!

Edited by nocturnal (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi,

 

It's Jquery issue. I checked the log & found error

ReferenceError: $ is not defined
	

$(document).ready( function() {

So please make sure that jquery is not conflicting or not removed for your code.

 

Regards,

Alok

Hi Alok, and many thanks for your reply. I have not had any training in code and I apologise but would you mind explaining how I can fix this? I know how to cut and paste code into files on my c-panel if someone tells me which file and which code....? Thanks for reading the log I have no idea how to do that.

Link to comment
Share on other sites

Hi,

 

I compared your theme JS with prestashop default theme then found that there are lot of JS files missing. Listing them below.

		<script type="text/javascript" src="/js/jquery/jquery-1.11.0.min.js"></script>
		<script type="text/javascript" src="/js/jquery/jquery-migrate-1.2.1.min.js"></script>
		<script type="text/javascript" src="/js/jquery/plugins/jquery.easing.js"></script>
		<script type="text/javascript" src="/js/tools.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/global.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/autoload/10-bootstrap.min.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/autoload/15-jquery.total-storage.min.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/autoload/15-jquery.uniform-modified.js"></script>
		<script type="text/javascript" src="/js/jquery/plugins/fancybox/jquery.fancybox.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/products-comparison.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/modules/blockcart/ajax-cart.js"></script>
		<script type="text/javascript" src="/js/jquery/plugins/jquery.scrollTo.js"></script>
		<script type="text/javascript" src="/js/jquery/plugins/jquery.serialScroll.js"></script>
		<script type="text/javascript" src="/js/jquery/plugins/bxslider/jquery.bxslider.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/tools/treeManagement.js"></script>
		<script type="text/javascript" src="/modules/blockfacebook/blockfacebook.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/modules/blocknewsletter/blocknewsletter.js"></script>
		<script type="text/javascript" src="/js/jquery/plugins/autocomplete/jquery.autocomplete.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/modules/blocksearch/blocksearch.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/modules/homeslider/js/homeslider.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/modules/blockwishlist/js/ajax-wishlist.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/modules/blocktopmenu/js/hoverIntent.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/modules/blocktopmenu/js/superfish-modified.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/modules/blocktopmenu/js/blocktopmenu.js"></script>
		<script type="text/javascript" src="/themes/default-bootstrap/js/index.js"></script>

You can check in your theme if you applied any condition or deleted these code.

 

Thanks

Alok

Link to comment
Share on other sites

This is weird. The site has been online ever since I took it out of maintenance mode.

I've just deleted my IP address from the maintenance mode page in Preferences, then saved it, and opened website in Chrome and Firefox and I saw it both times okay.

I'm leaving it online until I can solve the mystery of the standing-still slider.

I don't know what happened, Milos, but *many* thanks for taking the time to have look. I hope it works next time you try.

 

Alok and Milos do you think I should try 're-setting' the slider? I've held off doing this in case something happens, but by the look of all those missing files Alok found, maybe the slider needs to start again from scratch!

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

[Try-to-fix #1] Dioniz, when I read your post I thought 'That's the answer!'

Because, when the slider stopped working, the only thing I had changed (apart from adding products to my store) was re-installing the Paypal Europe module.

And I had to re-install it because one day it simply disappeared without warning.

 

So I disabled the Paypal Europe module but slider still not moving. :(

 

[Try-to-fix #2] Alok, I have been going through those files you listed, one by one. They all seem to be still there, sitting on my server... not sure what's happening here, but it's a relief to see that they are still there.

 

[Try-to-fix #3] I reset the slider. Still motionless, so I restored the old one again.

 

[Try-to-fix #4] I compared the default_bootstrap files with my own theme's files.

 

public_html/themes/default-bootstrap/modules/homeslider/header.tpl

{if isset($homeslider)}
    {addJsDef homeslider_loop=$homeslider.loop|intval}
    {addJsDef homeslider_width=$homeslider.width|intval}
    {addJsDef homeslider_speed=$homeslider.speed|intval}
    {addJsDef homeslider_pause=$homeslider.pause|intval}
{/if}

 

/public_html/themes/my-theme/modules/homeslider/header.tpl

{if isset($homeslider)}
    {addJsDef homeslider_loop=$homeslider.loop}
    {addJsDef homeslider_width=$homeslider.width}
    {addJsDef homeslider_speed=$homeslider.speed}
    {addJsDef homeslider_pause=$homeslider.pause}
{/if}

 

Seeing that there was a difference between these 2 files I thought Hooray! It's the answer!

So I copied default-bootstrap/modules/homeslider/header.tpl to my-theme/modules/homeslider/header.tpl and hit 'save'.

But it didn't help. :(

 

[Try-to-fix #5] Tried the same thing, comparing bootstrap with  public_html/themes/my-theme/js/modules/homeslider/js/homeslider.js

But slider still motionless.

 

 

Anyone got any ideas?

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

I have been able to troubleshoot every PS glitch so far with the help of kind people on this forum (and I have repaid their generosity by helping others as much as I can!)

 

But I have to admit this problem has got me beat.

 

I am happy to pay someone to fix this for me.

 

Anyone want the job?

Link to comment
Share on other sites

I checked and it wasn't there! In fact the whole jquery file was missing out of the js file.

Exactly the same was missing in default-bootstrap theme, which I haven't been editing or changing at all, I just left it alone.

 

So I copied the entire file of 

jquery/plugins/bxslider/jquery.bxslider.js from public_html

 

into

 

my-theme/js/jquery/plugins/bxslider/jquery.bxslider.js     

 

But slider still not working.

 

All I have been doing since Prestashop was working nicely is adding more products. Not changing anything else, because it took so much care to set it all up and get it working nicely. I have been absolutely meticulous and careful setting up PS.

 

I have 2 more questions now.

1) How can this slider problem have happened when I didn't touch the slider files from the time it was working to the time it stopped working?

2) To add to the confusion, now suddenly most of my retail prices have dropped their tax and are showing as price before tax.Plus the product weights and measures have now changed from metric to imperial all by themselves.

 

I have not made any of these changes. One day all is well, next day, confusion. Does this mean my PS has a virus or something? Or could it mean the Paypal module is sneakily changing things behind my back? Is that even possible?

Confused!

Link to comment
Share on other sites

I'm happy to report that my homeslider has been fixed by Dioniz.

 

It was a problem in the header.tpl file of my theme.

 

Here's the fix that worked for me:

 

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}

 

Add this code:

{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}

 

Thank you to Dioniz.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...