hi all.
i've just noticed a problem with title and taxonomy fields.

steps:

  1. i have title module enabled with default configuration (no checkboxes in Administration › Configuration › Content authoring › Title settings).
  2. let's now create a new vocabulary: Administration › Structure › Taxonomy › Add vocabulary: "Example vocabulary".
  3. now, in Administration › Structure › Taxonomy › Example vocabulary › Manage fields i have default name and description machine names automatically replaced with field_name and field_description.

actually, i would expect this behavior with name and decription checkbox checked in Administration › Configuration › Content authoring › Title settings › Taxonomy term.

another issue i've noticed is that, with field_name instaed of name, i only have blank terms all around the administration ui (starting from Administration › Structure › Taxonomy › List).

am i missing something?

thanks a lot.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.x-dev
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Blank field values will appear if you replace fields, make them transltable but not enable taxonomy translation in the ET settings. I cannot reproduce the other issue on the latest dev, please provide the exact steps to reproduce it on a clean D7 installation.

plach’s picture

Title: taxonomy fields » Taxonomy fields are automatically replaced even with the related settings disabled
lorenx’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha5

hi and thanks for your reply.

i don't have a clean drupal installation at the moment.
try this scenario first, i'll set up one if needed.

enviroment:

  • title module enabled (i'm talking about 7.x-1.0-alpha5 anyway. should i try the dev one?) with no taxonomy term options checked;
  • taxonomy translation enabled (7.x-1.8).

steps:

  1. Administration » Structure » Taxonomy » Add vocabulary;
  2. choose a vocabulary name;
  3. choose the No multilingual options for terms. Only the vocabulary will be translatable. option;
  4. now, in edit vocabulary » Manage fields i have name_field and description_field, the classical name field is automatically replaced as if the Automatic field replacement option was selected.

this happens even with taxonomy translation module disabled.

lorenx’s picture

i can confirm this seems a bug to me.

steps:

  1. clean drupal 7 installation;
  2. download and enable title module, version 7.x-1.0-alpha5;
  3. create a vocabulary "A";
  4. edit the just created "A" vocabulary > manage fields: name and description are there, fine;
  5. configuration › content authoring › title settings: in the node section, tick title under automatic field replacement;
  6. create a vocabulary "B";
  7. edit the just created "B" vocabulary > manage fields: name and description aren't there anymore, replaced by name_field and description_field

i would expect this behavior enabling the automatic field replacement feature for name and description in the taxonomy term section, not in the node one.

should i use the dev version? is it safe enough?

thank you for your attention.

adriaanm’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active
FileSize
39.83 KB
70.26 KB
62.63 KB
125.6 KB

I reproduced this issue using a sandbox environment on simplytest.me. Please follow these exact steps to reproduce the issue:

  1. Clean D7 installation
  2. Install and enable modules:
    • Internationalization 7.x-1.9
    • Entity Translation 7.x-1.0-beta3
    • Title 7.x-1.x-dev
  3. Add language "French" through admin/config/regional/language/add
  4. Configure Entity Translation through admin/config/regional/entity_translation (configuration screenshot attached)
    • (disabled) Enable language fallback
    • (disabled) Display shared labels
    • (disabled) Enable translation workflow permissions
    • Translatable entity types
      • (enabled) Taxonomy term
    • Taxonomy Term tags
      • Default language = default language
      • (disabled) Hide language selector
      • (enabled) Exclude Language neutral from the available languages
      • (enabled) Prevent language from being changed once the entity has been created
      • (disabled) Hide shared elements on translation forms
  5. Configure Title through admin/config/content/title (configuration screenshot attached)
    • (enabled) Name
    • (enabled) Description
    • (disabled) Hide page title
    • (disabled) Hide label in taxonomy term listings
  6. Add a term in the default "Tags" vocabulary through admin/structure/taxonomy/tags/add (screenshot attached)
    • Name: fill in "test name"
    • Description: fill in "test description"
    • Language: choose "French"
    • Click button "Save"
  7. Click on "list" in the top right corner
  8. You will see a list with one item with an empty title
  9. Click on edit next to the term
  10. You will see a term edit form with empty title and empty description.

This behavior only occurs when using the Title-module.

plach’s picture

Wow, great report, thanks! I think I'll start using it as an example of how things should be done ;)

I'm pretty swamped these days but I'll try to have a look to this ASAP.

adriaanm’s picture

Status: Active » Needs review
FileSize
729 bytes

I found out that when you skip reverse synchronisation when inserting an entity in a different language than the active language, the fields are not empty anymore - patch attached.

The title_entity_presave part is quite confusing, since the langcode-variable is used to determine the entity language, the active language, and also as a boolean to check if reverse synchronisation needs to be performed...

Can you take a look at this part and maybe check how it can be re-written?

plach’s picture

Mmh, this might be a duplicate of #1991988: Adding a new translation overwrites the English/source field value. Can you check if we are talking of the same problem just with different symptoms?

adriaanm’s picture

I tried reproducing that issue without success. Next I've applied the patch from #8 of #1991988: Adding a new translation overwrites the English/source field value, but that doesn't resolve the problem described in this issue.

Status: Needs review » Needs work

The last submitted patch, 1938216-7-entity-empty-fields.patch, failed testing.

plach’s picture

Can you take a look at this part and maybe check how it can be re-written?

Sorry, it's difficult even for me to wrap my mind around these issues. That part of code is simply tricky :)

I need some time to understand what's going on.