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.
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | et-1003876-24.patch | 940 bytes | plach |
| #20 | et-1003876-20.patch | 2.03 KB | plach |
| #16 | et-1003876-15.patch | 2.85 KB | plach |
| #10 | et-1003876-10.patch | 2.9 KB | plach |
| #9 | et-1003876-9.patch | 2.76 KB | plach |
Comments
Comment #1
sunThe plan is that Title module will provide that fundamental "entity label as a field" facility for us.
Comment #3
good_man commentedCan I reopen this issue provide Title integration.
A patch to review.
Comment #4
good_man commentedupdated one.
Comment #5
good_man commentedFixed the case that the module is enabled & content type is not using Title
Comment #6
good_man commentedThoughts and ideas?
Comment #7
plachWe 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.Comment #8
plachMoving to the Entity Translation queue. Read #902760: Change module name so it can work with Core translation for details.
Comment #9
plachHere is a patch exploiting the Title module if available.
Comment #10
plachBetter one.
Comment #11
tte commentedHi,
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
Comment #12
plachYou 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?
It seems the patch is ok:
git applyapplies the patch on the dev release without complaining.Comment #13
tte commentedThanks 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).
Comment #14
tte commentedDuplicate comment, removed.
Comment #15
plachPlease open a support request for this (preliminary question, don't answer here: are you using the alias field in the translation page?)
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?
Comment #16
plachThe patch :)
Comment #17
tte commentedThanks, 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. :)
Comment #18
plachCommitted to HEAD.
Comment #20
plachSmall 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.
Comment #21
joostvdl commentedPatch #20 is working!
Comment #22
plachCommitted to HEAD.
Comment #24
plachAnother follow up: title_entity_label was called even when entity labels were not replaced.
Committed the attached patch to HEAD.