• SQL Errors#

  • wbbuilder Reply #1, 5 months, 2 weeks ago

    Reply
    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?


  • bunk58 Reply #2, 5 months, 2 weeks ago

    Reply
    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.


  • wbbuilder Reply #3, 5 months, 2 weeks ago

    Reply
    Is there an add on that I can repair and clean up the database directly in MODx?


  • wbbuilder Reply #4, 5 months, 2 weeks ago

    Reply
    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.