We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44195
    • 293 Posts
    I'm having some trouble with the links PDOMenu is generating when using MigxMultiLang. I can't seem to stop it from caching.
    It's definitely a caching issue because if I clear the cache it works fine for a single time after.

    It's not generating a link with the correct cultureKey in the PDOMenu call only.

    Routing depending on the URL is working fine. If I use
    localhost/fr/home.html then I get the French version of that page no problem. cultureKey is fr, and all the menu links show /fr/page.html

    Then if I try localhost/en/home.html I get the English version of that page no problem. cultureKey is en, but all the menu links still show /fr/page.html

    My PDOMenu call is
    [[!pdoMenu? 
      &parents=`6,-7`
      &level=`1`
      &includeTVs=`mml_pagetitle,mml_longtitle,mml_menutitle`
      &prepareTVs=`1`
      &tvPrefix=`tv.`
      &loadModels=`migxmultilang`
      &prepareSnippet = `mmlTranslatePdoToolsRow`
      &tplOuter=`outerNavMenu`
      &tpl=`navMenu`
    ]]
    


    I have also tried [![!pdoMenu]] without any luck.



    Edit: Sorry, it's not just the links. It's the entire menu. Text and all.

    2nd Edit: Even just after clearing the cache it appears to not show the text from the second language in the menu - it's just showing the text from the default language. It only shows the updated link and cultureKey. [ed. note: muzzstick last edited this post 9 years, 2 months ago.]
      I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
      Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
      • 44195
      • 293 Posts
      Changing my
      <base href="[[!++site_url]]">

      to
      <base href="[![!++site_url]]">

      appears to have fixed the caching problem with the menu links but I'm still not getting text from the second language in the menu.


      UPDATE: Ok it's nothing to do with pdoMenu, it's just that's the only place I was referencing those fields.

      Even if I am to simply put [[+mml_pagetitle]] on a page, only the value from the first language comes through. It's not to do with caching, it's always like that.
      Any normal TVs I've made work fine with the translation. It's only the default resource fields you create during the migxmultilang installation that aren't working.

      The only ones I need really are mml_pagetitle, mml_longtitle and mml_menutitle. The ssecond language definitely has values set. [ed. note: muzzstick last edited this post 9 years, 2 months ago.]
        I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
        Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com