I have entity translation working perfectly with webform and Commerce products on one site, but on the other, the "Commerce Product" tab does not appear lower left in /en/admin/config/regional/entity_translation even though Commerce Product is a selected Translatable Entity Type on the same page.

I'm using Title to replace product titles. It is marked as "Translatable" in the Product Variation Type.

Anyone know why I can check Commerce Product as a Translatable Entity Type but then it does not turn up lower left (see screen shot).

I had deleted a Product type, then recreated it, but the recreation doesn't work.

MORE INFO: On system that is working, "Translate" link appears on product variations page. On system that is not working, "Translate" link does not appear. As far as I can tell, settings are the same on both sites. Could I have done something to damage the second site, that it could have all the right settings, but different results? Images of these two Product Variation pages are attached.

Tips, pointers very much appreciated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

LIQUID VISUAL created an issue. See original summary.

LIQUID VISUAL’s picture

stefanos.petrakis@gmail.com’s picture

Status: Active » Needs work
FileSize
67.65 KB

You need to check/do the following:

a) Is "Multilingual support via Entity translation" for your Product type(s) enabled? (see screenshot)
b) Is there at least one field on your product type, that is translatable?
c) You should enable/check the "Commerce product" entity on the admin page [admin/config/regional/entity_translation] and save once

Upon visiting that admin page again you should be good to go.
Just tried this and it works as expected, we'd appreciate some feedback if this does indeed solve your problem.

Cheers,
Stefanos

LIQUID VISUAL’s picture

All of above was done. I do not have Product Types named as such. I do have Product Variations. I do not have Product since I deleted it, and its content type, after concluding it had become dysfunctional. I uninstalled and reinstalled all commerce components. On one site, this restored correct functioning of field translation (entity translation) for commerce. On the other it did not. I believe something is corrupted in the database, and cannot remove entity translation because I do not want to wreck existing translations for other entity types.

When I select "Commerce Product" as a translatable entity type, it does not appear as a translatable entity in the tabs lower left.

I was able to make one product bilingual by entering info directly in the corresponding table in the database. Once properly there, it reads back fine in corresponding language. But ability to translate commerce products from the admin pages is not offered. I'm sure I screwed it up by deleting something. I am comparing databases on working vs not working site. Any tips about what to look for would be appreciated. Should threre be a warning about deleting products or product types? Why does my interface not show Product Types, though it shows Product Variations? Terminology is confusing.

LIQUID VISUAL’s picture

Thanks for looking at this. When I inspect brand new installation of commerce product translation, Schema module tells me there's a mismatch for commerce_product

unique keys sku:
declared: array('sku')
actual: array('sku', 'language')

Could this be relevant?

stefanos.petrakis@gmail.com’s picture

You're welcome. It could be relevant, but more like the other way around, if you were missing the 'language' in your actual schema.

But, I am walking on thin ice here. This is becoming more of a Commerce Product entities question and how they are defined. I would need to take a look at that code before I can say more. Did you check their issue queue for similar issues?

LIQUID VISUAL’s picture

yes, but will check again. this part of the work is volunteer. What's frustrating is that it works perfectly on test site, seems to be something I removed from Commerce, without realizing the consequences.

Onwards and sideways!

LIQUID VISUAL’s picture

If I try to go to

/admin/commerce/products/types/product/edit

I am told "The page you requested does not exist."

LIQUID VISUAL’s picture

This now works perfectly. Problem was I'd done this and that often enough to corrupt the database. Recovery seems complete, except for some apparently irrelevant schema discrepancies that I'd like to fix. Steps taken:

1) Backed up database
2) Backed up sites directory
3) Put site in maintenance mode...
4) Look at Schema
1) Note both involved, and aberrant, tables
2) Cut and paste notables to word file.
7) Disconnect all Commerce translation implements
1) Disconnect entity translation elements related to Commerce.
2) Leave translation for webform
3) Remove all products, including donations
4) Remove product content types.
5) Remove products, traces of products, as is possible in admin section.
6) Remove any orders.
8) Uninstall Commerce translation modules.
9) Disconnect Commerce Webform creations in exiting webforms. uninstall commerce webform
10) Disconnect Commerce Donations iterations, disconnect module
11) Disconnect all Commerce
12) Uninstall all Commerce modules
13) Scour admin section for error messages, values to look for in database., anything from commerce (and commerce translation),
14) DO NOT UNINSTALL other translation components.
15) Delete leftover views
16) Delete related leftover tables as per Schema that are not needed by modules that will be installed.
17) Do not reinstall backoffice modules.
18) Scour admin, then scour schema, then scour database to remove orphaned data and tables.
19) Search for commerce_product (or other strings in error messages) and remove where safe to do so, checking in drupal for errors.
20) Do status report, schema, check log, survey for error messages.
21) Flush drupal caches, do database export
22) Stop. Lunch.
23) Reinstall commerce gradually, checking for errors.
24) Create basic product type, product, insert in webform.
25) Verify tables are taking and returning data unscrambled.
29) reset checkout and payment config.

The main problem seems to be that I had installed Commerce Backoffice modules (without brackets on Package line in .info files) and they didn't seem to do well with entity translation. By sticking to the basic Product and Product Types, we are able to integrate with webforms, and make all bilingual using entity translation.

LIQUID VISUAL’s picture

Assigned: Unassigned » LIQUID VISUAL
Status: Needs work » Closed (works as designed)

This seems to be more of a problem with Commerce Backoffice extras. Works fine when used with basic Commerce.

stefanos.petrakis@gmail.com’s picture

That's - almost - a relief. :-) Happy to hear you sorted this out
Are you gonna open an issue for this on the Commerce Backoffice queue? Would be useful.

Cheers and thanks for all the detailed updates