Announcement

Collapse
No announcement yet.

[v7.4.3] Bug, Error and Discussion

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

  • [v7.4.3] Bug, Error and Discussion

    Maybe we can use this thread to discuss v7.4 in general. And if anyone can help solve my issue as well!

    Recently ran into a bug in v7.4, my PDF template have not change. Tried with both engine so it is an issue with both PDF engine.

    The issue here is that, I don't even use the field in my PDF template but look like it still query for this data and because of that it is giving me a Error 500.

    Let discuss, the error read like so: 500 Internal Server Error

    SQLSTATE[42S22]: Column not found: 1054 Unknown column 'history_event.date_start' in 'field list'​

    The field or relationship history_event.date_start is an Event entity I create many months ago, it basically for thing that isn't a Meeting or a Task, I create a new event to documents the History of this entity (Real Estate Property extension). I don't use this field in my PDF Template.

    I'm guessing to fix this I might have to do one of the following:
    1) Remove relationship and re-create with the same relationship.
    2) Do a Hard Rebuild using CLI?
    3) Delete this column manually in my Database?

    Anyone run into PDF issue yet? Appreciate if you can share your resolution or if you run into this issue yet.

    Thank you.

    --- EDIT1:
    How annoying, it affecting all my other non-related entity too, whether if there is any relationship to the "History & Event" entity or not.

    EDIT2: As the start Date is a default field for Entity type: Events, I can't even remove and re-add it.

    EDIT3: I compare the date stat field in database/myPHPAdmin with the default entity Meetings. Setting wise it seem no different.
    Last edited by esforim; 04-13-2023, 07:34 AM.

  • #2
    The error log seem to be quite length but I think it is unrelated, only this part seem to be relevant.

    Code:
    [2023-04-13 01:16:17] ERROR: (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'history_event.date_start' in 'field list'; GET /; line: 76, file: /home/username/domains/website.com/public_html/app/application/Espo/ORM/Executor/DefaultSqlExecutor.php  ​
    I went to the Entity and disable the Start Date as a Required Field but no luck on there.

    Looking at Line of the file it doing this:

    try {
    $sth = $this->pdo->query($sql);​

    So this sound like it related to PDO, PDO extension perhaps? Doing a search of enable extension in my PHP, I decide to enable pdo_sqlsrv too but no luck.

    Click image for larger version  Name:	image.png Views:	67 Size:	64.0 KB ID:	90867
    Last edited by esforim; 04-20-2023, 08:20 AM.

    Comment


    • rabii
      rabii commented
      Editing a comment
      i just moved to using their service. the question is if you use cloud hosting or VPS. i guess this error could be produced based on user permission.

    • esforim
      esforim commented
      Editing a comment
      I'm using their Shared Hosting. I don't want VPS yet because I don't need it and it seem to be additional work.

      Hopefully you don't have same issue as me... although I do want someone to have same issue to help resolve issue.

    • rabii
      rabii commented
      Editing a comment
      hey
      probably that is the reason why you are facing this issue. it is recommended to use either cloud hosting or VPS for espocrm instance to have fully access to your webserver resources. shared hosting is not suitable and could cause issue since when you run commands you will not be running these commands as root user or a user with high privileges.
      Try to build the application from UI and run the command again.

  • #3
    Hi esforim,

    To fix this problem, try to hard rebuild your db:


    Recommended having a database backup before running hard rebuild.

    Comment


    • #4
      maybe you could run a rebuild with --hard option to rebuild your database and get read of any cached fields and reindex tables. i have not experienced such a thing even when i switch between the engines still work fine.
      Rabii
      Web Dev

      Comment


      • #5
        Trying to run the --hard option now. :45 start time. Let see how long it take for a ~4.7GB database.

        Fail after 3 minutes with an error.

        Looking at the logs I can see an issue with possible the free Font extension by Dubas. Secondly seem like a Timeout issue as well as a Authentication error:

        ERROR: (42000) SQLSTATE[42000]: Syntax error or access violation: 1142 UPDATE command denied to user 'user_crm'@'localhost' for table 'auth_token'; GET /Notification/action/notReadCount; line: 76, file: /home/user/domains/website.com/public_html/app/application/Espo/ORM/Executor/DefaultSqlExecutor.php

        I will try to re-save access again and try again.

        ---
        Look like I will keep getting this auth error... and this is the first table. Maybe my CLI don't have access to database...
        Last edited by esforim; 04-13-2023, 08:01 AM.

        Comment


        • #6
          Found this post but it seem like there will be major risk if I try to do the same thing. My hard re-build failing at the moment until I can figure out a safe solution.

          Hello guys, I was recently cleaning our database and system and I deleted some fields, but I was still able to see them in the SQL database, so I deleted them manually from there. Since then I am getting error 500 in our CRM and in the logs I can see this error. [2023-02-06 12:32:58] ERROR: (42S22) SQLSTATE[42S22]: Column not


          As for more testing, I try having look at the Entity's Edit menu (change the Start date sort to something else: Modified By date). Also had a look at the relationship and remove/edit what and I to see if anything work. I only try one of the relationship and hope for the best. No result.

          More digging I suppose.

          Comment


          • #7
            So I decide to remove the relationship from the GUI, still fail.

            Doing a search for the code "https://github.com/espocrm/espocrm/search?q=field+list" show too many result to do anything about it.

            I "drop" the column in the table and that nothing as well.

            Comment


            • #8
              I think I manage to get rid of the "hard error" for now. There still many warning now that I removed it.
              And I forgot to take a Screenshot of it.

              Initially I was removing all the "Entity" in the custom folder but no luck.

              I removed the Relationship from the shared event
              Contact>HistoryEvent

              From memory, I see that I name it "HistoryEventParentChild link" or something similar. Basically I link HistoryEvent entity to HistoryEvent, and during upgrade 7.4 it seem to did not like that setup anymore.

              Why did I do this? To link the same entity Parent-Child event.

              Comment


              • #9
                Hi guy,

                Ran into this error again when I do a "merge". I remember it was fixed in 7.4.5 or .6, so I just upgrade from 7.4.3 to .6 which is the latest version. Tried merge again and it all working fine. If you have just problem, try upgrade to 7.4.6

                Comment

                Working...
                X