We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4971
    • 964 Posts
    Now I get the following warning both at the top of the
    login page and then on a blank page once I have entered
    my username and passoword.

    Warning: Cannot modify header information - headers already sent by (output started at /home2/mercolog/public_html/modx-base/manager/includes/lang/spanish.inc.php:1) in /home2/mercolog/public_html/modx-base/manager/index.php on line 168

    I know that this error happens when there are extra spaces before or after the
    php tags, and it is fixed by removing them.

    In this case it is in line 168, where the header is being sent:

    // send the charset header
    header(’Content-Type: text/html; charset=’ . $modx_manager_charset);

    NO clue on how to fix this...
      Website: www.mercologia.com
      MODX Revo Tutorials:  www.modxperience.com

      MODX Professional Partner
    • Make sure you don’t have extra spaces in your language file after the closing ?> ... I fixed a whole boatload of those for 1.0.1 (to be released in the coming weeks). Could be another file too of course.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 4971
        • 964 Posts
        Nope, no extra spaces in language file or index.php file.
        Mmmm...

        What is the 1 in spanish.inc.php:1 ?

        Does it matter that the index.php file does not end in ?>
        it just kindof ends after a debug call...
          Website: www.mercologia.com
          MODX Revo Tutorials:  www.modxperience.com

          MODX Professional Partner
        • That error means that MODx can’t set the headers because the error message already did. The actual error is in the Spanish language file on line 1.

          PHP files do not need to have a closing ?>; many programmers omit this because if somehow another space or return gets added after it there will be an error.
            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
            • 4971
            • 964 Posts
            All is OK in line 1, these are the first few lines in the spanish.inc.php file:

            <?php
            /*
             * Filename:       includes/lang/spanish.inc.php
             * Function:       Language file.
             * Author:         The MODx Project Team
             * Date:           28 Julio 2009
             * Version:        2.01
             * MODx version:   Evolution 1.0
             *
            */
            
            $modx_lang_attribute = 'es'; // Manager HTML and XML Language Attribute
            $modx_manager_charset = 'utf-8';
            setlocale (LC_ALL, 'es_MX');
            $_lang["about_msg"] = 'MODx es un <a href="http://modxcms.com/what-is-modx.html" target="_blank">Sistema de Administración de Contenido y Esquema de PHP</a> bajo licencia <a href="../assets/docs/license.txt">GNU GPL</a>.';
            $_lang["about_title"] = 'Acerca de MODx';


            so I STILL do not know how to proceed with launching the manager...

            I tried updating the installation choosing english as the languge to see if
            it was the Spanish file, but the same error appeared...

            next step would be to uninstall and install again... to see if it works...
            or do anybody has another idea?


            I kinda knew the second question, because of what you say and because the closing ?> can be located
            in another file...
              Website: www.mercologia.com
              MODX Revo Tutorials:  www.modxperience.com

              MODX Professional Partner
              • 4971
              • 964 Posts
              Problem fixed, seems too odd, I just changed the charset variable in
              the Spanish file from utf-8 to UTF-8 and puff! like magic it fixed my
              problem... weird... but it worked!
                Website: www.mercologia.com
                MODX Revo Tutorials:  www.modxperience.com

                MODX Professional Partner
              • Sounds like something flaky in the original uploaded file itself, perhaps a bad linefeed character, and saving the file from your editor fixed it.
                  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
                • That is not from the latest Evo file, since the only distributed translation is iso-8859-1. Your "utf-8" isn’t a valid charset for doctypes whereas "UTF-8" is and I would suspect that would break all sorts of things actually as you found out. Where did you get the UTF-8 translation?
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 4971
                    • 964 Posts
                    Yes Ryan, you are right...

                    Lucianno posted in the Spanish forums that he was having problems
                    with the encoding, so I converted the files to utf.... ejem.... UTF-8 and
                    uploaded the two files to JIRA as MODX-1095 http://svn.modxcms.com/jira/browse/MODX-1095.

                    We had a short discussion as of having both ISO-8859-1 and UTF-8,
                    but as UTF-8 works perfect we think we should just use UTF-8.
                      Website: www.mercologia.com
                      MODX Revo Tutorials:  www.modxperience.com

                      MODX Professional Partner
                    • UTF-8 is definitely the preferred way to go, no doubt! Thanks for the update and sorry for my confusion.
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me