We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25630
    • 22 Posts
    I am newbie in develloping websites. But after some work and using many hints from this forum, I have a small site working.

    Now I want to have a copy of the working site in a subdomain. This would allow me do implement new features without jeopardizing the working site.

    What I did is:
    - Create a subdomain test.mydomain.ch
    - Create a new database
    - Make a clean new installation of modx in the subdirectory of the subdomain: mydomain/subdomains/test/httpdocs/
    - Export the working database and import it to the new database
    - Copy the complete assets folder from the real site to the subdirectory of the subdomain
    - Turn friendly urls off
    - Make an Upgrad installation

    Check all Paths in the manager-configuration which seem to be ok.

    Now my problem:
    In the subdomain the site is displayed, wayfinder menus are working, but breadcumbs navigation dispaly nothing and ditto list are displayed correctly, but the links do not work.

    Does anybody have any suggestions on what the problem might be and how to resolve it?

    Thanks for your help!
      • 25630
      • 22 Posts
      Additional information to my question:

      I am using modX 1.0.

      If I click on a link from a ditto call I get the following strange url in my bowsers adress field:
      http://mydomain.net/index.php?id=12?phpMyAdmin=v40os0JDlPzYuR-Z6ybmW%2CIIYt1

      Up to ....index.php?id=12, things seem to be fine and it should go to the document with id 12, but any idea, where the rest of the adress is coming from?

      Many thanks for any help!
        • 3749
        • 24,544 Posts
        Look at the .htaccess file in the root of the subdirectory. If you’re not using FURLs, you should be able to rename that file so it will be ignored.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 25630
          • 22 Posts
          Thanks BobRay,

          I did as you advised, but it doesn’t make any difference. If pointing to a link from a ditto call, I get just the same kind of url with this strange appendix as shown above.
            • 3749
            • 24,544 Posts
            Quote from: rscha at Sep 11, 2009, 12:08 AM

            Thanks BobRay,

            I did as you advised, but it doesn’t make any difference. If pointing to a link from a ditto call, I get just the same kind of url with this strange appendix as shown above.

            What is your Ditto call and the contents of any Tpl chunks in it?
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 25630
              • 22 Posts

              Ditto Call:

              [!Ditto? &startID=`9` &tpl=`news_ditto_template` &showPublishedOnly=`1` &noResults=`Zur Zeit keine aktuellen Nachrichten` &sortBy=`Pagetitle` !]

              news-ditto_template:

              <div>
              <h4>[+pagetitle+]</h4>
              [+description+]
              <a href="[+url+]"> --> mehr </a>
              <p></p>
              </div>


              Breadcrumbs chunk, which also does not work:

              <div id="Navzeile">
              <base href="[(site_url)]" />
              [*TV_Bread*]
              </div>

              TV_Bread containing the default value:

              [!Breadcrumbs? &templateSet=`myString` &showCurrentCrumb=`1` &showHomeCrumb=`1` &showCrumbsAtHome=`1` &homePageId=`1` !]

              I appreciate your help.
                • 3749
                • 24,544 Posts
                I’m not sure if it will solve your problem, but for starters, this should go in the <head> section of your template, not in a tpl chunk:

                <base href="[(site_url)]" />


                Also, this may be interpreted as a closing comment tag and could confuse the browser:

                 --> mehr


                BTW, did you look in that .htaccess file to see if there’s a reference to "PhpMyAdmin?" Look also in any .htaccess files above that level (e.g. in public_html).
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 25630
                  • 22 Posts
                  Sorry, I have to apologize: The ditto_template i posted came from the live-site and not from the testsite in the subdomain. (naive me - thought they must identical embarrassed )


                  In the subdomain, it reads

                  <div>
                  <h4>[+pagetitle+]</h4>
                  [+description+]
                  <a href="[+url+]?phpMyAdmin=v40os0JDlPzYuR-Z6ybmW%2CIIYt1">mehr darüber</a>
                  <p> </p>
                  </div>

                  So - obvious where the strange url comes from!

                  I use anothe ditto call on the site, its template reading

                  <ul style="list-style-type:circle">
                  <li>
                  <a href="[+url+]?phpMyAdmin=v40os0JDlPzYuR-Z6ybmW%2CIIYt1"> [+pagetitle+] </a>
                  </li>
                  </ul>

                  That clears things. If I correct the code, everything works just fine.
                  The question remains, where does this akward additional string come from? ?phpMyAdmin is not yet part of my vocabulary.

                  I guess, it might be the plesk bug, ganeshXL pointed to, I am indeed using plesk. Quite shocking to me naive newbie, that exporting and importing the DB can alter its content huh

                  Also the point about the breadcrumbs not working is somehow clarified : in the subdomain site, the additional template "mystring" I added to the breadcumbs snippet code, to alter the separator sign, didn’t get copied. Again the question arises, why not? Should this not be copied, when you copy the whole assets directory? Where by the way are the snippets stored, which do not have a subdirectory in the assets/snippets/.. directory?

                  I might delete the subdomain and redo it from start, just to look, if this happens again. Or is there any better way, to copy a whole site, then the process I described in my first post?

                  Many thanks to all of you.







                    • 3749
                    • 24,544 Posts
                    PhpMyAdmin is a program for reading, managing, and altering your MySQL database.

                    It looks like you’ve been bitten by an uncommon interaction between PhpMyAdmin and your control panel. From the reports in the thread referred to above, that string actually gets added to certain fields in the MODx database. I think I would consider changing hosts if that happened to me.

                    One poster reported fixing it by adding this to the .htaccess file in the MODx root:

                    SecFilterEngine Off


                    Hope this helps.
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 25630
                      • 22 Posts
                      Thanks for your help.

                      It obviously occours in the DB-Export: If I query the database on the host server via plesk/myphpadmin everything is fine, when I scan through the SQL DB-dump on my local machine, I find those corrupted links in the content field of some records in the modx_site_content table.

                      So in my unexperienced view, this cannot be a modx issue: All this happens without any modx involvment, the DB content getting alterd in a textfield of a DB-record during the export.

                      I submitted this issue to the support of my hoster, I keep you up to date if anything helpful comes out.