Page 1 of 1

[solved] Running Showtime and NewsSlides together

Posted: Thu Jul 11, 2013 3:54 pm
by wmdvanzyl

Code: Select all

CMS Version 	1.10.3
Showtime 		3.3
NewsSlides 	 1.2
I was trying to change the animation speed of the news slides when i noticed my Showtime slide show was no longer working. I had been using NewsSlide and Showtime modules on the site together without a problem. I thought i might accidentally have deleted the js files or meddled with the wrong file so i uninstalled and removed Showtime and redownloaded it and reinstalled it... but the problem persists!

How did i manage to break my site this much?!!!

I have noticed that using swf object works perfectly, using NivoSlider results in only a loading gif and using JQuery results in only one image being shown with no captions. Using firefub i can see that the images are there, but it is as if the javascript is not running. I don't know how i could have done this in a way that the problem persists through reinstall.

Can someone please please please guide me in some direction of where to start looking for the heck i did? I can't give access to the site as it is in development and my router has been acting up (ie NAT issues).

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Thu Jul 11, 2013 5:17 pm
by Jos
probably due to calling the jQuery library twice in your html source code.

Showtime has an option to disable it from automatically including the call to jQuery.

And please upgrade to CMSms version 1.11.7 as soon as possible

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Thu Jul 11, 2013 5:32 pm
by wmdvanzyl
I don't want to upgrade in the middle of the development and possibly introduce issues that impact on delivery date. So that will happen soon!

I saw the following in the page source:

Code: Select all

<!--LOAD SHOWTIME jQuery-->
<__script__ type="text/javascript" src="http://localhost/lig/modules/Showtime/templates/jquery/jquery-1.4.2.js" ></__script>
<__script__ type="text/javascript" src="http://localhost/lig/modules/Showtime/templates/jquery/jquery.cycle.all.min.js" ></__script>
<!--END SHOWTIME-->

Code: Select all

<div id="content"><!-- Displaying News Module -->
	<__script__ src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></__script>
	<__script__ src="modules/NewsSlides/Linking/js/slides.min.jquery.js"></__script>
Toggling the "Load jQuery script" option in Showtime results in:

Code: Select all

<!--LOAD SHOWTIME jQuery-->
<__script__ type="text/javascript" src="http://localhost/lig/modules/Showtime/templates/jquery/jquery.cycle.all.min.js" ></__script>
<!--END SHOWTIME-->
I noticed that when i do a Ctrl-F5 i can see it iterating through the images very quickly, but stops at the last one.

Any suggestions on how i go about debugging this or a path to recovery?

*** EDIT - OK found something interesting. If i remove the line:

Code: Select all

<__script__ src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></__script>
and tell Showtime to load JQuery, it works perfectly (the slide show i mean) and then the news slider stops working.

So perhaps i was under the illusion that they both worked at the same time? I see the one uses 1.5.1 and the other 1.4.2

Is that the problem? I am not a JQuery expert - it is literally the next thing i am planning on learning. I choose to use these modules to gain access to the functionality in a no-fuss way. Can this version problem be resolved or what do you advise?

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Thu Jul 11, 2013 6:26 pm
by Dr.CSS
You have to look in page source to make sure one of the scripts dependent on jquery isn't above it, always need jquery script first then other scripts after it...

It would help to have a link to the page...

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Thu Jul 11, 2013 7:41 pm
by wmdvanzyl
Dr.CSS wrote:It would help to have a link to the page...
It would, wouldn't it. :p I'll try sort out my router issues and get it out there in the wild. Is there another way? Perhaps there is free hosting to where i can push this site? :D

So you don't think the versions have anything to do with it? It calls the jQuery library before any other jquery plugin call, but the two modules require different versions of jquery by the looks of things.

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Thu Jul 11, 2013 11:04 pm
by paulbaker
You should call jquery once - the later of the 2 versions. Difficult to tell what's going on without seeing the HTML generated.

And IMHO it's easier upgrading a site whilst in development than messing with a live site.

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Fri Jul 12, 2013 6:23 am
by wmdvanzyl
I wasn't going to deploy it before i did the upgrade. Just wanted to finish the development first. However, i fear i might be making one one those tragic programming errors by putting off this upgrade and since a lot of you feel the upgrade should take precedence, i will embark on that journey first.

Any upgrade guides around?

*** EDIT: Got it. http://docs.cmsmadesimple.org/upgrading

*** EDIT: OK Upgrade complete... and the result:
NewsSlides 1.2 Maximum CMSMS Version Supported = 1.10.9
Installed
Damn. Suggestions welcome. So what can i use to get a news slide effect going with my limited jQuery knowledge?

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Fri Jul 12, 2013 12:02 pm
by paulbaker
What exactly does NewsSlides do? (Not clear from forge and never used it). There may well be a suitable alternative.

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Fri Jul 12, 2013 1:11 pm
by staartmees
It looks like ShowTime has the same capabilities.

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Fri Jul 12, 2013 6:38 pm
by Dr.CSS
I use simple jquery/cycle to do news slides...

http://how-i-did-that.com/cgblog/3/15/S ... oller.html

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Fri Jul 12, 2013 9:27 pm
by wmdvanzyl
paulbaker wrote:What exactly does NewsSlides do? (Not clear from forge and never used it). There may well be a suitable alternative.
NewsSlide just did all the jQuery work for. It provided a news summary template and a css that i linked and my news snippets would start scrolling.
staartmees wrote:It looks like ShowTime has the same capabilities.
Thanks - will check it out.

Dr.CSS wrote:I use simple jquery/cycle to do news slides...

http://how-i-did-that.com/cgblog/3/15/S ... oller.html
Maybe jQuery isn't as tough as i pictured it :p I think i just need to get my head around the structure and everything will fall in place. I tried your suggestion, it wasn't even that hard. Right now i have my updated cmsms site minus news slider module and my news slides are scrolling nicely - as well as the Showtime slide show! Great!! .... BUT it only works on the home page...

...on any other page jQuery doesn't work and the news slides just become listed in the left hand column (where they are supposed to slide). I know what your thinking - no showtime on the other pages so no jquery call. Also thought that. Added a jquery call to the template and stopped Showtime from calling it. Same results. It's as if jquery only works on my home page, but the code around the news area is exactly the same - just the content changes. Makes no sense. Will sort out router issues soon to try and let you in. :)

Thanks for all the help - i really appreciate it.

Re: I broke my site! Running Showtime and NewsSlides togethe

Posted: Tue Jul 30, 2013 11:47 am
by wmdvanzyl
In an attempt to solve this issue i am trying to get this site out there so that i can show you what happens, but that has now also ran into problems:

http://forum.cmsmadesimple.org/viewtopi ... =3&t=67378

I think i'll suspend this thread, solve the other issue irst and then post a new thread. :(

[solved] Running Showtime and NewsSlides together

Posted: Thu Aug 01, 2013 12:11 pm
by wmdvanzyl
Dr.CSS wrote:I use simple jquery/cycle to do news slides...

http://how-i-did-that.com/cgblog/3/15/S ... oller.html
Using your code sample i have sliding news articles and a working Showtime slide show as can be seen here. So i know it's possible in principle. All i have to do now is cut out any code that is causing the site in question to fail. Thanks for the assist. :)