Closed (fixed)
Project:
Auto Product Display
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 May 2013 at 12:55 UTC
Updated:
6 Nov 2016 at 03:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
bogeyman commentedWould you like to describe more about the error? Like what kind error message or wrong result that you got.
Comment #2
grahamcTrying to add a new translation gives me a screenful of these:
The badness starts in
entity_translation_prepare_element(), which calls this function:... which returns FALSE when Commerce APD is being used.
This causes the source translations to not display in the edit form, and saving the translated entity makes it forget that there ever was another original translation. So, broken ;-)
It looks like the product display node probably ought to be added to the $form array somewhere below the top level -
field_attach_form()definitely allows it to be a sub-element. In my case though, just re-setting the '#entity_type' key is enough to make things work again.Comment #3
webcurl commentedPutting the product display form in a subkey of the product form (patch attached) does indeed seem to correct this issue, along with two others:
Field display order on the Product edit form is different to the 'Manage fields' page
(metatag module) Product metatags not displayed in edit form, again because of incorrect $form['#entity_type']
Comment #4
lisa.rae commentedThis issue not only breaks the EntityTranslation functionality, but any functionality that relies on EntityFieldQuery working properly when using product_id on the #entity.
I had a custom module that was using EntityFieldQuery to add some lookup funtionality to the commerce product ui form, and that funtionality broke to the extent that even uninstalling the commerce_apd module did not fix it -- I had to revert back to a previous database.
Applying this patch worked in my case; however the codebase has been updated since this patch was originally created, and I had to apply it manually to version 1.4, after which the broken EntityFieldQuery calls in my custom module started working again.
This patch probably needs to be updated, and incorporated into the next release.
Comment #6
bogeyman commentedSorry for the very very late reply. I have updated the patch and committed it to 7.x-1.x. Please review it.
Comment #7
bogeyman commentedComment #8
bogeyman commented