We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32025
    • 305 Posts
    I have had MODx Evolution 1.0.2 running a website for several years now. Yesterday, my client tried to add a page in MODx and now the site is bringing up SQL errors.

    Here are the errors:

    This error came from the front end the users can see:
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Table './apicsday_main/modx_site_content' is marked as crashed and should be repaired »
          SQL: SELECT sc.* FROM `apicsday_main`.`modx_site_content` sc LEFT JOIN `apicsday_main`.`modx_document_groups` dg ON dg.document = sc.id WHERE sc.id = '1' AND (sc.privateweb=0) LIMIT 1;
          [Copy SQL to ClipBoard]
     
    Parser timing
      MySQL: 	0.0035 s	(0 Requests)
      PHP: 	0.0861 s	 
      Total: 	0.0896 s


    These errors were in the control panel:
    Warning: Cannot modify header information - headers already sent by (output started at /MYDIRECTORY/public_html/manager/includes/header.inc.php:7) in /MYDIRECTORY/public_html/manager/includes/document.parser.class.inc.php on line 2732
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Table './apicsday_main/modx_site_content' is marked as crashed and should be repaired »
          SQL: SELECT published FROM `apicsday_main`.`modx_site_content` WHERE id=1
          [Copy SQL to ClipBoard]
     
    Parser timing
      MySQL: 	0.0474 s	(3 Requests)
      PHP: 	1323273728.5787 s	 
      Total: 	1323273728.6262 s


    Where the navigation tree should be is see these errors:
    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /MYDIRECTORY/public_html/manager/frames/nodes.php on line 127
    
    Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /MYDIRECTORY/public_html/manager/frames/nodes.php on line 134
               This Container is empty
    
    Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /MYDIRECTORY/public_html/manager/frames/nodes.php on line 76


    I suspect the client was copying and pasting a page that he created on his MAC, maybe in an office product that had a header or something but I am not sure.

    How can I fix these errors?
      Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
      • 4310
      • 2,310 Posts
      modx_site_content' is marked as crashed and should be repaired
      You'll need to access the database via PHPMyAdmin and use the repair facility.
        • 32025
        • 305 Posts
        Is there an add on that I can repair and clean up the database directly in MODx?
          Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
          • 32025
          • 305 Posts
          Thank you that worked very well. I was afraid to touch my database directly without being told to do so. I was also able to optimize it as well.
            Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/