We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4749
    • 623 Posts
    When I try to create a new document I’m getting a parse error. Thanks for the help. Here’s what I’m using - 0693, LAMP PHP 5.2.6, MySQL 5.0.45:

    Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/manager/includes/header.inc.php:5) in /home/site/public_html/manager/includes/document.parser.class.inc.php on line 2620
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 »
          SQL: SELECT name FROM `db_site`.`db_site_tmplvars` tvs LEFT JOIN `db_site`.`db_site_tmplvar_templates` rel ON rel.tmplvarid = tvs.id WHERE 1=1 AND type IN ('image') AND rel.templateid = 
          [Copy SQL to ClipBoard]
     
    Parser timing
      MySQL:	0.0031 s	(4 Requests)
      PHP:	1230668976.0640 s	 
      Total:	1230668976.0671 s



    EDIT: I can edit documents fine, I just can’t create new docs.
      The MODx has you...
      Utah Web Design
      • 4749
      • 623 Posts
      Sorry, for the bump, but I may have put this in the wrong place...?  huh

      Anyway, it seems really odd that the parse times are insanely high for the PHP and not MYSQL. Can anyone point me in the right direction?

      Here’s what’s on line 5 of header.inc.php:
      <html xmlns="http://www.w3.org/1999/xhtml" <?php echo $modx->config['manager_direction'] == 'rtl' ? 'dir="rtl"' : '';?> lang="<?php echo $modx->config['manager_lang_attribute'];?>" xml:lang="<?php echo $modx->config['manager_lang_attribute'];?>">


      OK, I’ve searched around and it seems that whitespace is the overwhelming problem, but I’ve cleared out whitespace and still have the same issue. Throw me a rope...Argh!
        The MODx has you...
        Utah Web Design
        • 26903
        • 1,336 Posts
        Ok, short rope, but at the end of the sql you have
        AND rel.templateid =
        , the statement isn’t terminated as far as I can see from this, so where has the templateid gone?
          Use MODx, or the cat gets it!
          • 4749
          • 623 Posts
          Thanks for the rope! But, I have no idea where the templateid is. That’s all the error message I got.
            The MODx has you...
            Utah Web Design
            • 26903
            • 1,336 Posts
            OK, I cant seem to find this SQL query in my 0.9.6.3 download but you can try the following :-
            Make sure the document has a template assigned to it on creation.
            Turn off all your plugins, tinymce, etc. one at a time and see if the prob goes away, this will tell you which plugin if any is causing the prob.

            The headers already sent error is a bit misleading, this line
            /home/site/public_html/manager/includes/document.parser.class.inc.php on line 2620
            is trying to send a 500 internal server error because it has encountered your sql error above, but the headers have already gone here
            /home/site/public_html/manager/includes/header.inc.php:5)
              Use MODx, or the cat gets it!
              • 4749
              • 623 Posts
              Well, that’s the crux of the matter. :’(

              I can’t even create the document. I get that error when I click the "Create New Document" button in the document tree. I hope that helps make the problem clearer.
                The MODx has you...
                Utah Web Design
                • 26903
                • 1,336 Posts
                Hmm, both ’new document’ and ’create document here’ work OK in my 0.9.6.3 test install, what have you set ’default template’ to in the configuration section under tools? Has this ever worked and stopped or never worked since install? Did you install the demo content? I’m getting the feeling here that the install is bad somehow but I cant pin this down yet.
                  Use MODx, or the cat gets it!
                  • 4749
                  • 623 Posts
                  This was an upgrade. I installed 0962 a few days before the 0963 came out. So, I upgraded when 0963 was available. It was working fine until yesterday - at least for a week or so it was working fine. I can’t quite remember if there was something I changed before I noticed that you couldn’t create docs. Editing existing docs works fine though.
                    The MODx has you...
                    Utah Web Design
                    • 26903
                    • 1,336 Posts
                    Ok, sounds like something that has happened on your install, I’d still like to find out where the sql query is coming from, I’ve searched the whole of my 0.9.6.3 install for the string
                    rel.tmplvarid
                    and I can’t find it, normally you can find bits like this easily, usually in php files, which of course then gives you a starting point as to what is going on, could you do this on your install?
                      Use MODx, or the cat gets it!
                      • 4749
                      • 623 Posts
                      OK, it’s ManagerManager... I think. I disabled it and now I can create docs, but I really need ManagerManager to work like it’s supposed to. Could the plugin order do anything?

                      EDIT: Alright, it seems that I’m an idiot (this happens on a regular basis). I upgraded to the final version and for now it seems that all is well. Sorry for all the fuss. The problem was an issue that was fixed by ncrossland and that’s pretty much it.
                        The MODx has you...
                        Utah Web Design