We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17394
    • 14 Posts
    Dear Modx users,
    I am using wayfinder as my menu builder. I have two horizontal rows, the first row represents the containers and the second row represents the sub docs in each of the container. I am good with displaying the containers and the first container’s sub-docs (by default it drops down).
    I am facing the following problems.
    1. The sub docs of the remaining containers do not drop down into the 2nd horizontal row with a click on the container title text.
    Please see the attached menu image I am planning to create. I guess I need to use CSS to display them as blocks but what do I need to do for it to drop all sub-docs in the 2nd horizontal row?


    2. Although the paths of the all docs are linked correctly to the text on the menus, they do not load the corresponding pages. The browser says " Oops! This link appears to be broken." It displays the first page (the Home) properly though (references back to the site home page). All others won’t work.

    The link to the’Home’ is "http://ip-address/site".
    under home there are two docs "About Us" and "Mission and Goals". Modx has created aliases and the href it ascribes to the two pages are
    "http://ip-address/site/home/about-us.html" and "http://ip-address/site/home/mission-and-goals.html" and both links don’t work. None of the documents are
    stored as files on the disk. All of them are created using Modx and are in the "Modx_site-contents" table.

    Also, when I try "http://ip-address/site/home" in the browser, it does not work!

    3.
    This is the code I am using in one of my chunks where I call the wayfinder.
    <div class="wrapper col2">
    <div id="topnav">
    [!Wayfinder?&startId=`0`&level=`2`&debug=`TRUE`!]
    </div>
    </div>

    Interestingly, the debug does not show any output. But, when I comment out the CSS style sheet reference in the template (<link rel="stylesheet" href="assets/styles/layout.css" type="text/css" /> ) , it outputs the debug info.

    All the CSS formating except minor CSS at the <li > are given to the menus with the "topnav" id and classes= wrapper and col2. Do I have to create my own
    wayfinder templates instead of wayfinder’s inbuilt for the links to work?


    Please let me know what’s going wrong.
    I highly appreciate your suggestions.
    Thank you
      • 3749
      • 24,544 Posts
      Try:

      &debug=`1`


      Also, make sure you have the following in the the <head> section of your template:

      <base href="[(site_url)]" />
        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
        • 17394
        • 14 Posts
        Thanks bob for your reply,
        I have the base url right as the first line in the header section and tried debug=`1`. No change happened. The urls for the menus do not work. I may be missing something very small but important.
        This is part of my header section.
        <head profile="http://gmpg.org/xfn/11">

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

        <title>[(site_name)]-[*pagetitle*]</title>

        <meta http-equiv="Content-Type" content="text/html; charset=[(modx_charset)]" />

        Any more clues why the URLs are not working. Thanks Bob..
          • 3749
          • 24,544 Posts
          Try putting a space in front of each & in the Wayfinder tag.
            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
            • 17394
            • 14 Posts
            That too did not make any difference.
            The link to the’Home’ is "http://ip-address/site". (’site’ is the Modx folder name)
            I do not understand how ’Home’ tab in the menu is given a url "http://ip-address/site"(works) instead of "http://ip-address/site/Home"(does not work). Home is the first container in my Modx resource tree.

            under home there are two docs "About Us" and "Mission and Goals". Modx has created aliases and the href it ascribes to the two pages are
            "http://ip-address/site/home/about-us.html" and "http://ip-address/site/home/mission-and-goals.html" and both links don’t work.
            Also, "http://ip-address/site/about-us.html" ... also did not work.

            None of the documents are stored as files on the disk. All of them are created using Modx and are in the "Modx_site-contents" table.

            Is Modx (wayfinder) trying to locate the files locally on the disk rather than in the Modx database? How do I tell it to look for the documents with in its database?
              • 17394
              • 14 Posts
              Bob,
              I observed something interesting. I previewed the pages "about-us" and etc and the url in the preview was "ipaddress/site/index.php?id=3". It is using the index.php script in the modx folder with the document id number as parameter. But the real URLs the wayfinder outputs is "ipaddress/site/home/about-us.html". Is the wayfinder giving wrong URLs?
                • 3749
                • 24,544 Posts
                The home URL may not be working, even though it appears to. If MODx doesn’t find a page, it sends you to the error page, which defaults to the home page, so you may be getting there via the error route rather than via the URL.

                First, why are you using an IP number rather than a domain name?

                What is the site_url set to in Tools | Configuration?

                Did you turn on Friendly URLS *and* rename ht.access to .htaccess?

                  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
                  • 17394
                  • 14 Posts
                  Here are the details..
                  1. Why are you using an IP number rather than a domain name?
                  The server is my workstation itself. I am using LAMP. The website has to be maintained on our systems for security reasons. The ip-address can be mapped to the domain name though. We can use either to access the Modx website. I use http://ipaddress/ModxfolderName to access the site..

                  2... What is the site_url set to in Tools | Configuration?
                  I did not find a site-url parameter in tools/config but in reports/system Info (I am using latest Modx evolution)
                  System Info
                  Server
                  MODx version 1.0.3
                  Version codename rev 6653
                  phpInfo() View
                  Access permissions Enabled
                  Server Time 10:46:53
                  Local Time 10:46:53
                  Server offset 0 h
                  Database name NeuroInformatics
                  Database server localhost
                  Database Version 5.1.41-3ubuntu12
                  Database Charset utf8
                  Database Collation Charset utf8_general_ci
                  Table prefix modx_
                  MODX_BASE_PATH /var/www/mygenxdb/
                  MODX_BASE_URL /mygenxdb/
                  MODX_MANAGER_URL http://ipaddress/mygenxdb/manager/
                  MODX_MANAGER_PATH /var/www/mygenxdb/manager/
                  MODX_SITE_URL http://ipaddress/mygenxdb/

                  3... Did you turn on Friendly URLS *and* rename ht.access to .htaccess?
                  Yes. I did not rename ht.access until yesterday when I was facing all these problems. I restarted apache after renaming but it did not help..

                    • 17394
                    • 14 Posts
                    I guess this has something to do with the Friendly URLs.. I turned them off and the URLs work fine. Something happened with my upgrade to latest evolution in which I did not use my old .htaccess file but the new one with no alterations in the .htaccess to enable friendly URLs.. I made changes to my new .htaccess file but it seems my server is not using the .htaccess file. I will work on enabling friendly URLs later. The server was unable to use .htaccess even before the upgrade.

                    I did not have a httpd.conf file by default in my apache2 folder which was asked to change. But I did not make any changes in that file. Still the friendly URLs work..
                    Do you think i need to have the right http.conf file? Are there any known problems with not having the correct file?

                    Thanks Bob for your replies!
                      • 3749
                      • 24,544 Posts
                      If the server is not reading the .htaccess file -- and some don’t -- or if rewrite is turned off, MODx friendly URLs won’t work at all.

                      I’m not sure what role httpd.cnf would play (if any). MODx usually doesn’t require dealing with it (assuming that it’s set up correctly).

                        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