Announcement

Collapse
No announcement yet.

Error 500 in Users

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error 500 in Users

    EspoCRM: v8.0.5

    Error Logs:
    Code:
    [2023-11-18] ERROR: (42000) SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'emailUser'; GET /User/1/emails; line: 76, file: /home/website/domains/website.com/public_html/app/application/Espo/ORM/Executor/DefaultSqlExecutor.php
    Browser Console error:
    Code:
    XMLHttpRequest { errorIsHandled: false, readyState: 4, timeout: 60000, withCredentials: false, upload: XMLHttpRequestUpload, responseURL: "[URL="https://website"]https://espowebsite.com/api/v1/User/1/emails?primaryFilter=&select=emailCategory%2CdateSent%2CparentId%2CparentType%2CparentName%2Csubject %2CpersonStringData&maxSize=20&offset=0&orderBy=da teSent&order=desc[/URL]", status: 500, statusText: "", responseType: "", response: "" }​
    Just want to reduce my Error logs, I notice this error even before v8 but haven't investigate it. Anyone else ever see this error in their logs? It happen when you access a details views of users, for example: https://website.com/#User/view/1

    Trying to see if I can track down a fix:

    EspoCRM did seem to have any issue though, I can access all field/view. Looking through my database don't see the column:
    Click image for larger version  Name:	image.png Views:	0 Size:	87.2 KB ID:	99863
    Trying to track down the column:
    Click image for larger version

Name:	image.png
Views:	181
Size:	38.6 KB
ID:	99864
    Last edited by esforim; 11-18-2023, 05:08 AM.

  • #2
    Does the user has 'team' level access for Email?
    If you find EspoCRM good, we would greatly appreciate it if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment


    • #3
      This is User #1 (admin) so it should have everything. I will double check Email team access and reply. Thank you for the hint.

      Comment


      • item
        item commented
        Editing a comment
        Another hint :
        if you see in your phpMyAdmin :

        {entityType}_id => it's a link (belongTo ?)

        {entityType}{entityType} => it's a middleTable, it's a many-to-many table.

        In your case : emailUser =>
        email entity
        user entity
        so the middle table is : email_user
        there are no field emailUser

    • #4
      Hi I am having the same issue. Where you able to solve it

      Comment


      • esforim
        esforim commented
        Editing a comment
        No I never did manage to fix it. I just leave it till it break. It still usable.... just anonying

    • #5


      Hi!
      I have been investigating the error some of us are experiencing in EspoCRM related to the 'emailUser' table. After conducting some tests, I discovered that the issue persists even after emptying the tables related to "email".

      I have also verified the access settings for emails and confirm that the user in question has full access, as they are the administrator (User #1).

      Additionally, I reviewed the database structure and confirmed that the intermediate table between the email entity and the user entity is named 'email_user', as suggested in the thread. However, the issue persists despite this.

      At this point, I am a bit stuck and have not been able to find a definitive solution. Although the error remains annoying, EspoCRM remains usable.

      If anyone has found a solution or has further suggestions on how to address this issue, I would love to hear your ideas!

      Comment

    Working...
    X