'Node Translation' page (node/[nid]/translation) doesn't have any 'TMGMT' controls (checkboxes, 'Add to cart' button, 'Request translation' button, etc.) in case if 'Block' module is deactivated (please see attached screenshots). So basically 'TMGMT' module has implicit dependency to 'Block' module.
It happens because 'TMGMT' module alters 'Node Translation' page only if $page['content']['system_main']['translation_node_overview'] or $page['content']['system_main']['content']['translation_node_overview'] variables exist (see tmgmt_node_ui_page_alter()
function). But if 'Block' module is deactivated and there are no other modules that init $page['content']['system_main'] the 'TMGMT' doesn't alter 'Node Translation' page.
One of the way to fix it is to implement tmgmt_page_build() hook (please see the patch in attachment). This solution is far from ideal one but it is just a suggestion.
Comment | File | Size | Author |
---|---|---|---|
tmgmt_node_ui.module.patch | 1.4 KB | trekhleb | |
Translation page IS NOT altered.png | 15.8 KB | trekhleb | |
Translation page is altered.png | 37.85 KB | trekhleb |
Comments
Comment #1
BerdirYeah, this is a known issue, see https://www.drupal.org/node/1691772, although so far we've only seen it when the main block was misconfigured. Obviously it happens to when block isn't even enabled.
Comment #2
trekhleb CreditAttribution: trekhleb commentedComment #3
trekhleb CreditAttribution: trekhleb commentedThank you for the link, Berdir :) We don't use 'Block' module in our current installation. So for now the issue has been fixed in our project by creating a kind of 'fixer' feature that has its own HOOK_page_build() with the following code:
But it would be nice to get rid of it in the future :)
Comment #4
BerdirYeah, I'm not sure what a good solution would be. We tried to avoid altering the menu callback because i18n_node already does that, so that will get complicated very quickly.
IIRC, in the Drupal 8 port, I switched to that approach.
Comment #5
jlnd CreditAttribution: jlnd as a volunteer commentedI had this issue as well, but in my case the Block module is enabled. There must be some other module that is interfering for me. In any case the patch worked for me. Thanks @trekhleb.
Comment #6
BerdirSee comment #1, you probably don't have a main content block. You should add one, your site only works because of a safety net.
Comment #7
jlnd CreditAttribution: jlnd as a volunteer commentedBerdir, that was it! I'm sorry. I feel like an amateur. I had checked those settings for our front-end theme, but not our back-end theme, which of course is where it matters. Thanks!
Comment #8
kbrinnerI have run through the installation and setup instructions for TMGMT (trying it out with Google Translate) but I'm still not seeing any of the TMGMT controls. I checked the block config at structure ->blocks -> Main page content, and we don't have anything unusual set up here - set to show on all pages (not restricted) and it's not restricted on content types or any other visibility settings. Any other thoughts about what might be interfering with the display of the controls?
Comment #9
jlnd CreditAttribution: jlnd as a volunteer commentedkbrinner, have you checked permissions (/admin/people/permissions) ?
Comment #10
kbrinnerI was doing all of this as the main site administrator so I didn't think to check permissions - just assumed I had all possible permissions. Unfortunately I have rolled back my db to try using entity translation without translation management toolkit so I can't check to see if there were some permissions that needed to be changed. If in the future I try the toolkit again I will double check permissions. Thank you for your quick response.