Announcement

Collapse
No announcement yet.

Cannot see documents in folder view expanded

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

  • Cannot see documents in folder view expanded

    Hi,
    I am not sure, if this could be a bug. I will put it here to know, if anybody else has experienced something similar.
    I run the most recent Version (7.4.5) and documents are not visible in expanded view. If I open a folder, where I know, there are documents, in collapsed view, it shows the list of documents, in the expanded view it says no data.
    See screenshots.
    Attached Files

  • #2
    Hello,

    Maybe you removed and then reverted the record?

    You can try to rebuild category-path three with the command:

    Code:
    bin/command rebuild-category-path DocumentFolder

    Comment


    • #3
      Thank you. Unfortunately I do not have access to that command. Would it help to delete all document folders and recreate them. I do not have too many documents there, so it would not be a big thing.

      Comment


      • #4
        You can try to re-create only document folders that have issues.

        Comment


        • #5
          I deleted all folders, all folder paths and created a new folder structure. Unfortunately the problem persists, again I cannot open the folder in expanded view.
          In collapsed view it works without problems as it should. I can open a folder and will see a list of files only of that folder.

          In expanded view it does not work. The parent folder, where is no document, shows the content of the subfolder. Any subfolder shows all documents.

          Another issue I see with putting files in folders.
          I use the field folders, where I determine, where a file should be saved. In the field folder in detail view I can choose the folder, but it will not be saved. It will only be saved, if I type the folder name into this link field.

          Nothing in log file, in server logs or console. I tried to reproduce this in the demo version, but there everything works correctly, so it is en arror in my installation.

          Is it possible to copy only the files necessary for the entity documents from a fresh install. Maybe anything in some file is missing in my installation?​

          Comment


          • rabii
            rabii commented
            Editing a comment
            Hey,

            in my experience i have noticed that this behavior happens only when you have formula code for DocumentFolder entity. can you verify if you have any code for DocumentFolder Formula and if it is the case remove the code and everything should work fine. It is been mentioned before i guess somewhere on github or here, seems that somehow adding a formula code for DocumentFolder then it causes issues with subfolders and documents listing.

        • #6
          > it will not be saved. It will only be saved, if I type the folder name into this link field.

          Does it happen with every folder or only with particular one?

          > Is it possible to copy only the files necessary for the entity documents from a fresh install.

          You can copy the whole application folder from the package. If you didn't modify any core files.

          Comment


          • #7
            It happens only with subfolders.

            I will try the solution to copy the app folder. I am quite sure, it is something wrong in my installation.

            Comment


            • #8
              Meanwhile I replaced the whole application folder, but unfortunately the problem persists in the same form as described in thread 5

              1. I cannot choose the subfolders from the folder link field. It affects only the subfolders. I can choose the parent folder. I can type in the subfolder name, what works.

              2. In expanded view the folders open, but the files, which will be displayed per folder are not correct. In this case it affects the subfolders and as well the parent folder.
              This function though works correctly in collapsed view.

              3. I saw on further searching for a solution, that filters in documents also do not work.

              As I use some extensions, I even uninstalled them, without success.

              Disabled my custom document and document folder completely, problem persists.
              Last edited by shalmaxb; 05-14-2023, 06:43 AM.

              Comment


              • #9
                Right now I see an error in the console (wasn`t there before), when trying to link a document to a subfolder:

                Code:
                select: function (model) {
                this.$elementName.val(model.get('name') || model.id);
                this.$elementId.val(model.get('id'));
                
                if (this.mode === this.MODE_SEARCH) {
                this.searchData.idValue = model.get('id');
                this.searchData.nameValue = model.get('name') || model.id;
                }
                
                this.trigger('change');
                },
                Code:
                Uncaught TypeError: model.get is not a function
                at n.select (link.js?r=1684046897:357:41)
                at n.eval (link.js?r=1684046897:1038:30)
                at n.<anonymous> (backbone.js:328:18)
                at n.<anonymous> (underscore.js:1220:21)
                at b (backbone.js:369:57)
                at v (backbone.js:356:19)
                at l (backbone.js:155:16)
                at t.trigger (backbone.js:346:5)
                at n.eval (select-category-tree-records.js?r=1684046897:140:38)
                at n.<anonymous> (backbone.js:328:18)
                ​​
                Last edited by shalmaxb; 05-14-2023, 10:38 AM.

                Comment


                • #10
                  Hello, isn`t there anybody who could point me in some direction? Using the document`s entity in my case is a mess, even as I already deleted the entity completely and installed from a fresh install.
                  Obviously there is a javascript error causing this, but the files regarding the error message are all the same as in a new install.

                  There must be somehow be something else, that causes this, but I myself am at the end of my imagination, what it could be. I did not alter anything in the document entity, added only three multiple relationships to other custom entities.

                  Comment


                  • #11
                    rabii and yuri

                    Hardly to believe, but your suggestion solved the problem. I had some simple formula to display an image in a custom image field, by fetching the file id of the document in case of being an image file to display that image and that caused the problem obviously.

                    I changed it now by using field condition, what works so far.

                    Well then, kudos and a big thank you to rabii.

                    Comment


                    • espcrm
                      espcrm commented
                      Editing a comment
                      Hmm I just realize I don't have any formula for Documents yet... I should try to create some, for example search for the filename and try to auto-add category to it.

                    • rabii
                      rabii commented
                      Editing a comment
                      glad you sorted it out mate
                  Working...
                  X