<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>

CC BY-SA 3.0
2016-07-16T13:52:03.417Z
2016-07-16T13:52:03.417Z
joomkit
<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>

CC BY-SA 3.0
2016-07-15T08:19:41.963Z
Are the entries selected in the `entryLink` field enabled for French?
Mats Mikkel Rummelhoff
CC BY-SA 3.0
2016-07-15T11:34:21.823Z
I have checked field from menu "entryLink", and content entries - all are enabled and translatable.
joomkit
CC BY-SA 3.0
2016-07-15T17:03:29.000Z
@joomkit Can you add your update as an official answer?
Brad Bell
CC BY-SA 3.0
2016-07-16T13:52:33.810Z
I cant vote my own posts as answer...but happy to change - let me know what you need me to do
joomkit
<localization>
Dropdown template URI breaks on language switch
# 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 %}
        
            {{ entry.title }} 

            
                {% for child in entry.getDescendants() %}
                    
                        {{ child.title }}
                    
                {% endfor %}
            
        

    {% elseif entry.level == 1 and not entry.hasDescendants() %}

        
            {{ entry.title }}
        

    {% 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**: @joomkit 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:
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


---

