We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4960
    • 6 Posts
    Ok - I’m going crazy!!! I’ve been attempting to integrate the star rating script from boedesign.com (http://boedesign.com/2008/02/18/ajax-star-rating) into a modx website that I am building, however I keep running into a ModX parser error... The strange thing is, if I make the page cacheable and visit the page directly - I get the parser error below, but if I refresh the page, the site loads and the page works as it should. If I disable the page caching, I can’t get past the error. I cleared the cache from the manager and the same results happen. Does anyone have any suggestions or ideas as to what this problem may be caused by?

    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Table 'searchab_starrating.modx_site_templates' doesn't exist »
          SQL: SELECT templatename,id FROM `modx_site_templates`
          [Copy SQL to ClipBoard]
     
    Parser timing
      MySQL: 	0.0077 s	(48 Requests)
      PHP: 	0.0618 s	 
      Total: 	0.0695 s
      • 4960
      • 6 Posts
      I have finally narrowed down the code that is giving me the error... I took out all but one variable to compact the code as much as possible to help identify issues and replaced the actual database info with descriptive text for obvious reasons, but here it is - all I am doing is connecting to a database:

      $strdb_conn = mysql_connect( "localhost", "database-user", "database-pass" );
      mysql_select_db( "database-name", $strdb_conn );


      The database is not modx_site_templates by the way...
        • 4960
        • 6 Posts
        Finally, some results! I moved the table that is created by the star system over to the modx database and everything is working now - I still have no idea why it was giving me the database error when attempting to connect to separate database, but it is indeed working now.