We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15716
    • 57 Posts
    Any idea what could be causing my site to display:

    Error while inserting event log into database.

    ???

    Any help is appreciated.

    Thanks.
      • 22303 MODX Staff
      • 10,725 Posts
      Are you changing the database for the mysql connection in a snippet or plugin by chance?
        • 7455
        • 2,204 Posts
        or did you move server and wile exporting forgot he auto increment for that table?
        (sounds stupit but the plesk migration wizard does exectly this, crazy bug)
          follow me on twitter: @dimmy01
          • 17855
          • 43 Posts
          I am now having this problem. Yet the manager works fine, I can change/add pages in the backend.

          I have been "asked" by a client to use some hosting over which I dont have much control and I think the set-up is wrong.

          Can anyone shed any light on it?

          @Kev did you resolve this issue?

          The guy whos running the hosting did say there may have been some MySQL import errors, but everything runs fine in the manager....

          Should have put my foot down...
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Have you checked the event_log table? it may need repair. If you have lots of events, you might want to find out why and fix whatever is causing the error event to be logged.
              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
              • 17855
              • 43 Posts
              They dont allow me access to the backend of things....

              Whats the easiest way to check for errors? I am being a simpleton today.

              there is nothing in event_log btw.

              Thanks
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                You cannot develop or maintain a database-driven website without access to the database.

                  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
                  • 17855
                  • 43 Posts
                  I know, how I know. I am putting up with this to erm, "get the project finished" shall we say

                  thanks for the help!
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Well, in any case, any write to the event log means something caused an error.

                    I once pulled a sneaky on an assignment like that, I installed my own copy of phpMyAdmin in the site’s root. Did what I needed to do, then deleted it. But at least I did have FTP access.
                      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
                      • 17855
                      • 43 Posts
                      just secured ftp access and now I have installed phpmyadmin (our secret)

                      all the tables seem fine except for site_content

                      PRIMARY and INDEX keys should not both be set for column `id`

                      but then I have this error on all my MODx sites and they work.

                      Did I mention the site is running on IIS?