Blank Page when saving Post after updating to Framework 2.0.8 and Smart 1.0.3
This support request was posted in Smart by _DeLeeuw_
- _DeLeeuw_ November 16, 2017 at 9:34 am
Hello there!
After updating the Smart theme and Framework I am getting a blank page when updating a post via the Back-End WPBakery Page Builder. The page however is saved properly and when I visit the Page Editor again, everything is updated.
WP Debug is telling me the following:
PHP Fatal error: Uncaught Error: Call to undefined function nice_theme_size_button_class() in … wp-content/themes/smart/includes/plugin-integrations/visual-composer/templates/vc_button.php:75
Stack trace:
#0 …/wp-content/plugins/js_composer/include/classes/shortcodes/shortcodes.php(473): include()
#1 …/wp-content/plugins/js_composer/include/classes/shortcodes/shortcodes.php(453): WPBakeryShortCode->loadTemplate(Array, ‘Get Started Tod…’)
#2 …/wp-content/plugins/js_composer/include/classes/shortcodes/shortcodes.php(565): WPBakeryShortCode->content(Array, ‘Get Started Tod…’)
#3 …/wp-content/plugins/js_composer/include/helpers/helpers.php(1304): WPBakeryShortCode->output(Array, ‘Get Started Tod…’)
#4 …/wp-content/themes/smart/includes/plugin-integrations/visual-composer/templates/vc_button.php on line 75Could you take a look at this?
Cheers,
FlorisJuanfra Aldasoro November 16, 2017 at 2:11 pmHi,
Thank you for writing, I hope you are doing well.
Would you please tell me what version of Visual Composer are you currently using?
I’ve been trying to reproduce the issue in my local environment but I was unable to do it with my current setup. Would you be so kind of sharing your access details with us? (Please do it in a private reply).
Thank you,
Juan.Juanfra Aldasoro November 16, 2017 at 5:55 pmHi Floris,
Thank you for the follow-up and thank you for sharing your details with me.
I’ve been checking your site and it seems that when the page editor is submitted, the post id parameter (you can check that at the URL) disappears.
Is this happening when editing that page only? We weren’t able to reproduce the issue anywhere else.
Thank you,
Juan._DeLeeuw_ November 16, 2017 at 7:11 pmIt happens on multiple pages with a specific combination of VC elements. I isolated those elements for you in two different test page on the website (Pages: Nice test & Nice test 2). As soon as you modify something on this page, the issue occurs.
I also enabled the PHP error messages, so you can see what is throwing the error, stopping WordPress.
Fatal error: Call to undefined function nice_theme_color_background_class() in wp-content/themes/smart/includes/plugin-integrations/visual-composer/templates/vc_row.php:58
Fatal error: Call to undefined function nice_theme_size_button_class() in wp-content/themes/smart/includes/plugin-integrations/visual-composer/templates/vc_button.php:75
And yes, this leads to a missing ID on the URL, but that is the result of the problem and not the cause. The Post ID is sent via POST anyway and not via GET.
Andrés Villarreal November 16, 2017 at 8:29 pmHi Floris,
I’ve been checking your site too, and given the error message, what’s happening there is that some process is trying to parse or obtain the content of the current post object after it has been saved. We don’t get to see the ID in the URL because PHP throws the fatal error before the redirection to the edit screen can be performed.
You see a fatal error there because the saving process is calling functions from the theme that should only be used in the public facing side of WordPress. This is not a default behavior neither in Smart nor Visual Composer, so our guess right now is that a plugin is causing it, since we’re not able to reproduce the error in our own environments.
We see that you have some custom components for Visual Composer. Would you mind telling us what these components are meant to do? We can also see some plugins adding functionality to the post editor.
As a next step, I would try to disable all plugins one by one and see if the issue persists. If you can’t do that, you can send us your current plugin’s folder inside a zip file, so we can check them on our side.
Best,
Andrés.
_DeLeeuw_ November 17, 2017 at 12:37 pmHello Andrés,
Thanks for your reply. With your information I investigate the issue further and the problem seems to be caused by Yoast SEO plugin. When it is disabled, the issue is gone. Perhaps you can try to reproduce the issue with the Yoast SEO (v 5.8) in your environment?
Best regards,
FlorisAndrés Villarreal November 17, 2017 at 3:09 pmHi Floris,
Thanks for the follow up. We’ll check with Yoast SEO and get back to you as soon as we have an answer.
Best,
Andrés.
Andrés Villarreal November 17, 2017 at 6:28 pmHi again Floris,
I’ve been able to reproduce the issue with Yoast SEO, and it seems like there’s a compatibility issue between that plugin and Smart. Fortunately, there’s a quick fix for this. Can you please add the following code to the functions.php file of your Child Theme?
We’re currently working on a more permanent fix for our next release, so once you update the theme you can remove that function safely.
Please let us know if this solves the issue for you.
Best,
Andrés.
_DeLeeuw_ November 17, 2017 at 6:35 pmPerfect, that solves the issue!
And just for my information: Will this fix be added to the framework in one of the next versions?Have a great weekend!
-FlorisAndrés Villarreal November 17, 2017 at 6:42 pmThat’s great! Thank you, and sorry for the inconvenience.
Best,
Andrés.
This topic is marked as resolved
Only the topic author can re-open this thread.