After module install i get following error meassage:
The entities of type Taxonomy term do not define a valid base path: it will not be possible to translate them.

And not see translation tab on term field and extra taxonomy fields.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Status: Active » Postponed (maintainer needs more info)

I tried a fresh install of the latest ET dev without seeing this error. Could you provide more details to help reproduce the problem?

nikosnikos’s picture

I have the same problem after updating from 2012-02-13 dev version to 2012-05-29 dev version.

I tried on a fresh new install of the last drupal 7 with entity translation dev. I enabled taxonomy terms and comments for entity translation and I had the problem for comments :
The entities of type Comment do not define a valid base path: it will not be possible to translate them.

cossimo’s picture

I get the same error when I install the 2012-05-29 dev version. What sort of details would be helpful for resolving this?

plach’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
1.57 KB

I have been able to reproduce this, not on a clean installation though. In my case it turns out that Views is replacing the taxonomy router path with a views-specific one, thus making the test for the base path existence fail. The attached patch seems to fix the issue. Please confirm.

nikosnikos’s picture

Yes, it fixes the bug for entities comment error on my fresh new drupal site and for entities taxonomy for my other site using views for the terms page.

Thanks !

plach’s picture

Status: Needs review » Fixed

Ok, let's open this to wider testing.

Committed and pushed.

plach’s picture

Category: task » bug

Status: Fixed » Closed (fixed)

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

quiptime’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha2
Status: Postponed (maintainer needs more info) » Active

The bug still exists. Drupal 7.14, Entity translation 7.x-1.0-alpha2

See also Entities of type Commerce Coupon do not define a valid base path

I think, the basis of the problem is to configure the Entity translation module.
The configuration will list some of the available entity types. For example:

  • Node
  • Taxonomy term
  • Commerce Coupon
  • Commerce Delivery
  • Commerce Product
  • User
  • Rules configuration

 

What is now, when a EntityType is not translatable by Entity translation?

A first consideration is to expand the description of Translatable entity types.

Select which entities can be translated.

This is obviously not enough for an good information.

plach’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

Did you test the latest dev? Steps to reproduce it?

quiptime’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

I have expanded #9.

quiptime’s picture

OK, I'll test the dev release.

plach’s picture

Taxonomy terms are translatable and a valid base path is provided by ET. Hence there is something that is altering either the ET-provided info (see entity_translation_translation_info()) or (more likely) the menu items data structure, through an implementation of hook_menu_alter().

quiptime’s picture

Currently, Taxonomy translation is not the problem.

Other modules produce problems, such as Rules module.

plach’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Well, this is not a bug then. Simply Rules are problably not integrating correctly with ET. OTOH, I agree that the UI can be improved to be less misleading. To be fixed in a different issue.

quiptime’s picture

Simply Rules are problably not integrating correctly with ET

How other modules implement the correct integration of ET?

plach’s picture

It's all documented in the latest dev, see entity_translation.api.php.

See also #1114410: Replace hook_translation_info() with hook_entity_info(). The entity info is not changing but the hook in itself will go away.

quiptime’s picture

You are sure that other modules do not have properly integrated ET?

Screenshot
administer Entity translation

plach’s picture

No, I'm not, but this issue is about taxonomy terms and I'm sure they are supposed to work.

quiptime’s picture

You're right. There is a problem of other modules.

In the meantime, I found a module with proper ET implementation: Commerce Product

Following code from a DC kickstart installation:

modules/product/commerce_product.module:

function commerce_product_entity_info() {
  ...
      // Add translation support.
      'translation' => array(
        'locale' => TRUE,
        'entity_translation' => array(
          'class' => 'EntityTranslationCommerceProductHandler',
        ),
      ),
  ...
}

 

modules/product/includes/commerce_product.translation_handler.inc

/**
 * Commerce Product translation handler.
 *
 * This class is registered in commerce_product.module using the translation
 * property the Entity Translation module uses via hook_entity_info().
 *
 * @see commerce_product_entity_info()
 */
class EntityTranslationCommerceProductHandler extends EntityTranslationDefaultHandler {

  public function __construct($entity_type, $entity_info, $entity, $entity_id) {
    parent::__construct('commerce_product', $entity_info, $entity, $entity_id);
  }

  /**
   * Indicates whether this commerce product is a revision or not.
   */
  public function isRevision() {
    return !empty($this->entity->revision);
  }

  /**
   * Returns the original language of the product.
   */
  public function getLanguage() {
    return $this->entity->language;
  }

  /**
   * Checks whether the current user has access to this product.
   */
  public function getAccess($op) {
    return commerce_product_access($op, $this->entity);
  }

  /**
   * Returns whether the product is active (TRUE) or disabled (FALSE).
   */
  protected function getStatus() {
    return (boolean) $this->entity->status;
  }
}

 

See screenshot from #18.

Commerce Product is in the list of translatable entity types, but not in the list of base path warnings.

I think, that's it.

  • Commit d8441bf on master, et-permissions-1829630, factory, et-fc, revisions by plach:
    Issue #1587108 by plach | divined: Error: The entities of type Taxonomy...

  • Commit d8441bf on master, et-permissions-1829630, factory, et-fc, revisions, workbench by plach:
    Issue #1587108 by plach | divined: Error: The entities of type Taxonomy...