We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37042
    • 384 Posts
    Hi all

    I opened the error log today on a client site and there was a 10MB error log comrpising largely of the following.
    They seem to be issues with a redirect or some dtabase column?

    I do have Redirector 2.05 installed but don't have any redirects active. Perhaps this is not related?


    [2014-06-12 11:52:45] (ERROR @ /index.php) Error parsing condition with key 0: ('assets/downloads/company-overview.pdf' REGEXP `modRedirect`.`pattern` OR 'assets/downloads/company-overview.pdf' REGEXP CONCAT('^', `modRedirect`.`pattern`, '$'))
    [2014-06-12 11:52:45] (ERROR @ /index.php) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modRedirect.context_key' in 'field list'
    )
    
    [2014-06-12 11:53:13] (ERROR @ /index.php) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'modRedirect.context_key' in 'field list'
    )
    
      ...
    • It's definitely something to do with the redirector. Try repairing the redirector table in the database. It definitely should have no problem with the context_key field.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 37042
        • 384 Posts
        I upgraded to the latest version of Redirector a while ago and it must have clashed with the older version.

        When I click on Manager > Components > Redirector, there are no redirects listed in the grid.
        But when I open the database, there are approx 30 redirects setup and listed in the column called MODX_Redirects

        I also get an error when trying to create a new redirect so I might try to remove the package and reinstall

        Thanks Susan
          ...
        • I'm having this issue with Revo 2.3. I had nothing in my table, as far as I can tell. I'm not sure which table it is but i assume it's modx_redirects.

          It disabled it for now.
            • 38723
            • 165 Posts
            Quote from: eladnova at Jun 12, 2014, 06:52 PM
            I upgraded to the latest version of Redirector a while ago and it must have clashed with the older version.

            When I click on Manager > Components > Redirector, there are no redirects listed in the grid.
            But when I open the database, there are approx 30 redirects setup and listed in the column called MODX_Redirects

            I also get an error when trying to create a new redirect so I might try to remove the package and reinstall

            Thanks Susan

            Did you figure this out - I'm seeing similar errors on a site using Redirector. I've reinstalled the package and repaired the redirect table in the database to be sure.

            I can see the list of redirects set up on the site in the grid too.

            It's logging this error almost constantly which is NOT a good thing.
              • 37042
              • 384 Posts
              Hey Pdincubus
              I did an uninstall in the end. Never actually resolved the issue.
                ...
              • I could have sworn there was Redirector alternative but I can't find it. I to have disabled it for now since it fills the error log.
                • Actually, rather than disabling it I just commented out the error line:

                  From:

                  return $modx->error->failure($modx->lexicon('redirector.redirect_err_save'));


                  To:

                  // return $modx->error->failure($modx->lexicon('redirector.redirect_err_save'));
                    • 38723
                    • 165 Posts
                    Strange thing is - I've just checked on the site again and the error log is empty after an initial spate of logged errors after the table repair and re-install of the package.

                    I'll keep keeping my eye on it and see if it starts up again. For now though, seems ok.
                      • 28120
                      • 380 Posts
                      I've tried uninstalling, re-installing and commenting out

                      // return $modx->error->failure($modx->lexicon('redirector.redirect_err_save'));


                      but I'm still getting the error. Really irritating.

                      Plus I've found the latest version of Redirector to be incomprehensible so I'm unable to save even a single redirect without

                      An error occurred while trying to save the redirect.


                      even when I paste in the example code from the pop-up