I can only create translations for the built-in content types 'page' and 'story', but not for custom content types.
To reproduce:
1. Create a new content type and set the 'Multilingual support' option to 'Enabled, with translation' (in the 'Workflow settings' fieldgroup)
2. Create a new node of your newly defined content type and set the language of the node to some specific language (e.g. German)
3. Visit/view your new node and click on 'Translate'
4. In my example it looks like this:
Language Title Status Operations
English n/a Not translated add translation
German (source) Kontakt Published edit
5. Click on 'add translation' in the row for a language there's no translation, yet.
6. Seems like you're back at the same page as '/node/add/' (although the URL in the browser is '.../node/add/fewo_page?translation=2&language=en'). It's not possible to add a translation for your node.
7. Do the same with the built-in content types 'page' and 'story', there it works.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | node-type-hyphens.patch | 1.88 KB | gábor hojtsy |
| #1 | trans-hyphens.patch | 1.03 KB | keith.smith |
Comments
Comment #1
keith.smith commentedAs far as I can tell, this ONLY happens on content type names with underscores in them. I don't think that translation module is correctly replacing these underscores with hyphens when it constructs the url for the "add translation" link in the table.
In testing, the attached patch seems to fix it for me.
My standard disclaimer applies: be aware that I only have the slimmest clue about what I'm doing.
Comment #2
keith.smith commented(as evidenced by me forgetting to adjust the status)
Comment #3
pwolanin commentedThe hyphen to underscore switching was the worst idea since I dunno what.... makes for fragile code.
Comment #4
gábor hojtsyWell, I see this is done to construct the node/add link, so well, we need to do the same in translation module. Agreed with pwolanin.
I grep-ed the Drupal source for more such cases, and found one more in forum module, which I fixed as well. Committed the attached patch.
Note that I don't think this is any critical.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.