Answers.Body: <p>UPDATE:
  Mats you were right - I didnt have any data in the french menus or i had random custom url data. Once corrected the entry model came back whole. Phew</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-16T13:52:03.417Z
Answers.LastActivityDate: 2016-07-16T13:52:03.417Z
Answers.UserDisplayName: joomkit
Body: <p>I have the following code in my header of a multilingual site. It produces the correct urls in english.</p>
  
  <pre><code>{% for entry in menuentries %}
  
      {% if entry.entryLink.first|length %}
          {% set navlink = entry.entryLink.first().uri %}
      {% elseif entry.customMenuUrl|length %}
          {% set navlink = entry.customMenuUrl %}
      {% endif %}
  
      {% if entry.level == 1 and entry.children|length %}
          &lt;li class="dropdown"&gt;
              &lt;a href="{{ siteUrl }}{{ navlink }}" class="dropdown-toggle {{ macros.activeLinkClass(entry.uri, entry.level)|trim }} level{{ entry.level }}" data-toggle="dropdown" role="button" data-hover="dropdown" data-length="{{ entry.title|length }}aria-haspopup="true" aria-expanded="false"&gt;{{ entry.title }} &lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt;
  
              &lt;ul class="dropdown-menu" &gt;
                  {% for child in entry.getDescendants() %}
                      &lt;li&gt;
                          &lt;a  href="{{ siteUrl }}{{ child.entryLink.first().uri  }}" class="{{ macros.isActiveChildClass(child.slug) | trim }} level{{ child.level }}"&gt;{{ child.title }}&lt;/a&gt;
                      &lt;/li&gt;
                  {% endfor %}
              &lt;/ul&gt;
          &lt;/li&gt;
  
      {% elseif entry.level == 1 and not entry.hasDescendants() %}
  
          &lt;li&gt;
              &lt;a href="{{ siteUrl }}{{ navlink }}" class="{{ macros.activeLinkClass(entry.uri, entry.level) |trim }} level{{ entry.level }}"&gt;{{ entry.title }}&lt;/a&gt;
          &lt;/li&gt;
  
      {% endif %}
  </code></pre>
  
  <p>However when I switch languages eg. to french the <code>child.entryLink.first().uri</code> returns null. Even if I just change the <code>en</code> to <code>fr</code> I get the same result. Bit confused.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-15T08:19:41.963Z
Comments.Text: Are the entries selected in the `entryLink` field enabled for French?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-15T11:34:21.823Z
Comments.Text: I have checked field from menu "entryLink", and content entries - all are enabled and translatable.
Comments.UserDisplayName: joomkit
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-15T17:03:29.000Z
Comments.Text: @joomkit Can you add your update as an official answer?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-16T13:52:33.810Z
Comments.Text: I cant vote my own posts as answer...but happy to change - let me know what you need me to do
Comments.UserDisplayName: joomkit
Tags: <localization>
Title: Dropdown template URI breaks on language switch
ThreadText: # Dropdown template URI breaks on language switch
  
  (Asked by: username_0 on 2016-07-15)
  
  I have the following code in my header of a multilingual site. It produces the correct urls in english.
  
  ```
  {% for entry in menuentries %}
  
      {% if entry.entryLink.first|length %}
          {% set navlink = entry.entryLink.first().uri %}
      {% elseif entry.customMenuUrl|length %}
          {% set navlink = entry.customMenuUrl %}
      {% endif %}
  
      {% if entry.level == 1 and entry.children|length %}
          <li class="dropdown">
              <a href="{{ siteUrl }}{{ navlink }}" class="dropdown-toggle {{ macros.activeLinkClass(entry.uri, entry.level)|trim }} level{{ entry.level }}" data-toggle="dropdown" role="button" data-hover="dropdown" data-length="{{ entry.title|length }}aria-haspopup="true" aria-expanded="false">{{ entry.title }} <span class="caret"></span></a>
  
              <ul class="dropdown-menu" >
                  {% for child in entry.getDescendants() %}
                      <li>
                          <a  href="{{ siteUrl }}{{ child.entryLink.first().uri  }}" class="{{ macros.isActiveChildClass(child.slug) | trim }} level{{ child.level }}">{{ child.title }}</a>
                      </li>
                  {% endfor %}
              </ul>
          </li>
  
      {% elseif entry.level == 1 and not entry.hasDescendants() %}
  
          <li>
              <a href="{{ siteUrl }}{{ navlink }}" class="{{ macros.activeLinkClass(entry.uri, entry.level) |trim }} level{{ entry.level }}">{{ entry.title }}</a>
          </li>
  
      {% endif %}
  
  ```
  
  However when I switch languages eg. to french the `child.entryLink.first().uri` returns null. Even if I just change the `en` to `fr` I get the same result. Bit confused.
  
  **Tags:** localization
  
  > **Comments:**
  > **username_1**: Are the entries selected in the `entryLink` field enabled for French?  
  > **username_0**: I have checked field from menu "entryLink", and content entries - all are enabled and translatable.  
  > **username_2**: @username_0 Can you add your update as an official answer?  
  > **username_0**: I cant vote my own posts as answer...but happy to change - let me know what you need me to do  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-07-16. Score: 2
  
  UPDATE:
  username_1 you were right - I didnt have any data in the french menus or i had random custom url data. Once corrected the entry model came back whole. Phew
  
  
  ---
  
  