Bootstrap accordion only functions when admin is logged in

Hi,

I have added a simple bootstrap accordion to one of my pages but it only seems to expand and collapse when I am logged into the WordPress admin panel. This is not the first time it happened for me. When I was adding a bootstrap table to one of my pages it would not function properly. I have tested by removing all plug-ins and switching themes. It only seems to happen with X.

For the latter example I solved the issue by converting the table to a short code function but for the accordion it is not possible because it will need to be constantly changes.

Can you tell me what the issue here is as it seems to be happening over and over.

My accordion html code is in the page listed below and I activate the required bootstrap library by page id which can be found in child theme’s global _header.php file.

Hey @abolotsko,

Would you mind giving us screenshots or instruction on how to arrive to the issue? Please note that we could not guarantee a fix here since this involves custom code. We just want to know if the issue is caused by X.

The given credentials also does not work. Please check.

Thanks.

Sure. The way you see the issue is if you go to the page listed in the secure note without being logged into the site. If you try to click on the accordion tabs they do not work. If you login and visit the same page then they do. I tested the code on a test page outside the wordpress and everything is working just fine. Something is happening within the theme.

I also reset the password and updated the secure note with it. You should be able to login.

I checked everything in your site and there seems to be no issue. Would you mind clearing all caches including your browser cache? Also reset permissions in WP Engine.

Thanks.

So you saying that without logging into WP you can open and close the accordion tabs? I have tried it on a number of computers and that is not the case. Also, I had the page in question excluded from the caching path. Just got off the phone with WP Engine who confirmed that that is in fact the case.

This is not an isolated incident. Please refer to another example listed in the original ticket message.

Hey there,

I was able to replicate the issue on my end. This is happening due to couple of errors in browser’s console which is breaking the theme. Can you please check for the following first:

  1. Ensure everything is up to date according to our version compatibility list at https://theme.co/apex/forum/t/troubleshooting-version-compatibility/195. Please follow the best practices when updating your theme and plugins. See https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62 for more details.

  2. Test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  3. Remove custom CSS and JavaScript

  4. Deactivate Child Theme and activate Parent theme.

Let us know how this goes!.

Hi,

Thanks for checking. The errors are theme file errors and not my code errors. The code is just HTML and there is no JS. Also, the errors in question show up on that page when I am logged in as well and the accordion works just fine. No plug-ins are interfering with this after testing. Again, this is just HTML code that uses bootstrap library. Nothing complex there at all.

I have a demo in a few days and really need to sort it out. I understand if this was not working at all but it does work except when visited publicly. For things that have JS or do not need to be changes often I can resolve this issue by putting the code in a functions but this this its not possible.

Been using X theme for years and you used to provide accordion element in the past but since its no longer available I was forced to use my own accordion.

Please try switching to the parent theme to check if the error will be gone.

The accordion element has never been removed. Please use the Accordion element. The shortcode version is still available also.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.