When I am trying to translate the menu item under main menu e.g "About US" its show the message like You are not authorised to access this page. I have checked all the permissions to the admin account. And also select the multilingual option "translate and localize" but same error occur. I don't know where i can troubleshoot this error.

Comments

simnav created an issue. See original summary.

cilefen’s picture

Status: Active » Fixed

Edit the menu settings and select "Translate and Localize" for Translation mode.

simnav’s picture

i did this but same error appear

simnav’s picture

This error is occur only for inbuilt features like Main Menu, Navigation,Features.. i have a custom menu name "award menu" and this is translated well and that error doesn't appear but this is appear for main menu,navigation,features..

simnav’s picture

Status: Fixed » Active
cilefen’s picture

Project: Drupal core » Internationalization
Version: 7.x-dev » 7.x-1.x-dev
Component: language system » Blocks
Category: Support request » Bug report

Is this with the Internationalization (i18n) module?

cilefen’s picture

Component: Blocks » Menus
simnav’s picture

yes, i am using Internationalization module and while translating the main menu link items error appear access denied

joseph.olstad’s picture

@simnav , does that admin menu have links with paths to unpublished content? are you using workbench moderation ? could be some combination of a conflict with another contrib module and some data thats in the menu links or menu.

zalak.addweb’s picture

Issue tags: +Access denied
joseph.olstad’s picture

from comment
#1800450-31: access deny on admin/structure/menu/item/*/translate with i18n_menu enabled (403 page)

miksha CreditAttribution: miksha commented

I installed latest Drupal 7.61 with i18n_menu Version: 7.x-1.26 and after adding language and activating translation on Main Menu I clicked on translate link for "Home" and got "You are not authorized to access this page.". I searched a bit and didn't found a solution on the internet, but then I clicked on edit link for the menu item and saw that item is language neutral. When I set it to English and saved, I was later able to click Translate link without access denied message.

Shuldn't i18n_menu give message that user cannot translate link that is language neutral instead of showing access denied page?

miksha’s picture

@josseph.olstad Thank you for pointing me to this issue.

I think that this is checked at line 535 of i18n_menu.module, and here should be implemented some ELSE option, but I now don't have time to debug it. Even function description says " Only links that have a language property":

<code>/**
 * Check whether this link is to be processed by i18n_menu and start processing.
 */
function _i18n_menu_link_process(&$link) {
  // Only links that have a language property and haven't been processed before.
  // We also translate links marked as hidden because core breadcrumbs ignore
  // that flag and excluding them would basically interfere with core behaviour.
  // We also check that they belong to a menu with language options.
  if (empty($link['i18n_menu']) && !empty($link['language']) && !empty($link['access']) && i18n_menu_mode($link['menu_name'])) {
    // Mark so it won't be processed twice.
    $link['i18n_menu'] = TRUE;
    // Skip if administering this menu or this menu item.
    if (arg(0) == 'admin' && arg(1) == 'structure' && arg(2) == 'menu') {
      if (arg(3) == 'manage' && $link['menu_name'] == arg(4)) {
        return FALSE;
      }
      elseif (arg(3) == 'item' && arg(4) == $link['mlid']) {
        return FALSE;
      }
    }
    // Skip if administering this menu item through the node edit form.
    elseif (arg(0) == 'node' && arg(2) == 'edit' && $link['link_path'] == arg(0) . '/' . arg(1)) {
      return FALSE;
    }
    return TRUE;
  }
  else {
    return FALSE;
  }
}

AzMCHICHI’s picture

Hi,

For already existing menu items, just edit and save the menu item before the first translation

Alen Simonyan’s picture

go here

/admin/config/regional/translate/i18n_string

and check menu or other entity to be translated

this will solve problem