Skip Navigation

[Resolved] Weird sidebar behaviour

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 7 replies, has 2 voices.

Last updated by nicolaS-3 3 years, 11 months ago.

Assisted by: Jamal.

Author
Posts
#1910749

Hi all,
I have created a CPT, a single custom template and add/edit forms.
The single custom template is shown on a page with a left sidebar.
The left sidebar is added as set in the Avada global options.
When I enter a new CPT post by the Toolset form, the left sidebar doesn't appear in View post mode, but if I update the post in the admin edit page then it appears.
If I enter the new post by the admin Add New page the left sidebar appears immediately in View mode.
It seems that some theme options aren't applied to posts when added by forms.
Do you think this to be a Toolset issue or an Avada issue ?
Thanks
Regards
Nicola

#1910913

Hello and thank you for contacting the Toolset support.

I wouldn't really say that this is an Avada issue before I give it a try and try to understand what's happening.

Would you like to share a copy of your website or to reproduce this issue on one of our test sites, so I can analyze what's going on? You can use the Toolset Module Manager to export/import these Toolset elements into our test site without having to build them all from scratch. After importing, you may need to create the page where the add form is used.
https://toolset.com/download/toolset-module-manager/

You can log in with this URL hidden link

#1912047

Hi Jamal,
you can access my site as admin to have a look, pls open the private info box
thanks
Regards
Nicola

#1914257

Hello Nicola, I can access your website. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

However, I won't be able to escalate any possible bugs to the developers if I don't try to reproduce the issue in a clean install. I know, that may be additional work from your side(helping reproducing the issue), but it will be the quickest way to get this handled by the developers. So, I have to kindly ask you to upload the Avada theme to the test site and reproduce the issue there.

#1915129

I don't believe you will need a license in order to install the theme, but I am willing to give it a try on a copy of your website.

Would you allow me to take a Duplicator copy of your website and analyze it locally?

#1915141

Jamal
I am not really keen to allow copies, pls try with the live site first, thanks.
Regards
Nicola

#1915677

Hello Nicola,

Because I need to browse the database, I have uploaded the Adminer script to your server and checked the database, for a newly created book, before and after saving it from the backend. The Avada theme is using a custom field(_fusion) to store different options for the post, such as the sidebar. After saving the post from the backend, the "_fusion" metadata is populated with different options as you can see in this screenshot hidden link

So, I come up with this custom code that will save, at least, the option of the sidebar. It is using the default option for the sidebar, and it seems to fix the sidebar issue:

add_action('cred_save_data', 'my_avada_settings_action',10,2);
function my_avada_settings_action($post_id, $form_data) {
    // if a specific form
    if ( $form_data['id']==2313 ){
      $settings = array(
        "posts_sidebar" => "default_sidebar"
      );
      update_post_meta( $post_id, '_fusion', $settings );
    }
}

I added this custom code to a snippet in Toolset->Settings->Custom code. Check this screenshot hidden link

I removed the Adminer script after my intervention.

Please try with a new book and check if it gives the desired outcome. Let me know if you will need this for other forms and post types.

#1916345

My issue is resolved now. Thank you!