Page 1 of 1

Javascript problem

Posted: Thu May 16, 2019 2:38 pm
by unet
Hello
I have a site that I need work on with two modules that have javascript. Installed a new template and the javascript stopped working. One module supposed to have a slideshow of testimonials but shows the testimonials in a list one below the another. The other module supposed to be a slideshow of two images with links but they are one below the other. ??? ??? ??? ???

Re: Javascript problem

Posted: Thu May 16, 2019 8:22 pm
by paulala
What does the web inspector tell you?

Re: Javascript problem

Posted: Fri May 17, 2019 6:14 pm
by unet
paulala wrote:
Thu May 16, 2019 8:22 pm
What does the web inspector tell you?
Hello paulala. I not sure what you mean. Do you mean right clicking on the page select Inspect?

Re: Javascript problem

Posted: Fri May 17, 2019 11:29 pm
by Webdongle
Does the problem exist with Protostar? If not then the custom Template could be the problem.

Re: Javascript problem

Posted: Sat May 18, 2019 5:16 am
by unet
Webdongle wrote:
Fri May 17, 2019 11:29 pm
Does the problem exist with Protostar? If not then the custom Template could be the problem.
Yes the problem exists with Protostar. The site was created by another developer that created a javascript file external to the site. I came in with a new template, and it has a problem with the new template.

Re: Javascript problem

Posted: Sat May 18, 2019 7:11 am
by Webdongle
unet wrote:
Sat May 18, 2019 5:16 am
... The site was created by another developer that created a javascript file external to the site. ...
How is that script linked to?

Re: Javascript problem

Posted: Sat May 18, 2019 7:18 am
by paulala
unet wrote:
Fri May 17, 2019 6:14 pm
paulala wrote:
Thu May 16, 2019 8:22 pm
What does the web inspector tell you?
Hello paulala. I not sure what you mean. Do you mean right clicking on the page select Inspect?
Yes thats what I mean. Are there any errors reported?

Re: Javascript problem

Posted: Sat May 18, 2019 2:47 pm
by unet
Webdongle wrote:
Sat May 18, 2019 7:11 am
unet wrote:
Sat May 18, 2019 5:16 am
... The site was created by another developer that created a javascript file external to the site. ...
How is that script linked to?
The javascript is a customized module, not sure how is linked, here is the code for the module:
<div class="left-side-bar">
<img class="left-side-banner" src="/templates/frontend/images/header-image-kidsfreesamples.png" alt="left side bar kidsfreesamples">
<div class="left_side_image"></div>

<div>
<div class="basket_title">$200 Gift Card to Win!</div>
<div class="basket_body">
<ul id="demo-slider3">
<li>
<a class="group" rel="gallery1" href="/templates/frontend/images/Visa-Cadeau-Large-kidsfreesamples.png"><img src="/templates/frontend/images/Visa-Cadeau-Small-kidsfreesamples.png" border="0" alt="Visa Cadeau Small kidsfreesamples" /></a>
</li>
</ul>
</div>
</div>


<div class="reviews_block">
<script src="https://www.echantillonbebe.com/api2/testimonials_en.js" type="text/javascript"></script>
</div>
</div>

Re: Javascript problem

Posted: Sat May 18, 2019 2:54 pm
by unet
paulala wrote:
Sat May 18, 2019 7:18 am
unet wrote:
Fri May 17, 2019 6:14 pm
paulala wrote:
Thu May 16, 2019 8:22 pm
What does the web inspector tell you?
Hello paulala. I not sure what you mean. Do you mean right clicking on the page select Inspect?
Yes thats what I mean. Are there any errors reported?
Yes paulala the errors are:

Uncaught TypeError: $(...).simpleSlider is not a function
at HTMLDocument.<anonymous> (promo.js:27)
at i (jquery.min.js?c3facfc65fda024bd188f8ae0590c795:2)
at Object.fireWith [as resolveWith] (jquery.min.js?c3facfc65fda024bd188f8ae0590c795:2)
at Function.ready (jquery.min.js?c3facfc65fda024bd188f8ae0590c795:2)
at HTMLDocument.K (jquery.min.js?c3facfc65fda024bd188f8ae0590c795:2)
background.jpg:1 Failed to load resource: the server responded with a status of 404 ()
bellgothicstdbold0.woff:1 Failed to load resource: the server responded with a status of 404 ()
left-side-bar.png:1 Failed to load resource: the server responded with a status of 404 ()
right-side-bar.png:1 Failed to load resource: the server responded with a status of 404 ()
LucidaSans.woff:1 Failed to load resource: the server responded with a status of 404 ()
bellgothicstdbold0.ttf:1 Failed to load resource: the server responded with a status of 404 ()
LucidaSans.ttf:1 Failed to load resource: the server responded with a status of 404 ()

Re: Javascript problem

Posted: Sat May 18, 2019 3:25 pm
by Webdongle
That does not look like a module's code. It looks more like browser output or hard coded html.

Re: Javascript problem

Posted: Sat May 18, 2019 4:31 pm
by unet
Webdongle wrote:
Sat May 18, 2019 3:25 pm
That does not look like a module's code. It looks more like browser output or hard coded html.
It is a module, it's possible to create a module with html, it's called a custom module, to create one you go to the module manager, click new, select custom, and then insert the html.

Re: Javascript problem

Posted: Sat May 18, 2019 8:19 pm
by Webdongle
Oh I thought you meant your dev created a module to your custom specifications. Simply disable the custom module and find a suitable replacement in https://extensions.joomla.org/ . Then activate it in the relevant module Position.