AFAIK node's title is not field in D7, how are you going to translate node's title? I think this feature is major, because without it you can't access the translated node in site view.

Comments

sun’s picture

Status: Active » Fixed

The plan is that Title module will provide that fundamental "entity label as a field" facility for us.

Status: Fixed » Closed (fixed)

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

good_man’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new1.14 KB

Can I reopen this issue provide Title integration.

A patch to review.

good_man’s picture

StatusFileSize
new1.26 KB

updated one.

good_man’s picture

StatusFileSize
new1.29 KB

Fixed the case that the module is enabled & content type is not using Title

good_man’s picture

Thoughts and ideas?

plach’s picture

Status: Needs review » Postponed

We are likely to use entity_label() here but let's wait to have at least the inital title patch committed before going on with this.

plach’s picture

Project: Content translation » Entity Translation
Version: 7.x-2.x-dev » 7.x-1.x-dev
plach’s picture

Status: Postponed » Needs review
StatusFileSize
new2.76 KB

Here is a patch exploiting the Title module if available.

plach’s picture

StatusFileSize
new2.9 KB

Better one.

tte’s picture

Hi,

I just installed the latest entity_translation dev release (3 April 2011), as well as the latest dev version of the title module (1 April 2011) and updated the database as needed. Both modules are enabled. However, applying this patch results in the following error message:

EntityMetadataWrapperException: Unknown data property title_field. in EntityStructureWrapper->getPropertyInfo() (line 318 of [...]/sites/all/modules/contrib/entity/includes/entity.wrapper.inc

Notice that I also receive various hunks when applying the patch:

Hunk #1 succeeded at 87 (offset 6 lines).
Hunk #2 succeeded at 107 (offset 6 lines).
Hunk #3 succeeded at 156 (offset 6 lines).
Hunk #4 succeeded at 168 (offset 6 lines).

Maybe the patch has been applied against another version. Is a newer / modified version already available?

Regards,
Tobias

plach’s picture

EntityMetadataWrapperException: Unknown data property title_field. in EntityStructureWrapper->getPropertyInfo() (line 318 of [...]/sites/all/modules/contrib/entity/includes/entity.wrapper.inc

You probably did not replace the node title with a title field (see the replace link in the manage fields page of your content type), however Title should handle this in a more friendly way: can you open an issue in the Title queue?

Notice that I also receive various hunks when applying the patch:
[...]
Maybe the patch has been applied against another version. Is a newer / modified version already available?

It seems the patch is ok: git apply applies the patch on the dev release without complaining.

tte’s picture

Thanks for the fast response!

Converting a node's title to a title field worked without a hitch. However, I wonder how to automatically create an URL alias in the target language.

For now, I have created a node which has the following URL:

/de/example/beispiel-1

When adding an entity translation (e.g., in English), a corresponding URL alias is not created, e.g.,

/en/example/example-1

Maybe it has something to do with the following notices:

Notice: Undefined index: href in entity_translation_overview() (Zeile 112 von [...]/sites/all/modules/contrib/entity_translation/entity_translation.admin.inc).

Notice: Undefined index: label in ctools_context_entity_get_children() (Zeile 39 von [...]/sites/all/modules/contrib/ctools/plugins/contexts/entity.inc).

tte’s picture

Duplicate comment, removed.

plach’s picture

However, I wonder how to automatically create an URL alias in the target language.

Please open a support request for this (preliminary question, don't answer here: are you using the alias field in the translation page?)

Maybe it has something to do with the following notices:

Unlikely. However the attached patch should fix the first notice which is probably caused by #1060246: Translation alters language switch links even if node translation is disabled. No idea for the second one: which module are you using that requires CTools?

plach’s picture

StatusFileSize
new2.85 KB

The patch :)

tte’s picture

Thanks, worked perfectly! This time without hunks, too.

Regarding the automatic URL aliases: For now, I altered the form to incorporate the default alias when saving the node for the first time. This way I have

/de/example/example-1

as well as

/en/example/example-1

which is my use case, at least. ;)

Maybe we can make this a default? In this case, I'd give it a shot and work on a patch.

Cheers
Tobias

Btw. Views uses CTools. :)

plach’s picture

Status: Needs review » Fixed

Committed to HEAD.

Status: Fixed » Closed (fixed)

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

plach’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new2.03 KB

Small follow-up: in the translation overview the entity label is displayed in the current language in the "original content" row. Instead it should be always displayed in the "original" language.

joostvdl’s picture

Patch #20 is working!

plach’s picture

Status: Needs review » Fixed

Committed to HEAD.

Status: Fixed » Closed (fixed)

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

plach’s picture

Status: Closed (fixed) » Fixed
StatusFileSize
new940 bytes

Another follow up: title_entity_label was called even when entity labels were not replaced.

Committed the attached patch to HEAD.

Status: Fixed » Closed (fixed)

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

  • Commit a8e3927 on master, et-permissions-1829630, factory, et-fc, revisions by plach:
    Issue #1003876 by good_man, plach: Introduced support for translated...
  • Commit 6eb4208 on master, et-permissions-1829630, factory, et-fc, revisions by plach:
    Issue #1003876 by plach, good_man: (follow-up) Fixed original label...
  • Commit aaafd2a on master, et-permissions-1829630, factory, et-fc, revisions by plach:
    Issue #1003876 by plach: (follow-up) Fixed labels not replaced by Title...

  • Commit a8e3927 on master, et-permissions-1829630, factory, et-fc, revisions, workbench by plach:
    Issue #1003876 by good_man, plach: Introduced support for translated...
  • Commit 6eb4208 on master, et-permissions-1829630, factory, et-fc, revisions, workbench by plach:
    Issue #1003876 by plach, good_man: (follow-up) Fixed original label...
  • Commit aaafd2a on master, et-permissions-1829630, factory, et-fc, revisions, workbench by plach:
    Issue #1003876 by plach: (follow-up) Fixed labels not replaced by Title...