Announcement

Collapse
No announcement yet.

Linking between relationships only one way

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

  • Linking between relationships only one way

    I have a custom entity, which I connected by an n:n relationship. I am able - as expected - to choose a record from the custom entity in the documents entity, but not vice versa. I know, that it should work, but is does not in this case. The modal to choose the document opens, but when I klick the document`s folder, where I want to choose the document, it appears a load spinner for a fraction of a second and nothing else happens.
    There is no error in the log file nor in the console (browser tools)

  • #2
    I could not reproduce.

    Comment


    • #3
      I tried to find the reason, but there is no hint so far. It happens with all custom entities in that app, where existing documents are in folders and subfolders. From the modal to choose I can though create a new document and choose that afterwards without problems.

      Comment


      • #4
        Try running the following command in CLI:

        Code:
        bin/command rebuild-category-paths DocumentFolder

        Comment


        • #5
          Unfortunately the hosting, where this app runs, does not allow CLI commands. I already tried to convince the owner to change the hosting, but they don`t have any skilled person, that would even understand, what I need.
          It is the same problem with upgrades.

          To rebuild the category paths, is there any other possibility to achieve that for the meantime?

          Comment


          • #6
            I'm not sure if this will solve the problem.

            To check if the problem is with paths, create a new document folder in root, create some document there, check whether record selecting work for that folder.

            Comment


            • #7
              still no success. I created a Test-folder, created three documents and the problem persists. I will investigate more.

              Comment


              • #8
                Could it be the reason, that I have one folder in root, which has more than 60 subfolders?

                Comment


                • #9
                  No idea. Do you receive a timeout error after 60 seconds after selecting and not clicking anything?

                  Comment


                  • #10
                    no timeout, the modal opens, I click the folder and the load spinner only flashes for a fraction of a second. After that nothing. Still no error, no console error.

                    Comment


                    • #11
                      I compared my document`s relationship view with the one in the demo. The difference is, that it indicates in my app, that there are no documents and the list to mark and choose a document is not displayed.

                      And I get this error now in the log:

                      Code:
                      [2024-05-09 21:41:32] WARNING: E_WARNING: unlink(data/cache/application/autoload.php): No such file or directory {"code":2,"message":"unlink(data/cache/application/autoload.php): No such file or directory","file":"/www/htdocs/xxxxxxx.de/application/Espo/Core/Utils/File/Manager.php","line":790}
                      [2024-05-09 21:41:32] WARNING: E_WARNING: unlink(data/cache/application/classmapRepositories.php): No such file or directory {"code":2,"message":"unlink(data/cache/application/classmapRepositories.php): No such file or directory","file":"/www/htdocs/xxxxxxxx.de/application/Espo/Core/Utils/File/Manager.php","line":790}
                      [2024-05-09 21:41:32] WARNING: E_WARNING: unlink(data/cache/application/classmapEntities.php): No such file or directory {"code":2,"message":"unlink(data/cache/application/classmapEntities.php): No such file or directory","file":"/www/htdocs/xxxxxxx.de/application/Espo/Core/Utils/File/Manager.php","line":790}
                      [2024-05-09 21:41:32] WARNING: E_WARNING: unlink(data/cache/application/classmapControllers.php): No such file or directory {"code":2,"message":"unlink(data/cache/application/classmapControllers.php): No such file or directory","file":"/www/htdocs/xxxxxxxxx.de/application/Espo/Core/Utils/File/Manager.php","line":790}
                      [2024-05-09 21:41:32] ERROR: (0) Permission denied for data/cache/application/entityAcl.php; GET /I18n; line: 321, file: /www/htdocs/w01eed01/datenbank.arbeitskreis-werkverzeichnis.de/application/Espo/Core/Utils/File/Manager.php
                      ​
                      Last edited by shalmaxb; 05-09-2024, 09:46 PM.

                      Comment


                      • #12
                        Sorry to jump in. Is it only that Entity that having error?

                        Did you try creating new Entity and relationship see if it it work. If so then there is something that the Entity is causing it.

                        Perhaps some field, some formula, some old dead relationship, extension, etc

                        Comment


                        • #13
                          I deleted the relationship, deleted everything, that still was in the database, in the json-files of the entity. and created the relationship again. Exactly as it is in the official demo. I have documents in the app, they are displayed correctly, when I opne documents. Only when I open the modal to choose the related documents, the list is empty. No error, nothing in console.
                          There is no formula in theses entities and I do not use extensions. It happens in all entities, that I linked to documents.
                          I have no idea anymore, where to look.
                          I looked in the roles as well, if there is anything limiting.

                          On searching for a solution I see:
                          In the dropdown menu of the document panel you have the two options: view list and select. View list is working, i.e. it shows the documents. Select does not show anything.
                          I searched in any place I could imagine, but I don`t find, where perhaps I have to activate this correctly, what normally is not necessary.
                          Last edited by shalmaxb; 05-12-2024, 03:56 PM.

                          Comment


                          • espcrm
                            espcrm commented
                            Editing a comment
                            Honestly I'm out of idea. If anything new I will share. Can you install another version on a subdomain and do a test?

                          • shalmaxb
                            shalmaxb commented
                            Editing a comment
                            I will install a espoCRM clean and copy my custom folders there. If that wouldn`t work either, I will re-cretae the two entities.
                            I am out of idea as well, I already tried everything I can think of.

                        • #14
                          As this post vanished from the Today`s Posts, I push it, as I did not find a solution yet.

                          Comment


                          • #15
                            I succeded in resolve this problem before it drove me crazy.

                            In documents there is a status field, which ist configured by the system. In my customized documents entity I deleted the four default status options (active, draft, cancelled and expired) with my own for me more suitable values for my app.

                            You should not do that! A document is visible and choosable only if it is active. When you delete the active option, you wont be able to choose a document from within a related entity.

                            So if you need some own status options, create another field with another name. Don`t touch the default status field.

                            Comment

                            Working...
                            X