Calendar error 500

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dafnie
    Senior Member
    • Dec 2015
    • 140

    Calendar error 500

    We have discovered after about 3 weeks that the calendarview is not working. I lot af data is entered the past 3 week, soo an revert 3 week back is not an option.

    When viewing calandar in day, week or Month we got error 500.
    In console: /api/v1/Activities?from=2019-04-22%2000:00&to=2019-04-29%2000:00&scopeList=Meeting:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

    Then viewing timeline we got this in console:
    (see attacted screendump)
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Check the logs please. Check your connection to the Google. Check if google calendar is enabled.

    Comment

    • dafnie
      Senior Member
      • Dec 2015
      • 140

      #3
      Thanks for quick reply

      And yes the Espolog has this:
      [2019-04-22 12:30:05] Espo.ERROR: GoogleCalendarERROR: Failed query SELECT 'Meeting' as scope, id AS id, name AS name, date_start AS dateStart, date_end AS dateEnd, date_start_date AS dateStartDate, date_end_date AS dateEndDate, modified_at AS modifiedAt, description AS description, status AS status FROM `meeting` WHERE date_start >= '2018-08-01' AND assigned_user_id ='5821995e61bcd7732' AND (google_calendar_event_id ='' OR google_calendar_event_id IS NULL) AND status != 'Not Held' AND deleted=0 ORDER BY dateStart DESC LIMIT 20 ; SQLSTATE[42S22]: Column not found: 1054 Unknown column 'date_start_date' in 'field list' [] []

      After disabling Google calendar and rebuild database. I get this:
      [2019-04-22 12:39:28] Espo.ERROR: API [GET]:/Activities, Params:Array ( ) , InputData: - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'meeting.date_start_date' in 'field list' [] []
      [2019-04-22 12:39:28] Espo.ERROR: Display Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'meeting.date_start_date' in 'field list', Code: 42 URL: /api/v1/Activities?from=2019-04-01%2000:00&to=2019-05-13%2000:00&scopeList=Meeting [] []

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        Activities, Params:Array ( ) , InputData: - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'meeting.date_start_date'
        There is no such parameter for Activities as 'meeting.date_start_date'. There is 'meeting.date_start'. I suppose that you made some custom changes and change this parameter. Please change it back.

        Comment

        • dafnie
          Senior Member
          • Dec 2015
          • 140

          #5
          Thanks for all your help.
          I have no not made any custom code. I have some simple formular in Entitymanager. I have no clue about where meeting.date_start_date is coming from?

          Comment

          • Maximus
            Senior Member
            • Nov 2018
            • 2731

            #6
            Try to search it inside of your EspoCRM folder. If you are a Linux user you can run in the terminal next command
            grep -ri 'date_start_date' /path-to-your-EspoCRM/

            Comment

            • dafnie
              Senior Member
              • Dec 2015
              • 140

              #7
              Thank you for all your help.

              This is what i got from the grep command:
              espo_andersen/application/Espo/Modules/Google/Repositories/GoogleCalendar.php: date_start_date AS dateStartDate,
              espo_andersen/application/Espo/Modules/Google/Repositories/GoogleCalendar.php: event_table.date_start_date AS dateStartDate,
              espo_andersen/application/Espo/Modules/Google/Repositories/GoogleCalendar.php: date_start_date AS dateStartDate,
              espo_andersen/application/Espo/Modules/Google/Repositories/GoogleCalendar.php: `{$table}`.date_start_date AS dateStartDate,

              I have disabled the googlecalandar in extensionmanager and rebuild database, but the error 500 is still there.

              Comment

              • Maximus
                Senior Member
                • Nov 2018
                • 2731

                #8
                Ok, it is weird. The date_start_date field should be added into your db. Try to reinstall the google integration pack. It seems that something went wrong and some files didn't install properly on your system.
                If it will not help you can try to use phpMyAdmin and check for these fields (date_start_date, date_end_date) in the meeting table of your DB. If they do not exist try to add them manually. After adding make rebuild. Check logs.
                Attached Files
                Last edited by Maximus; 04-23-2019, 06:57 AM.

                Comment

                • dafnie
                  Senior Member
                  • Dec 2015
                  • 140

                  #9
                  Hi
                  Yes, I added the two rows in the meeting table and now it works again.

                  Thank you for all your help.. :-)

                  Comment

                  Working...