crusin316 Posted May 3, 2021 Share Posted May 3, 2021 (edited) hello everyone, suddenly today accordion stopped working on our website. whenever u click on any other sections it doesnt seem to be opening up, any help would be really useful XXXXXXXXXXXXXXXXXXXXXXXXXXXXX we are not sure how and why it stopped working. Edited May 3, 2021 by horst removed suspicious link Link to comment Share on other sites More sharing options...
horst Posted May 3, 2021 Share Posted May 3, 2021 I removed the link. Refer to this thread and posts on how to use our support forums: Question that are not related to ProcessWire can be asked in the DEV forum, not in PW support forums. Link to comment Share on other sites More sharing options...
crusin316 Posted May 3, 2021 Author Share Posted May 3, 2021 hello, but our website is build on processwire and something stopped working there hence published in support forum for help from users on how we can fix it. Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 3, 2021 Share Posted May 3, 2021 Quoting questions from the other thread: What ProcessWire version are you using? Did you change something in the code just before the accordion stopped working? And some other questions: Who is maintaining that site? Wo built that site? Are you experienced in web development? 1 Link to comment Share on other sites More sharing options...
crusin316 Posted May 3, 2021 Author Share Posted May 3, 2021 answering your queries. What ProcessWire version are you using? - ProcessWire 3.0.42 Did you change something in the code just before the accordion stopped working? - no we havent updated the code it just stopped working. And some other questions: Who is maintaining that site? - it is maintained by us on our server. Wo built that site? - it was build by a agency couple of years ago. Are you experienced in web development? - not much but i can do basic stuff Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 3, 2021 Share Posted May 3, 2021 Ok, that's a solid starting point. I found your other post in within the link to your site here. There is one JavaScript file that might be the problem here - but is just a guess for now. It's located here: yoursite.com/site/templates/js/scripts.js In this script is a part connected to the accordion and its function starting in line 201. //////////////// Accordions /* mr = (function (mr, $, window, document){ "use strict"; var documentReady = function($){ $('.accordion__title').on('click', function(){ var accordion = $(this).closest('.accordion'); var li = $(this).closest('li'); if(li.hasClass('active')){ li.removeClass('active'); }else{ if(accordion.hasClass('accordion--oneopen')){ var wasActive = accordion.find('li.active'); wasActive.removeClass('active'); li.addClass('active'); }else{ li.addClass('active'); } } }); $('.accordion').each(function(){ var accordion = $(this); var minHeight = accordion.outerHeight(true); accordion.css('min-height',minHeight); }); }; mr.accordions = { documentReady : documentReady }; mr.components.documentReady.push(documentReady); return mr; }(mr, jQuery, window, document)); */ As you might already see here the functionality is commented out and therefore disabled (see /* in line 202 and */ in line 236). That would be my starting point for further actions. I wouldn't suggest testing it within the real live website as other things could go wrong. Do you have a testing or development version of your website? Or maybe even better still contact to that agency? 1 Link to comment Share on other sites More sharing options...
crusin316 Posted May 3, 2021 Author Share Posted May 3, 2021 awesome stuff guys the issue sovled... Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 3, 2021 Share Posted May 3, 2021 Next step here would be to find out WHY this was disabled/commented out. The same for the slider that stopped working a while back. Both weren't something that ProcessWire changes on its own. So it either didn't work for a long time or someone is still changing things on your site. Just a thought! 1 Link to comment Share on other sites More sharing options...
crusin316 Posted May 3, 2021 Author Share Posted May 3, 2021 yes we would surely need to figure out why this is happening....thanks a ton for all your help and support. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now