Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • It was probably already known as they had marked it with throws Exception

    	/**
    	 *
    	 * @throws \Exception
    	 */
    	public function loadShortcodes() {
    		if ( vc_is_page_editable() && vc_enabled_frontend() ) {
    			$action = vc_post_param( 'action' );
    			if ( 'vc_load_shortcode' === $action ) {
    				$output = '';
    				ob_start();
    				//MTMOD - $this->setPost();
    				$shortcodes = (array) vc_post_param( 'shortcodes' );
    				do_action( 'vc_load_shortcode', $shortcodes );
    				$output .= ob_get_clean();
    				$output .= $this->renderShortcodes( $shortcodes );
    				$output .= '<div data-type="files">';
    				ob_start();
    				_print_styles();
    				print_head_scripts();
    				wp_footer();
    				$output .= ob_get_clean();
    				$output .= '</div>';
    				// @codingStandardsIgnoreLine
    				print apply_filters( 'vc_frontend_editor_load_shortcode_ajax_output', $output );
    			} elseif ( 'vc_frontend_load_template' === $action ) {
    				$this->setPost();
    				visual_composer()->templatesPanelEditor()->renderFrontendTemplate();
    			} elseif ( '' !== $action ) {
    				do_action( 'vc_front_load_page_' . esc_attr( vc_post_param( 'action' ) ) );
    			}
    		}
    	}
    • This reply was modified 4 years, 4 months ago by mtorrance.

    Well I don’t think I’d call it a fix but I commented out
    $this->setPost();
    on line 641 of js-composer/include/classes/editors/class-vc-frontend-editor.php and now there are no errors in the log, the front-end builder updates like normal. I turned on the built-in snippets and placed the shortcode for a snippet in a text box in the builder and it seems to work. I’m not sure what other ramifications this change may have or if that line just didn’t need to be there at all. I’ll play with the builder some more to see if I can kick out any errors.

    Well I finally heard back from WP Bakery. They’ve added it to the bug list that will be addressed at some point in the future. I may take a stab at it myself as I’m now tied to their builder app for a site I just launched. I guess I’ll look for a different builder app for upcoming sites.

    I’m currently using

    Woody Snippets 2.3.10
    WP Bakery 6.4.1
    WordPress 5.5.1 Twenty-Twenty Theme

    They reached out for access to my site to investigate so we’ll see what they can figure out. Thanks for your response!

    Hello,

    I have a very similar issue. I’m using WordPress 5.5.1, WP Bakery and Woody Snippets. I have no snippets active. When Woody Snippets is running the WP Bakery Frontend Editor won’t refresh changes, I’m assuming using AJAX. If you hit update and refresh the page the changes are there. WP Bakery claims it’s on your end. I just sent them this error to review. Please let me know your thoughts.

    [29-Oct-2020 11:19:55 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WINP_Execute_Snippet::executePostSnippets(), 1 passed in /home/mtorrance/public_html/visitwoka/wp-includes/class-wp-hook.php on line 287 and exactly 2 expected in /home/mtorrance/public_html/visitwoka/wp-content/plugins/insert-php/includes/class.execute.snippet.php:75
    Stack trace:
    #0 /home/mtorrance/public_html/visitwoka/wp-includes/class-wp-hook.php(287): WINP_Execute_Snippet->executePostSnippets(Object(WP_Post))
    #1 /home/mtorrance/public_html/visitwoka/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #2 /home/mtorrance/public_html/visitwoka/wp-includes/plugin.php(544): WP_Hook->do_action(Array)
    #3 /home/mtorrance/public_html/visitwoka/wp-content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php(372): do_action_ref_array(‘the_post’, Array)
    #4 /home/mtorrance/public_html/visitwoka/wp-content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php(639): Vc_Frontend_Editor->setPost()
    #5 /home/ in /home/mtorrance/public_html/visitwoka/wp-content/plugins/insert-php/includes/class.execute.snippet.php on line 75

Viewing 5 replies - 1 through 5 (of 5 total)