Skip Navigation

[Resolved] Can't save elements in models created with Visual Composer

This support ticket is created 6 years, 6 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: Asia/Hong_Kong (GMT+08:00)

This topic contains 16 replies, has 3 voices.

Last updated by fifthI 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#580083
vc.png

Hi,

I'm using the Jupiter theme that comes with Visual Composer 5.2.1 and Views beta 2.5b4 (it did the same thing with Views 2.4). I switched one of my "model" to use Visual Composer, but I don't know if it's a plugin conflict or what, but I can't save the modifications I make on a row (and it misses a lot of options) nor use the Text element. Is this a bug with that version of Visual Composer or else?

I'll give you login credentials if needed in a private message...

Nelson

#580116

Dear Nelson,

I tried the credentials you provided in post:
https://toolset.com/forums/topic/cant-save-elements-in-models-created-with-visual-composer/#post-580083

When I open URL:
hidden link
It redirect me to URL:
hidden link

So I can not login your website, and not sure what happened in your website.

And suggest you check these in your website:
1) It is not recommended to use beta version of Views plugin in a live production website, please try with the latest stable version of Views plugin 2.4.1, you can download it here:
https://toolset.com/account/downloads/

2) deactivate other plugins and switch to original "Jupiter theme", and test again

3) If the problem still persists, please make sure the credentials you provided is valid:
https://toolset.com/forums/topic/cant-save-elements-in-models-created-with-visual-composer/#post-580083

And describe detail steps for how and where I can see the problem:
but I can't save the modifications I make on a row

I need to test and debug it in a live website, thanks

#580207

Hi,

This is not a live site and I did the same thing when I had version 2.4.1, that's why I upgraded to the beta version to see if it was fixed...

I have deactivated all plugins except VC and toolset ones and it does the same thing... I have re-enabled them, since I'm not the only one working on the site...

I have deactivated the security feature, so you can login at hidden link

Thank you.

#580432

Now, I can login your website, Please describe detail steps for how and where I can see the problem:
but I can't save the modifications I make on a row
Thanks

#580735

For example, if I go to Content Template and choose partenaire_VC, which uses Visual Composer, when I click on a row, it opens an empty box. I need to click on the second tab and then the first one to have something in it... and all the switch toggle are gone, if I add a class, it doesn't keep it since clicking on the save button do nothing...

Same thing if I add a text block: need to click on the second tab and then the first one, and the editor doesn't have the TinyMCE toolbar and nothing is saved...

P.S. We have now moved the site to the root, so the site's URL is not groupe-parc.com and the login groupe-parc.com/wp-login.php

Thank you,
Nelson

#580951
vc.JPG

The URL you mentioned above is not valid:
URL: groupe-parc.com/wp-login.php redirect me to
groupe-parc.com
Then I can not login your website or see the problem.

So I tried the duplicator package you provided:
https://toolset.com/forums/topic/cant-save-elements-in-models-created-with-visual-composer/#post-580083
There isn't file installer.php, so I tried to duplicate same problem manually:
1) copy the plugin folder "js_composer_theme" from the duplicator package to my local website
2) Activate only the latest version of Views plugin 2.5 + WPBakery Visual Composer (Modified Version) 5.2.1 + wordpress default theme 2017,
3) Create a content template, edit it with visual-composer, add a row, add a text block, it works fine,
4) Then I activate your theme jupiter-child, test step 3 again, I see a lots of JS errors in Chrome console, for example:
Uncaught ReferenceError: mk_toggle_option is not defined
theme_backend_localized_data is not defined

See screenshot vc.JPG

Can you confirm we are talking about the same problem? which is a compatibility problem between your theme "Jupiter" and Views plugin

#581180

Sorry for the problems... Could it be a cache issue? Because I can login from both hidden link and hidden link... I tried from an incognito window and it worked fine as well...

I recreated another Duplicator file, since the other one was pointing to the wrong directory...
You have the archive: 20171019_parc_7d839a4fe3635c0e8479171023140042_archive.zip
The database (if needed): 20171019_parc_7d839a4fe3635c0e8479171023140042_database.sql
The installer: 20171019_parc_7d839a4fe3635c0e8479171023140042_installer.php
And a JSON file: 20171019_parc_7d839a4fe3635c0e8479171023140042_scan.json
But I also added installer.php in case...

Now, for the problem: Yes, I can confirm that I have the same error as you have in the console and that it works fine if I activate another theme... So, like you said, probably an incompatitility between the theme and Toolset... Strange since it's a popular theme, but nevertheless... Don't know if they modify VC (like other theme does) and it's simply the theme itself...

Is this something that can be fixed? In the worst scenario, MAYBE I can deactivate the theme, do my modifications and reactivate the theme after (since it's not live yet), but that's not ideal... I know that sometimes, just by adding some code to the function.php file it can be fixed...

Thank you for your help!
Nelson

#581360

Thanks for the confirmation, I am trying to debug it in my localhost, will feedback if there is anything found

#581396

There isn't existed workaround, here is what I found, the problem is compatibility problem between Views plugin and theme "Jupiter", and you can fix the problem by disable custom JS and CSS codes from your theme file, for example, add below codes into your theme/functions.php:

if(is_admin()){
	remove_action('vc_mapper_init_before', 'mk_visual_composer_mapper', 10 );
}
#581656

Thanks a lot Luo!

Strangely, though, it only works if I put it in the main functions.php, not if I put it in my child theme... Any solution to make it work from the child theme, so I don't have to put it again after updating the theme?

#581790

You can modify the PHP codes as below:


add_action( 'after_setup_theme', 'remove_mk_visual_composer_mapper' );
function remove_mk_visual_composer_mapper(){
	remove_action('vc_mapper_init_before', 'mk_visual_composer_mapper');
}

And test again, more help:
https://codex.wordpress.org/Plugin_API/Action_Reference/after_setup_theme

#582009

Works perfectly well!

Thank you soooo much Luo!

Unfortunately, the main reason I wanted to use VC in a model was to use a full width row and, for a reason I don't know, it doesn't work... But anyway, it will surely serve me someday since we're using Jupiter often.

Thanks again,
Nelson

#582143

Unfortunately, we realized later on that the last code you provided was breaking the theme's shortcodes: hidden link

So, I had to disable it...

Please note that if you ever want to go back to the site to do some testing, I have reactivated the security features, so the login is /connexionintranet and you'll need to use one of those authentication key on the next screen:
34833348
40744488
64229609

Thank you.

#582250

I can test it in my localhost, in your case you can modify the PHP codes as below:

add_action( 'after_setup_theme', 'remove_mk_visual_composer_mapper' );
function remove_mk_visual_composer_mapper(){
	if(is_admin()){
		remove_action('vc_mapper_init_before', 'mk_visual_composer_mapper');
	}
}

It will disable them only in admin side.

#582452

It does work, but it disables all the additional elements that Jupiter adds to VC...

So, I guess what I'll have to do is comment out this code, uncomment it when I need to work in toolset and comment it again after... Unless you have another magical trick...

Thank you for all your work.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.