Follow-up from #2083803: Convert field type to typed data plugin for field_test module

This hook was added in #565480: TF #2: Multilingual field handling and no longer needed as parent issue shows.
Also field_test.install file could be removed

The reason to preserve this hook was @berdir's suggestion about scope #2083803-40: Convert field type to typed data plugin for field_test module

Files: 
CommentFileSizeAuthor
#11 2106501-11.patch1.04 KBswentel
PASSED: [[SimpleTest]]: [MySQL] 59,293 pass(es).
[ View ]
#8 2106501-8.patch1.74 KBswentel
FAILED: [[SimpleTest]]: [MySQL] 58,514 pass(es), 7 fail(s), and 0 exception(s).
[ View ]
#2 remove_hook_install-2106501-2.patch602 bytesIvan Zugec
PASSED: [[SimpleTest]]: [MySQL] 58,370 pass(es).
[ View ]

Comments

Issue tags:+Novice

properly tagging

StatusFileSize
new602 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,370 pass(es).
[ View ]

This patch removes field_test_install() from field_test.install.

However, based on this line, "Also field_test.install file could be removed", should we just remove "field_test.install" file?

Status:Active» Needs review

Status:Needs review» Needs work

The issue will conflict which the referenced field_test issue, let's get that in first. If we don't need this anymore then we should also remove the actual implementation of the referenced hook, field_test_entity_info_alter().

Issue tags:+Needs reroll

The referenced issue went in, so this can be re-rolled. Remember to also remove the referenced hook from field_test.module.

This hook is needed and used in tests.
There's just no more need in weight because hook_entity_info_alter in field_test.entity.inc have no collisions with content_translation module that operates on bundle level via content_translation_entity_bundle_info_alter

PS: it's really interesting how content translation content_translation_entity_info_alter() works because it always fires before field_test_entity_info_alter()... so 'translatable; entity property is not changed

Issue tags:+D8MI, +language-content

seems we need tag this, because field_test_entity_info_translatable() used in TranslationTest.php & TranslationWebTest.php

Status:Needs work» Needs review
StatusFileSize
new1.74 KB
FAILED: [[SimpleTest]]: [MySQL] 58,514 pass(es), 7 fail(s), and 0 exception(s).
[ View ]

Let's see what this gives now.

Status:Needs review» Needs work

The last submitted patch, 2106501-8.patch, failed testing.

+++ b/core/modules/field/tests/modules/field_test/field_test.entity.inc
@@ -20,15 +20,6 @@ function field_test_entity_info() {
-function field_test_entity_info_alter(&$entity_info) {
-  foreach (field_test_entity_info_translatable() as $entity_type => $translatable) {
-    $entity_info[$entity_type]['translatable'] = $translatable;
...
function field_test_entity_info_translatable($entity_type = NULL, $translatable = NULL) {

as I said this needed because this code initializes 'translatable' for entities

Status:Needs work» Needs review
StatusFileSize
new1.04 KB
PASSED: [[SimpleTest]]: [MySQL] 59,293 pass(es).
[ View ]

Ok, let's see what this gives then :)

Hm, ok. #2019055: Switch from field-level language fallback to entity-level language fallback will change how that stuff works and replaces those tests with new ones I think. So by then, it will probably not be used anymore. We should then either simply remove it there or postpone it on that issue, I think?

Status:Needs review» Reviewed & tested by the community

No reason to postpone. The scope of the issue to clean-up install

#11: 2106501-11.patch queued for re-testing.

Status:Reviewed & tested by the community» Fixed
Issue tags:-Needs reroll

Nice find!

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.