We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24348
    • 9 Posts
    This sounds wierd but in my modx(revolution) implementation, the browser displays the HTML of the template instead of the page in the first page. That is http://ruunnirgood.com/index.php

    But this next page is displayed ok http://ruunnirgood.com/index.php?id=2. The two pages are based on the same template with one TV. And of course header and footer chunks. Initially everything was ok. Then suddenly I realised that the first page was displaying html code. To investigate further, I copied and pasted the generated HTML code into my development editor and saved locally in my pc. It displays as a normal website in my local pc. So the problem lies in MODX CMS. It is only firefox and opera browsers that display HTML for page one though. Internet Explorer displays all pages ok.

    I started all over again removing the template but page one always shows html code.

    What could be the problem? I would be grateful if you could be of any help.

    Thank you [ed. note: rageh last edited this post 15 years ago.]
      • 3749
      • 24,544 Posts
      This is a really odd one. The "view source" looks just like the page in FF but not in IE.

      You do have two consecutive <ul> tags (and two </ul> tags) without an intervening <li>, which is invalid HTML, but I'm not sure that's the problem. The problem doesn't occur without the CSS file available, but I don't see how the CSS file could be doing that either.

      I also noticed that the character set in the header sent to the browser does not match the one in the DOCTYPE, but again I'm not sure that would cause this problem.

      Do you have any plugins running that might fire for the home page and not other pages?
        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Check the type of the resource #1; if it's not text/html then the browser may think it's to be displayed as plain-text. Not all browsers react the same to these type declarations, which is why sometimes it would work as expected and sometimes not.


        According to the W3C validator, it is being sent as text/plain, which would be your problem. You have a meta tag specifying text/html, but the headers are being sent as text/plain.

        Always run a page through the validator if it's doing something weird.
        [ed. note: sottwell last edited this post 15 years ago.]
          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
          • 24348
          • 9 Posts
          Bobray and Sottwell, thank you very much. I checked the property/setting of resource #1 and found out that it's content type was set to text instead of HTML. I changed it to HTML, and needless to say, all browsers display it as a normal page. All the other resources have their content type set to HTML.

          I did not create Resource #1. It came with the installation. So I wonder if its page setting is set to text by default or I changed it unintentionally? I wonder.

          Sottwell, your suggestion really helped me. Thanks again.