We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9763
    • 16 Posts
    i can link to images and documents and full urls fine. however, if i set the link url to say [~4~] (to link to doc with id 4), the actual code inserted into the souce is as follows:

    <a href="/manager/[~4~]">services</a>


    On the front end, the link id gets converted to the right alias, but since it is prefixed by /manager/ none of the links work! sad
    I know I could overcome this by linking to the full URL each time, but this would get messy if URLs were ever changed...

    I have looked through all my settings, trying to find somewhere where manager is included in a path setting and can’t find it...
    I don’t think this is connected to my friendly URLs setup, since everything else is working a treat, and the /manager/ bit gets added in by the tinymceeditor as soon as the link dialog box is closed.

    Has anyone had similar problems? I really hope that this is something silly that is easily fixed.

    here is my setup:
    iis 6,
    tinymce editor,
    friendly urls: yes (managed by a server component)
    use friendly aliases: yes
    use friendly alias path: yes (have tried setting this to no but it does not help)
    file manager path: E:/websites/modx/

    i have been asking several questions here lately as i try to get up and running with modxcms and you guys have been really helpful. i am reading the documentation and searching the forums first with each problem i encounter, so apologies if i am asking silly questions!

    thanks for your time
      • 32241
      • 1,495 Posts
      I don’t really get it though, why do you need to append manager dir on there, why not just <a href="[~44~]">services</a>?
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 18397
        • 3,250 Posts
        RTE?
          • 9763
          • 16 Posts
          thanks for replying

          @wendy: i’m not putting manager in there, i just set the link url to [~4~] but /manager/[~4~] is what ends up in the souce.

          @mark: i’m afraid i don’t understand - what does RTE stand for - i’m not with the lingo! smiley

          by the way, i have now switched from the component i was using for rewriting URLs on IIS to the standard modx recommendation of pointing 404 and 405 custom error pages at /index.php. I just hope that’s search engine friendly... so hopefully that removes the friendly urls from the equation. just to be sure, i turned off friendly urls altogether briefly and still saw the same behaviour - /manager/ gets put in front of *all* the link paths sad

          i’m just hoping someone has ran into this before... i’m probably doing something stupid...
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Take a look at the /manager/includes/config.inc.php file, and see what it has to say about the default site_url. Sounds like that got the /manager/ in it somehow. MODx uses that value to create the full URLs from the [~xx~] tags.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 32241
              • 1,495 Posts
              RTE = RichTextEditor.

              Btw, when you add the link, are you using RTE or not? Is it on the page content? If yes, try to add a link, and view source, if you’re using RTE.

              Please explain more on how the things happened, and what did you do before you see the link being appended with manager.
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media
                • 18397
                • 3,250 Posts
                Sorry about just responding with "RTE". I was on a moble device (per the mobile device icon ) and couldn’t type much. I was asking whether or not you were adding the link in FCKeditor (the default RTE) or manually.
                  • 9763
                  • 16 Posts
                  right well, i’m using tinymce editor and the panel i am editing is the standard document content one.

                  i just switched back to the fckeditor and the links seemed to go in ok - i assume you need to set the protocol to other when adding internal links of format [~id~] in fckeditor?

                  it’s great that i can workaround this by switching editor, but i would very much like to use tinymce editor if at all possible. so, in case it will help diagnose the problem, here is exactly what i am doing:

                  i go to edit a page
                  in the tinymce panel for the document content, i highlight text and click the insert/edit link icon.
                  then in the popup window, i fill in [~4~] for the link url, leave everything else alone and click insert.
                  back in the tinymce panel, if i click the edit HTML source icon, i see that the link has been inserted in the code by the editor as <a href="/manager/[~4~]">services</a>.

                  thanks for your time
                    • 8461
                    • 205 Posts
                    i just switched back to the fckeditor and the links seemed to go in ok - i assume you need to set the protocol to other when adding internal links of format [~id~] in fckeditor?

                    Just a small point, when you enter the ID number in FCK Editor, always remember to change the protocol to other in the drop down as you have identified, then FCK wont screw up the page number link that you enter as [~4~]
                      • 18436
                      • 135 Posts
                      I encountered the same problem last night after installing and using TINYMCE 2.0.4, to make matters worse all my images urls were changed to! i.e. I enter "[*templatePath*]/images/01.jpg" and it spits out "/development/swellguys.co.za/[*templatePath*]/images/01.jpg"

                      I turn off image rewrites by default, and when I switch to FCKEditor it works fine, so the problem is definitely with TINYMCE.