Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
translation_entity.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Nov 2012 at 06:58 UTC
Updated:
29 Jul 2014 at 21:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ytsurki'm not shure if this bug is related, bug berdir told me so ;)
i get this error
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: 'theme.bartik.mobile' for column 'entity_id' at row 1: INSERT INTO {translation_entity} (entity_type, entity_id, langcode, source, translate) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => breakpoint [:db_insert_placeholder_1] => theme.bartik.mobile [:db_insert_placeholder_2] => und [:db_insert_placeholder_3] => b [:db_insert_placeholder_4] => 0 ) in translation_entity_entity_insert() (line 516 of /Applications/MAMP/htdocs/d8t/core/modules/translation_entity/translation_entity.module).here's how to reproduce this error:
on a fresh install (standard or minimal).
enable entity - translation, and add a second language.
add a conent-type (in minimal) and a content for it.
now enable the Picture Field-type - boom.
a second enabling of the Picture Module then works without error, and the filed itself actually works.
Comment #2
andypostSuppose we should have a different kind of storage for configurables (contact category, image style)
Edit The easiest fix for now is to check for
config_prefixin entity to make sure we are dealing with configEntity also it makes sense to change entity_id to entity_uuid or just does not allow entity*hooks for none integer entity_id as temp workaroundComment #3
berdirI'm not sure how configuration entities will be translated but for the moment, this should fix this for the moment and unblock the vocalary to configuration issue.
Will require a follow-up to support configuration entities but first they actually have to support translations. Might be as easy as making entity_id a string. Not sure about using entity_uuid, because we agreed in another issue to not use it for references.
Comment #4
ytsurknice - patch solves the listed error.
Comment #5
tim.plunkettThis makes sense, and it's blocking #1552396: Convert vocabularies into configuration.
Comment #6
plachSorry, I tried to RTBC this earlier but Travelodge's wifi sucks. I agree this is good to go in.
Comment #7
sunLooks good. Bumping to major, as this seems to block a range of other issues.
Comment #8
tstoecklerDidn't find this because the issue title didn't mention the error mentioned in #1, so I opened #1832932: translation_entity_entity_insert() assumes entity IDs are integers. Don't know if that should be a duplicate. It's a different fix, which is also valid, IMO. I guess that one can be demoted once this is in.
Comment #9
webchickHm. We should get some tests for this, I think.
Comment #10
berdirOk, extended both node tests (to check for the bundle specific setting) and the taxonomy term tests to verify that we're not adding wrong rows.
Comment #11
gábor hojtsyTests look good. Only two code comments:
... bundle.
bundle THAT does not have?
Comment #12
berdirThanks!
This should be better.
Comment #13
gábor hojtsyLooks all good to me.
Comment #15
tim.plunkettThat was a known fail that's been fixed since.
Comment #16
webchick#12: translation-entity-check-support-1832000-12.patch queued for re-testing.
Comment #17
webchickCommitted and pushed to 8.x. Thanks!