Support » Plugin: Recipes by Simmer » Not compatible with Gutenberg

  • Since the version 5 of WordPress that uses Gutenberg, every line of ingredient or direction gets written in the database multiple times (up to five times, randomly).

    Turning on Classic Editor, resolves this issue, but this can’t be a permanent solution.

    Have you considered making Recipe Blocks for Gutenberg and thus changing radically how the plugin works?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author L. Littlefield

    (@lchelak)

    Hello,

    We’re unable to reproduce the issue with ingredients and directions being written into the database in multiple locations.

    If you have already confirmed that this is not a plugin conflict, could you share more information about where you are finding that the database is being written to multiple times for Simmer items?

    The current version of Simmer is compatible with Gutenberg. We are also actively developing new recipe blocks for Simmer Pro, available at https://simmerwp.com.

    Thank you!

    Hi,
    it took some time but I dug deeply into it. Steps to reproduce:
    Latest WordPress (5.2)
    Latest Simmer 1.3.11
    Theme Twentynineteen

    Enable Gutenberg on recipe post type by enabling REST either in child theme or using plugin with following code:

    function recipe_rest_support() {
    		global $wp_post_types;
    
    		//be sure to set this to the name of your post type!
    		$post_type_name = simmer_get_object_type();
    		if( isset( $wp_post_types[ $post_type_name ] ) ) {
    			$wp_post_types[$post_type_name]->show_in_rest = true;
    			// Optionally customize the rest_base or controller class
    			$wp_post_types[$post_type_name]->rest_base = $post_type_name;
    			$wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
    		}
    	}
    add_action('init','recipe_rest_support',25);

    Add a new recipe and save it.
    Add a new ingredient.
    Save as draft
    Preview

    You should see the new ingredient twice.

    Add another ingredient. Save as draft again and click preview:
    The first ingredient is saved four times, the last one twice …
    Etc.

    I can resolve that by disabling REST and Gutenberg, but it is a temporary hack, because I want to use Gutenberg when writing recipes.

    Thanks and best regards, Greg

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Not compatible with Gutenberg’ is closed to new replies.