Closed (fixed)
Project:
Entity Translation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Reporter:
Created:
18 Oct 2010 at 13:43 UTC
Updated:
12 Jun 2014 at 22:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunYay, that sounds like a test plan :) Do you know how to write tests?
Comment #2
sunBetter title.
Comment #3
das-peter commentedHehe, I shouldn't write reproduction instructions - forces me writing tests... ;)
Updated patch includes tests. Hope they meet the requirements - I've just modified the tests provided by translation_node.
Comment #4
das-peter commentedDamn, don't know how the tabs sneaked in...
Comment #5
plachMoving to the Entity Translation queue. Read #902760: Change module name so it can work with Core translation for details.
Comment #6
fietserwinPatch converted to entity_translation. Test part gave me errors, so I had to skip that one.
Patch seems to solve the problem for numeric fields for me, but now I get this error on an empty taxonomy field:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'tid' cannot be null: INSERT INTO {taxonomy_index} (nid, tid, sticky, created) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 8 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => 1300313880 ) in taxonomy_field_update() (regel 1702 van modules\taxonomy\taxonomy.module).
Comment #7
fietserwinReplacing the patched line with;
Old (as in patch):
new:
or with:
Seems to actually save the translation. Anyway, the removal of empty fields is done by the submit handler, not the validate handler. So perhaps the validate line should not be in here at all.
However, I get too many other errors and notices, page not found errors, etc. to reliably patch this single error. I'm also not too deep into fields yet as to say whether my suggestion is the way to go or not. So I won't make a patch out of this.
Aside: for a normal node save, for the empty field removal, you get a trace like;
Comment #8
plach#1098106: Translated fields aren't validated (or processed with presave and submit field_attach_ hooks) has a RTBC patch that should fix this issue. Please move there and confirm.
Comment #9
plachSorry, reopening this since we have some yummy tests here :)
Here is a rerolled version, tests don't pass atm: peter would you have a look to this?
Comment #10
das-peter commentedComment #11
das-peter commentedTests in the patch work like a charm. I've extended it with tests for url alias / pathauto stuff.
The tests in the attached patch are also included it the last patch here #1155134: Integrate pathauto bulk generation
Comment #12
plachComment #13
plachCommitted the attached patch to HEAD, thanks!
I left out the path tests because they were failing and the pathauto ones because they'll need to go in within the other patch.