• We migrated from WPUR to WPRM a couple of days ago and it has not gone well.

    We use WPML to manage posts in English and Spanish versions of our site. This includes WPUR recipe posts. Usually when I use the WPRM importer on a multilingual site I run the importer first under one language (e.g. English) then under the other language version of the site (e.g. Spanish). This normally works perfectly. Mostly I convert EasyRecipe recipes to WPRM.

    In this case, the WPRM importer found and imported WPUR recipes in the English version of the site but failed to import the recipes into the associated Spanish posts. The strange part of this is that some recipes did correctly import into the Spanish site.

    In terms of recipes, we were left with a working English site and a broken Spanish site. Technically the site works but now has few Spanish recipes.

    It seems that the importer does something funky with the ‘recipe’ post type used by WPUR. I suspect (not checked the plugin code to confirm) the importer removes the imported version of the post. This is an issue for WPML. After running the importer I must disable WPML to see the Spanish translations of the recipe posts otherwise I can only see the posts exist but not read or edit them.

    I have been able to reactivate the old ‘recipe’ post type by adding a ‘recipes’
    post type (with an ‘s’) and switching the ‘recipe’ type posts to ‘recipes’ type posts. Changing the CPT is the only way to make the posts visible. Again, this appears to be due to the fact the WPRM importer deletes each post of the type ‘recipe’ on import.

    The WPUR recipe data is in the Spanish posts (both core ‘post’ post type and custom ‘recipes’ post type) as metafield data.

    Do you have an importer that will import the WPUR metafield data into WPRM recipes and which will automatically replace the [wpurp-searchable-recipe][/wpurp-searchable-recipe] in each post with the new WPRM recipe shortcode?

    Thank you,
    Lee

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Brecht

    (@brechtvds)

    Hi Lee,

    With WP Ultimate Recipe there’s basically 1 post:
    1) Recipe post (public custom post type) that has the post content in there and includes the recipe fields as meta values.

    Because of how WP Recipe Maker works there are 2 different posts:
    1) The recipe post (hidden custom post type) that includes all the recipe fields as meta values. No post content here.
    2) The regular post with the post content which includes the WRPM shortcode

    When converting from WP Ultimate Recipe we convert the recipe post type to a regular post (as not to lose out on the post content or other associations that were made) and then create a brand new recipe post from the recipe fields.

    This is just required because of how both plugins work.

    Unless you chose the “Don’t convert to posts” option on import. Then it just stays a recipe but you’d need to manually insert the WPRM shortcode into a new post/page for it to become public.

    If you need a different import method you could customize ours as well:
    https://bootstrapped.ventures/wp-recipe-maker/custom-recipe-importer/

    Kind regards,
    Brecht

    Thread Starter Lee Hodson (VR51)

    (@leehodson)

    I see what has happened. When the English recipe posts were converted to a regular post type it caused WPML to lose track of the Spanish version of each post. This will be why I needed to disable WPML to view the unconverted Spanish recipes.

    What I might be able to do is adjust the WPRM importer so it looks at the new ‘recipes’ post type instead of ‘recipe’. Though I think this will create new issues of its own.

    My best way forward could be for me to switch the temp. ‘recipes’ post type back to the WPUR ‘recipe’ post type then try to get WPML to recognise the Spanish posts.

    I’ll experiment. Hopefully I can get the Spanish recipes back.

    Thanks Brecht.

    Plugin Author Brecht

    (@brechtvds)

    I’m not that familiar with WPML but is it not possible to manually match these up again afterwards or something like that?

    Just to be clear, the correct post type names:
    recipe = WP Ultimate Recipe
    wprm_recipe = WP Recipe Maker

    Brecht

    Thread Starter Lee Hodson (VR51)

    (@leehodson)

    We can manually match the posts up after import. There are several hundred to go through. Thankfully I won’t need to do that.

    I converted the intermediary ‘recipes’ post type to the regular old core ‘post’ post type. WPML held the En/Es post associations. Now I need to add the recipe card data into the posts. Will adapt one of the core WPRM importers, probably the WPUR importer.

    Can I suggest you adjust the importer to check for the presence of WPML then prompt the site admin to switch from the default language version of the site before the importer is run. Add a confirmation toggle before allowing the import to proceed. I suspect this might prevent others running into the same predicament as me i.e. stop WPML losing translated recipe posts.

    9/10 times I create a database backup before running an import. This is one of the 1/10 that caught me off-guard. Has been a fun few days.

    Thanks for the post type note. I had that info to hand. I wrote a tool a few months back to query post types and associated taxonomies to provide a beautiful UI for reviewing the variables. You can find it here if you ever need it. I’m 90% through writing a more advanced version.

    Thanks Brecht.

    Plugin Author Brecht

    (@brechtvds)

    Happy to hear things worked out for you! Will keep this in mind in case someone else runs into the same issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP Ultimate Recipe Import’ is closed to new replies.