We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16402 ☆ A M B ☆
    • 33 Posts
    Upgraded from 2.2.5 to 2.2.7 and some links quit displaying. Intracontext links work fine, but a link to a different context disappears. I'm using Babel with a site, with contexts for web, english and german. My CSS file is a MODX page in the web context. In the language-context templates I have this line:

      <link href="[[~2]]" rel="stylesheet" type="text/css" />
    

    The resulting HTML now looks like this:

      <link href="" rel="stylesheet" type="text/css" />
    

    Also, within each language context - my template includes the snippet "other_language_link":

        $other_language_link = '';
        if ($modx->getOption('cultureKey') == 'en') {
            $other_language_link = '<a href="[[~4]]">Deutsch</a>';
        }
        else {
            $other_language_link = '<a href="[[~3]]">English</a>';
        }
        return $other_language_link;
    


    Which now yields:

          <a href="">Deutsch</a>
    


    The resources all exist and this was all working right up until I upgraded the MODX version in MODX cloud. Any suggestions?


    [ed. note: ksofttech last edited this post 13 years, 5 months ago.]
      Paul Kabotie, Software Engineer & MODX Ambassador
      Rocky Mountain Region - Denver, CO
      Linkedin: http://www.linkedin.com/pub/paul-kabotie/b/a24/208/

      Attend one of our meetups! http://www.meetup.com/modx-denver/
      Join us on Facebook: http://www.facebook.com/pages/Rocking-MODX-in-Denver/152662201549963
      • 42901 ☆ A M B ☆
      • 73 Posts
      We're experiencing a similar issue in 2.2.7 with linking although my issue has to do with Wayfinder. I don't know if these have anything in common but I never had issues with 2.2.6 and links.

      Makes me a little afraid to upgrade my 2.2.6 sites.
        Woodlands Ad Agency
        Our blog should NOT be read by anyone....EVER http://woodlandsadagency.com/blog/
        ...Don't say we didn't warn you.
        • 40045
        • 534 Posts
        Could be related to the post here: https://forums.modx.com/thread/83923/site-start-url-bug-after-upgrading-to-2-2-7#dis-post-463200

        so does adding &scheme=`abs` to the link tags (eg [[~3? &scheme=`abs`]] help?

        would be interesting anyways why this doesn't work anymore =)
          • 16402 ☆ A M B ☆
          • 33 Posts
          Thanks for the suggestion. Tried the "? &scheme=`abs`", and no, it didn't fix it.
            Paul Kabotie, Software Engineer & MODX Ambassador
            Rocky Mountain Region - Denver, CO
            Linkedin: http://www.linkedin.com/pub/paul-kabotie/b/a24/208/

            Attend one of our meetups! http://www.meetup.com/modx-denver/
            Join us on Facebook: http://www.facebook.com/pages/Rocking-MODX-in-Denver/152662201549963
            • 9102 ☆ A M B ☆
            • 318 Posts
            I had the same problem. I was able to get around it by using makeUrl in a snippet, like this:

            Snippet myMakeURL:

            <?php
            
            $id = $modx->getOption('id',$scriptProperties,1);
            $context = $modx->getOption('context',$scriptProperties,'');
            $args = $modx->getOption('args',$scriptProperties,'');
            $scheme = $modx->getOption('scheme',$scriptProperties,'full');
            
            return $modx->makeUrl($id,$context,$args,$scheme);
            


            Snippet call (inside a listing snippet template, such that the resource id is a placeholder):

            [[myMakeURL? &id=`[[+id]]`]]
            


            You can use the context and scheme options to force a particular context or format if you like. It correctly defaults to the resource context if you don't put in a context. [ed. note: esnyder last edited this post 13 years, 4 months ago.]
              • 16402 ☆ A M B ☆
              • 33 Posts
              Good 'ol Eli - the Can-Do man! Great workaround.

              I thought maybe I was doing something wrong. I submitted a bug report today.
                Paul Kabotie, Software Engineer & MODX Ambassador
                Rocky Mountain Region - Denver, CO
                Linkedin: http://www.linkedin.com/pub/paul-kabotie/b/a24/208/

                Attend one of our meetups! http://www.meetup.com/modx-denver/
                Join us on Facebook: http://www.facebook.com/pages/Rocking-MODX-in-Denver/152662201549963
                • 9102 ☆ A M B ☆
                • 318 Posts
                LOL thanks! I think someone else submitted this as a bug too. It shouldn't make any difference whether makeUrl is called inside a snippet or as a tag. There must be something wrong with the tag parser. I suppose I should try to debug it, but I really don't have time at the moment.