On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I have upgraded my legacy project from 1.0.4 to 1.2.1. But I have this error below because it was using mysql instead of mysqli:



    Fatal error: Uncaught Error: Call to undefined function mysql_num_rows() in /var/www/html/evolution-1.2.1/manager/includes/document.parser.class.inc.php(1360) : eval()'d code:18 Stack trace: #0 /var/www/html/evolution-1.2.1/manager/includes/document.parser.class.inc.php(1360): eval() #1 /var/www/html/evolution-1.2.1/manager/includes/document.parser.class.inc.php(1466): DocumentParser->evalSnippet('include_once("a...', Array) #2 /var/www/html/evolution-1.2.1/manager/includes/document.parser.class.inc.php(1408): DocumentParser->_get_snip_result('category_listin...') #3 /var/www/html/evolution-1.2.1/manager/includes/document.parser.class.inc.php(2003): DocumentParser->evalSnippets('<!DOCTYPE html ...') #4 /var/www/html/evolution-1.2.1/manager/includes/document.parser.class.inc.php(668): DocumentParser->parseDocumentSource('<!DOCTYPE html ...') #5 /var/www/html/evolution-1.2.1/manager/includes/document.parser.class.inc.php(2234): DocumentParser->outputContent() #6 /var/www/html/evolution-1.2.1/manager/includes/document.parser in /var/www/html/evolution-1.2.1/manager/includes/document.parser.class.inc.php(1360) : eval()'d code on line 18


    How can tell/ find which snippets are causing this error?
    • If you haven't already got this sorted I would suggest:

      1) Disable each snippet / module individually until you don't get any errors - that way you know if the disabled snippet is causing the problem.

      OR

      2) Disable "ALL" snippets and modules at once and then re-activate them one at a time.

      I would recommend number "2" as you may have multiple snippets that are causing problems
      • Quote from: iusemodx at May 06, 2017, 06:19 AM
        If you haven't already got this sorted I would suggest:

        1) Disable each snippet / module individually until you don't get any errors - that way you know if the disabled snippet is causing the problem.

        OR

        2) Disable "ALL" snippets and modules at once and then re-activate them one at a time.

        I would recommend number "2" as you may have multiple snippets that are causing problems

        Thanks for the tips. I got it sorted by modifying the database. Personally I think it is really a bad practice to save/ keep the code in a database.
        • Quote from: iusemodx at May 06, 2017, 06:19 AM
          If you haven't already got this sorted I would suggest:

          1) Disable each snippet / module individually until you don't get any errors - that way you know if the disabled snippet is causing the problem.

          OR

          2) Disable "ALL" snippets and modules at once and then re-activate them one at a time.

          I would recommend number "2" as you may have multiple snippets that are causing problems

          btw, how do I disable them? From inside the manager? But I don't see any button for this...
          • Have you read the documentation yet ?

            I suggest you read it ASAP

            The questions you are asking are covered there

            My Opinion:

            If you don't like the way the system is built don't use it, use something else, it's that simple.

            If you are not prepared to read the documentation, don't expect people to answer your questions all the time
            • I am not sure if this is the problem as you haven't put your coe in code tags in your post so I don't know where the line causing the error actually is, but you have an error here (an extra comma after the 'comment' column name):