0
Welcome Guest! Login
0 items Join Now

Multilingual menus

    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Multilingual menus

    Posted 9 years 10 months ago
    • Hi,

      I'm trying to implement the Gantry 5 Hydrogen template on a multi-lingual site and am coming across a problem related to the menus.

      I have added menu items and properly configured the multi-lingual features of J3.4.1 so that each menu (EN, FR, DE, ES and IT) have the same 6 menu items (Home, Sales, Rentals, Services, About, Search).

      The Main Menu in English displays the proper items:

      This image is hidden for guests.
      Please log in or register to see it.


      However, the other menus state that the selected menu is empty.

      This image is hidden for guests.
      Please log in or register to see it.


      However, if you access the menu manager, you will see that the menu in questions is not empty, the menu module associated with it is published, as are each item in the menu.

      This image is hidden for guests.
      Please log in or register to see it.


      Please advise on how to solve this.
    • Thank you.

      Ali Samii
    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: Multilingual menus

    Posted 9 years 10 months ago
    • It might help you to see the Exception notice
      Whoops \ Exception \ ErrorException (E_NOTICE)
      HELP
      Undefined index:
      Open: /Volumes/site/utpr2.dev/public/libraries/gantry5/classes/Gantry/Admin/Controller/Html/Menu.php
                          $ordering[$path] = $list;
                      }
                  }
              }
       
              $data = new Config([]);
              $data->set('settings', $settings);
              $data->set('ordering', $ordering['']);
              $data->set('items', $items);
       
      Server/Request Data
      HTTP_AUTHORIZATION	
      HTTP_HOST	utpr2.dev
      HTTP_ACCEPT	*/*
      HTTP_ACCEPT_ENCODING	gzip, deflate
      HTTP_ACCEPT_LANGUAGE	en-gb
      CONTENT_TYPE	application/x-www-form-urlencoded
      HTTP_ORIGIN	http://utpr2.dev
      CONTENT_LENGTH	71
      HTTP_CONNECTION	keep-alive
      HTTP_USER_AGENT	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3
      HTTP_REFERER	http://utpr2.dev/administrator/index.php?option=com_gantry5&view=menu/menu-principal-es&style=10&1ff7dd63333dfab8e8b74567210b66f0=1
      HTTP_DNT	1
      HTTP_COOKIE	4884262b71f249da5ac5f34d0f2886e0=alohkbs4k62b7gdpbld14kbk92; cccbef3cfbc7949923db9ae7c03c97d3=5kd192e6010lut8ru1sat633q2; fc36c8c84206911ebc819df74619ddcc=en-GB
      PATH	/usr/bin:/bin:/usr/sbin:/sbin
      SERVER_SIGNATURE	
      SERVER_SOFTWARE	Apache/2.4.10 (Unix) PHP/5.5.24
      SERVER_NAME	utpr2.dev
      SERVER_ADDR	127.0.0.1
      SERVER_PORT	80
      REMOTE_ADDR	127.0.0.1
      DOCUMENT_ROOT	/Volumes/site/utpr2.dev/public
      REQUEST_SCHEME	http
      CONTEXT_PREFIX	
      CONTEXT_DOCUMENT_ROOT	/Volumes/site/utpr2.dev/public
      SERVER_ADMIN	ali.samii@ergonomiq.net
      SCRIPT_FILENAME	/Volumes/site/utpr2.dev/public/administrator/index.php
      REMOTE_PORT	63968
      GATEWAY_INTERFACE	CGI/1.1
      SERVER_PROTOCOL	HTTP/1.1
      REQUEST_METHOD	POST
      QUERY_STRING	option=com_gantry5&view=menu/menu-principal-es&style=10&1ff7dd63333dfab8e8b74567210b66f0=1&format=json
      REQUEST_URI	/administrator/index.php?option=com_gantry5&view=menu/menu-principal-es&style=10&1ff7dd63333dfab8e8b74567210b66f0=1&format=json
      SCRIPT_NAME	/administrator/index.php
      PHP_SELF	/administrator/index.php
      REQUEST_TIME_FLOAT	1431700924.887
      REQUEST_TIME	1431700924
      GET Data
      option	com_gantry5
      view	menu/menu-principal-es
      style	10
      1ff7dd63333dfab8e8b74567210b66f0	1
      format	json
      POST Data
      menutype	menu-principal-es
      settings	[]
      ordering	[]
      items	[]
      Files
      empty
      Cookies
      4884262b71f249da5ac5f34d0f2886e0	alohkbs4k62b7gdpbld14kbk92
      cccbef3cfbc7949923db9ae7c03c97d3	5kd192e6010lut8ru1sat633q2
      fc36c8c84206911ebc819df74619ddcc	en-GB
      Session
      __default	Array ( [session.counter] => 368 [session.timer.start] => 1431683376 [session.timer.last] => 1431700922 [session.timer.now] => 1431700924 [session.client.browser] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3 [registry] => Joomla\Registry\Registry Object ( [data:protected] => stdClass Object ( [application] => stdClass Object ( [lang] => ) [com_menus] => stdClass Object ( [items] => stdClass Object ( [menutype] => menu-principal-fr [limitstart] => 0 [list] => Array ( [fullordering] => a.lft ASC [limit] => 20 ) [filter] => Array ( [search] => [published] => [level] => [access] => [language] => ) ) [edit] => stdClass Object ( [item] => stdClass Object ( [id] => Array ( [0] => 109 [1] => 111 [2] => 112 [3] => 113 ) [data] => [type] => [link] => ) [menu] => stdClass Object ( [id] => Array ( ) [data] => ) ) ) [item] => stdClass Object ( [filter] => stdClass Object ( [menutype] => mainmenu-en-gb ) ) [com_modules] => stdClass Object ( [modules] => stdClass Object ( [filter] => stdClass Object ( [client_id_previous] => 0 ) ) [edit] => stdClass Object ( [module] => stdClass Object ( [id] => Array ( ) [data] => ) ) [add] => stdClass Object ( [module] => stdClass Object ( [extension_id] => [params] => ) ) ) ) [separator] => . ) [user] => JUser Object ( [isRoot:protected] => 1 [id] => 257 [name] => Super User [username] => ali.samii [email] => ali.samii@kooh.io [password] => $2y$10$/v1XijUGijncBKL7wQZwT.aXa4rfOQnRWuS1mO3ZHtFX2HXRPfBZm [password_clear] => [block] => 0 [sendEmail] => 1 [registerDate] => 2015-05-12 14:44:09 [lastvisitDate] => 2015-05-13 15:04:41 [activation] => 0 [params] => [groups] => Array ( [8] => 8 ) [guest] => 0 [lastResetTime] => 0000-00-00 00:00:00 [resetCount] => 0 [requireReset] => 0 [_params:protected] => Joomla\Registry\Registry Object ( [data:protected] => stdClass Object ( ) [separator] => . ) [_authGroups:protected] => Array ( [0] => 1 [1] => 8 ) [_authLevels:protected] => Array ( [0] => 1 [1] => 1 [2] => 2 [3] => 3 [4] => 6 ) [_authActions:protected] => [_errorMsg:protected] => [userHelper:protected] => JUserWrapperHelper Object ( ) [_errors:protected] => Array ( ) [aid] => 0 [otpKey] => [otep] => ) [session.token] => 1d4a28d8720b5f652e17ee20e2ef9398 )
      Environment Variables
      empty
      Registered Handlers
      0. Whoops\Handler\PrettyPageHandler
      1. Whoops\Handler\PlainTextHandler
      2. Whoops\Handler\JsonResponseHandler
    • Thank you.

      Ali Samii
    • Matias Griese's Avatar
    • Matias Griese
    • Sr. Rocketeer
    • Posts: 249
    • Thanks: 104
    • Lead Developer

    Re: Multilingual menus

    Posted 9 years 10 months ago
    • Can you try the same with RC2; I've done a few improvements on the menu page to better support multiple languages in it.

      There is still work to do on multi-language support, but we already have pretty solid plan on how we could make it easier.
    • The following users have thanked you: Ali Samii

    • Gantry 5, enjoy!
    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: Multilingual menus

    Posted 9 years 10 months ago
    • Hi, RC2 fixed the backend, but now switching to a different language on the frontend results in an exception.

      I am quoting the exception here:

      BTW, would you prefer that I report these types of errors as an issue on github?
      Whoops \ Exception \ ErrorException (E_NOTICE)
      HELP
      Undefined property: stdClass::$id
      Open: /Volumes/site/utpr2.dev/public/libraries/gantry5/classes/Gantry/Framework/Configurations.php
                  $template = \JFactory::getApplication()->getTemplate(true);
              }
       
              $gantry = $this->container;
              $locator = $gantry['locator'];
       
              $preset = $template->params->get('preset', 'default');
              $configuration = $template->params->get('configuration', $template->id);
       
              return is_dir($locator("gantry-config://{$configuration}")) ? $configuration : $preset;
      Server/Request Data
      REDIRECT_HTTP_AUTHORIZATION	
      REDIRECT_STATUS	200
      HTTP_AUTHORIZATION	
      HTTP_HOST	utpr2.dev
      HTTP_DNT	1
      HTTP_ACCEPT_ENCODING	gzip, deflate
      HTTP_COOKIE	4884262b71f249da5ac5f34d0f2886e0=alohkbs4k62b7gdpbld14kbk92; cccbef3cfbc7949923db9ae7c03c97d3=5kd192e6010lut8ru1sat633q2; fc36c8c84206911ebc819df74619ddcc=es-ES
      HTTP_CONNECTION	keep-alive
      HTTP_ACCEPT	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      HTTP_USER_AGENT	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3
      HTTP_ACCEPT_LANGUAGE	en-gb
      HTTP_REFERER	http://utpr2.dev/en/
      HTTP_CACHE_CONTROL	max-age=0
      PATH	/usr/bin:/bin:/usr/sbin:/sbin
      SERVER_SIGNATURE	
      SERVER_SOFTWARE	Apache/2.4.10 (Unix) PHP/5.5.24
      SERVER_NAME	utpr2.dev
      SERVER_ADDR	127.0.0.1
      SERVER_PORT	80
      REMOTE_ADDR	127.0.0.1
      DOCUMENT_ROOT	/Volumes/site/utpr2.dev/public
      REQUEST_SCHEME	http
      CONTEXT_PREFIX	
      CONTEXT_DOCUMENT_ROOT	/Volumes/site/utpr2.dev/public
      SERVER_ADMIN	ali.samii@ergonomiq.net
      SCRIPT_FILENAME	/Volumes/site/utpr2.dev/public/index.php
      REMOTE_PORT	55992
      REDIRECT_URL	/es/
      GATEWAY_INTERFACE	CGI/1.1
      SERVER_PROTOCOL	HTTP/1.1
      REQUEST_METHOD	GET
      QUERY_STRING	
      REQUEST_URI	/es/
      SCRIPT_NAME	/index.php
      PHP_SELF	/index.php
      REQUEST_TIME_FLOAT	1431939142.205
      REQUEST_TIME	1431939142
      GET Data
      empty
      POST Data
      empty
      Files
      empty
      Cookies
      4884262b71f249da5ac5f34d0f2886e0	alohkbs4k62b7gdpbld14kbk92
      cccbef3cfbc7949923db9ae7c03c97d3	5kd192e6010lut8ru1sat633q2
      fc36c8c84206911ebc819df74619ddcc	es-ES
      Session
      __default	Array ( [session.counter] => 5 [session.timer.start] => 1431938615 [session.timer.last] => 1431939136 [session.timer.now] => 1431939142 [session.client.browser] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3 [registry] => Joomla\Registry\Registry Object ( [data:protected] => stdClass Object ( ) [separator] => . ) [user] => JUser Object ( [isRoot:protected] => [id] => 0 [name] => [username] => [email] => [password] => [password_clear] => [block] => [sendEmail] => 0 [registerDate] => [lastvisitDate] => [activation] => [params] => [groups] => Array ( [0] => 9 ) [guest] => 1 [lastResetTime] => [resetCount] => [requireReset] => [_params:protected] => Joomla\Registry\Registry Object ( [data:protected] => stdClass Object ( ) [separator] => . ) [_authGroups:protected] => Array ( [0] => 1 [1] => 9 ) [_authLevels:protected] => Array ( [0] => 1 [1] => 1 [2] => 5 ) [_authActions:protected] => [_errorMsg:protected] => [userHelper:protected] => JUserWrapperHelper Object ( ) [_errors:protected] => Array ( ) [aid] => 0 ) [com_mailto.links] => Array ( [122bf3f15bd80c105419b34486bb08271e310d2e] => stdClass Object ( [link] => http://utpr2.dev/es/busqueda [expiry] => 1431939142 ) ) [session.token] => 61c640c647593fb19944c023d38756d0 )
      Environment Variables
      empty
      Registered Handlers
      0. Whoops\Handler\PrettyPageHandler
      1. Whoops\Handler\PlainTextHandler
      2. Whoops\Handler\JsonResponseHandler
    • Thank you.

      Ali Samii
    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: Multilingual menus

    Posted 9 years 10 months ago
    • This message contains only secure information that is visible to Ali Samii, moderators and administrators
    • Thank you.

      Ali Samii
    • Matias Griese's Avatar
    • Matias Griese
    • Sr. Rocketeer
    • Posts: 249
    • Thanks: 104
    • Lead Developer

    Re: Multilingual menus

    Posted 9 years 10 months ago
    • I'm not having any issues on changing languages in your frontend. It just works for me.

      If you want the fastest response from developers, errors like this are better to be reported in GitHub as otherwise they will be first handled by moderators, which will slow down the process. Forums in here have too many topics for me and the other developers, so we need some filtering to be able to do our work.

      So yes, for the issues that cannot be anything else than bugs, its better to use GitHub. Just be careful not to overuse the direct access as those issues and all their updates are going to be read by every single developer and it means less time on actually fixing the bugs. :)

      There is also Gitter chat in gitter.im/gantry/gantry5 for those who have GitHub account. It is used by developers to help each other and is closely followed by our team as well.
    • Last Edit: 9 years 10 months ago by Matias Griese.
    • Gantry 5, enjoy!
    • Matias Griese's Avatar
    • Matias Griese
    • Sr. Rocketeer
    • Posts: 249
    • Thanks: 104
    • Lead Developer

    Re: Multilingual menus

    Posted 9 years 10 months ago
    • Issue was caused by Advanced Template Manager. I've worked around the issue and added support for ATM, but there is still an Joomla API incompatibility in ATM, which may cause some temporary issues for example when copying styles.
    • Gantry 5, enjoy!

Time to create page: 0.059 seconds