Search code examples
akeneo

Akeneo 2.2.5: No JobInstance found with code "add_to_existing_product_model"


Since the forum at akeneo.com is locked down, I posted my question here.

When I try to add Produkts to a Product-Model via mass-edit, I get the following error message:

No JobInstance found with code "add_to_existing_product_model"

[2018-06-19 19:39:31] request.INFO: Matched route "pim_enrich_mass_edit_rest_launch". {"route":"pim_enrich_mass_edit_rest_launch","route_parameters":{"_controller":"pim_enrich.controller.rest.mass_edit:launchAction","_route":"pim_enrich_mass_edit_rest_launch"},"request_uri":"http://pim.eu-trading.eu/rest/mass_edit/","method":"POST"} []
[2018-06-19 19:39:32] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Translation\Exception\NotFoundResourceException: "No JobInstance found with code "add_to_existing_product_model"" at ./vendor/akeneo/pim-community-dev/src/Pim/Bundle/EnrichBundle/MassEditAction/OperationJobLauncher.php line 59 {"exception":"[object] (Symfony\\Component\\Translation\\Exception\\NotFoundResourceException(code: 0): No JobInstance found with code \"add_to_existing_product_model\" at ./vendor/akeneo/pim-community-dev/src/Pim/Bundle/EnrichBundle/MassEditAction/OperationJobLauncher.php:59)"} []

I get this error with the latest version of Akeneo 2 (v2.2.5). The product model was created manually, the products to be associated with the model came through the api.


Solution

  • This error looks like a missing job in the database. Did you run all the doctrine migrations?

    To do so you need to launch this command:

    bin/console doctrine:migrations:migrate --env=prod
    

    If you already launched the migrations and they failed, you can install a clean 2.2.5 PIM elsewhere and dump the job instance table to be able to add the missing jobs. Here is the list of the jobs to add or update in 2.2:

    - add_association
    - move_to_category
    - add_to_category
    - remove_from_category
    - add_to_existing_product_model
    - compute_family_variant_structure_changes
    - compute_completeness_of_products_family
    - add_attribute_value
    - delete_products_and_product_models