0

we are using akeneo v4 now and still stumbling over the following issue. Our customer is moving an attribute from the common model to the variant. All works fine, but when opening a product model which and saving it an error occures which says that

Cannot set the property "attribute_name" to this entity as it is not in the attribute set

as this is right because the attribute should not appear in the product-model anymore. Instead it should be in the variant.

Anyone has a clue why the raw values of the product model is not updated?

Regards Peter

peter0601
  • 75
  • 1
  • 5

2 Answers2

1

You need to run the job Compute family variant structure changes to correct the family variant structure.

Lam
  • 429
  • 6
  • 12
  • Hi Lam, thanks for you answer. To complete it could you please be so kind to add the way how to run this job? On the contrary, why is akeneo not running this job by itself? – peter0601 Jul 13 '21 at 08:26
  • Hi Peter, you can trigger it by saving family variant – Lam Mar 17 '22 at 01:52
  • Stumbling again over this topic as it seems not solved for me. When saving the familyVariantStructureChange the following error occurs: request.CRITICAL: Uncaught PHP Exception TypeError: "Argument 1 passed to Akeneo\Tool\Bundle\BatchQueueBundle\Launcher\QueueJobLauncher::launch() must be an instance of Akeneo\Tool\Component\Batch\Model\JobInstance, null given, called in /var/www/html/pim/vendor/akeneo/pim-community-dev/src/Akeneo/Pim/Structure/Bundle/EventSubscriber/Compu teFamilyVariantStructureChangesSubscriber.php on line 112" What can cause this? – peter0601 Mar 28 '22 at 09:18
  • found similar issue here https://github.com/akeneo/pim-community-dev/issues/11065 – Lam Mar 29 '22 at 10:24
  • that did the trick... thank you so much – peter0601 Mar 31 '22 at 09:00
0

related to answer of Lam. Execute the console command:

bin/console akeneo:batch:job compute_family_variant_structure_changes -c "{\"family_variant_codes\": [\"your_family_variant_code\"]}"
mbraeuner
  • 1
  • 1
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 15 '23 at 23:19