Announcement

Collapse
No announcement yet.

Documents have become unlinked in the system

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

  • Documents have become unlinked in the system

    I had something strange happen in production. I have approximately 1000 documents which had/have file id's in my documents database that are showing as not attached to their document record. I'm assuming this is some kind of bug.

    I updated to 4.8.1 on Friday and everything looked like it was working. Today we noticed that any document uploaded since then has created the record in the CRM, but has not created the file id or uploaded the file for that record. I'm not having the same issue on my test environment, but I'm the only one hitting that.. so I haven't been able to duplicate the problem.

    The other issue is that files which were in the system and working properly before appear to have no file now. The database shows a file id still. The uploads folder still has files in it. I am able to access them by URL (http://crm.business.com/?entryPoint=...027029b9f056e3)

    When I add a document it creates a record. If I stay in the record and download the file it will download, but the minute I refresh or clear cache the file field says "None".

    Any idea what could be causing this? I haven't worked on production since updating. I have no errors in my Espo logs. No console errors on the page. I've checked my permissions on the server and they appear to be fine.
    Last edited by joy11; 12-20-2017, 07:33 PM.

  • #2
    All works fine for my local instance and for the http://demo.espocrm.com/.
    Try to check errors in the console of Chrome DevTools.
    Job Offers and Requests

    Comment


    • #3
      After some investigating, it looks like my custom/Espo/Custom/Resources/metadata/entityDefs/Document.json was modified somewhere along the line to include this:
      {
      "fields": {
      "file": {
      "skipOrmDefs": true,
      "tooltipText": "",
      "sourceList": [],
      "tooltip": false,
      "audited": false
      }
      },
      "links": {
      "file": {
      "type": "belongsTo",
      "entity": "Attachment",
      "skipOrmDefs": true
      }
      }
      }

      I didn't add it in manually, so I'm not sure how it got in there. Once I removed the "skipOrmDefs":true , it seemed to resolve the issue.

      Comment


      • tanya
        tanya commented
        Editing a comment
        Reproduced it. Thanks
    Working...
    X