Announcement

Collapse
No announcement yet.

Users do not see attachments in the Stream (updating to 7.5.1)

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

  • Users do not see attachments in the Stream (updating to 7.5.1)

    Version 7.5.1
    PHP 8.0.29
    MySQL 5.7.42-46​

    After updating to 7.5.1. Users do not have access to attachments in the "Stream". Error 404 access denied. In new messages and in the history.

  • #2
    alexisc

    That is, Users can go to the record, see that there is some kind of attachment in the Stream of this record, but when they click on it, they get a 404 error?
    - Did you try to grant the necessary permissions again: https://docs.espocrm.com/administrat.../#permissions?
    - Have you tried Hard Rebuild: https://docs.espocrm.com/administrat...#hard-rebuild?
    Last edited by victor; 06-14-2023, 02:40 PM.

    Comment


    • #3
      Thank you for your attention to my problem!

      1. I checked the necessary permissions - everything is ok
      2. Hard Rebuild - did not, I do not think that this will solve the problem. Everything worked before the update.
      Users don't have access to the files only if I post a "to all internal users" message.
      If "to particular user(s)" is set, everything works.​

      Comment


      • #4
        that is weird i have just tried it and it works. try to log in as user and check from their session what happens.

        Comment


        • #5
          Click image for larger version

Name:	image doesnt work.png
Views:	205
Size:	54.6 KB
ID:	93867
          Originally posted by rabii View Post
          that is weird i have just tried it and it works. try to log in as user and check from their session what happens.
          already checked, I agree it's strange, I can't understand how it works, on the user's side
          "403 Forbidden" - No access to attachment​
          Last edited by alexisc; 06-15-2023, 09:46 AM.

          Comment


          • #6
            try another file type of pdf to see if issue is with type (also check what are the file extensions allowed for the attachments field on the note entity.

            Comment


            • #7
              Originally posted by rabii View Post
              try another file type of pdf to see if issue is with type (also check what are the file extensions allowed for the attachments field on the note entity.
              1. pdf - doesn't work
              Click image for larger version

Name:	Attachments.png
Views:	194
Size:	47.6 KB
ID:	93876

              Comment


              • #8
                Do you have any custom code / function for the note entity ? i have tried it again on a new instance and everything works fine, this could be caused by some custom code you have on your instance.

                Comment


                • #9
                  no, just this
                  custom/Espo/Custom/Resources/metadata/entityDefs/Note.json

                  PHP Code:
                  {
                      
                  "fields": {
                          
                  "attachments": {
                              
                  "sourceList": [
                                  
                  "Document"
                              
                  ],
                              
                  "maxFileSize"5,
                              
                  "accept": [
                                  
                  "image/*",
                                  
                  "audio/*",
                                  
                  "video/*",
                                  
                  ".zip",
                                  
                  ".pdf",
                                  
                  ".odt",
                                  
                  ".ods",
                                  
                  ".odp",
                                  
                  ".docx",
                                  
                  ".xlsx",
                                  
                  ".pptx",
                                  
                  ".doc",
                                  
                  ".xls",
                                  
                  ".ppt",
                                  
                  ".rtf",
                                  
                  ".csv",
                                  
                  ".md",
                                  
                  ".txt"
                              
                  ]
                          }
                      },
                      
                  "links": {
                          
                  "attachments": {
                              
                  "type""hasChildren",
                              
                  "entity""Attachment",
                              
                  "foreign""parent",
                              
                  "layoutRelationshipsDisabled"true,
                              
                  "relationName""attachments",
                              
                  "disabled"true
                          
                  }
                      }
                  }
                  ​ 

                  Comment


                  • #10
                    looks normal, do you have anything in the log ? check the log and see what message it displays there

                    Comment


                    • #11
                      Originally posted by rabii View Post
                      looks normal, do you have anything in the log ? check the log and see what message it displays there
                      on the user's side in the browser log:

                      GET CRM/?entryPoint=image&id=648ad525101cbf510 403 Forbidden
                      Failed to load content for CRM/client/lib/original/jquery.js (Error HTTP. Status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE.).​

                      Comment


                      • #12
                        log error (previously none)

                        WARNING: (403) GET /CRM/; line: 69, file: /home/today/i.today/www/CRM/application/Espo/EntryPoints/Download.php

                        Comment


                        • #13
                          have a look at the Download.php and compare it with current stable version.

                          Comment


                          • #14
                            thanks for the help

                            compared, the files are completely identical,
                            but I see a syntax error,
                            Syntax error, unexpected T_PROTECTED, expected error, or T_VARIABLE
                            this means that the PHP version is incompatible, I have version 8.0.29 and there should be no problems
                            Click image for larger version  Name:	syntax error.png Views:	0 Size:	34.3 KB ID:	93946 Click image for larger version  Name:	PHP Version.png Views:	0 Size:	61.8 KB ID:	93947

                            Comment


                            • #15
                              This issue will be fixed in EspoCRM v7.5.2: https://github.com/espocrm/espocrm/issues/2770.

                              Comment


                              • alexisc
                                alexisc commented
                                Editing a comment
                                after the update everything works as it should, thanks!
                            Working...
                            X