Issue setting active tab when using conditions in 6.1.10

Hey guys,

I’m having an issue with a website upgraded from v5 to v6.1.10 with tabs.

Each tab’s visibility is controlled by conditions.

However, the first available tab is not being selected and it should look like this.

But it looks like this instead -

You can see the page in action here;

https://thriveasone.ca/program/thriving-in-relationships/

Note, once logged in, different conditions hide these tabs and the issue can be seen.

Thanks,

Matt

Hi Matt,

Thanks for reaching out.
I have checked the page with and without logging in and the tab is selected as expected. If you are still seeing the same, there might be a cache is the reason behind it. I would suggest you check once by clearing all types of cache including the Style Cache from Cornerstone > Settings > System > Clear Style Cache and check in the incognito/private mode of the browser.

Hope it helps.
Thanks

The site is being developed in non-cached environment but I did clear the style cache as recommended. However that didn’t resolve the issue - not sure how you’re seeing this tab selected and I’m not.

This was the same for both cleared incognito Safari and Chrome.

As a temporary fix I have added the following code (In case anyone else has this issue with your the build);

window.sm_toggle = function(status, model_class, cb = '', bgclose = true) {
    setTimeout(function(){
        var id = jQuery('.' + model_class).attr('data-x-toggleable');
        var isModalOpen = window.xToggleGetState( id );
        if (status == true) {
          	window.sm_bg_close = bgclose;
            if (!isModalOpen) {
                window.xToggleUpdate( id, status );
            }
        } else {
            window.sm_bg_close = true;
            window.xToggleUpdate( id, status );
        }
        if (cb != "") cb();
    }, 100); 
}

Basic global function that enables objects in Theme.co e.g. Modals but also works on Tabs. Add a classname to the object that you want triggered active - in this case the tab itself “main_tab”

jQuery(document).ready(function() {
   sm_toggle(true, 'main_tab');
)};

I still believe there’s a bug in theme or something in your test environment - but hopefully this will be resolved when the next update comes out.

Thanks,

Matt

Hello Matt,

It’s good to know that you have patched the issue on your site. We will also forward this thread to our developers so that they can check on it as well.

Best Regards.

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