Announcement

Collapse
No announcement yet.

Entity Type does not exist

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

  • Entity Type does not exist

    We've an issue when trying to print to PDF where one of our team created a custom module, and then has deleted the module from the system (as we didn't need it), however when trying to print anything to PDF from the Contact screen, the system throws up the below error.

    Click image for larger version

Name:	image.png
Views:	175
Size:	6.4 KB
ID:	107793

    We've searched all files and also the database on the server, however Max66 is not found at all anywhere so cannot seem to debug where this would be pulling from - is there anywhere else that the system would hold this entity which was deleted?

    Thanks!

  • #2
    cache?

    Comment


    • #3
      Cleared both - but still comes up with same error

      Comment


      • #4
        Check your config for changes made by the module and not reverted after uninstall, something like pdfEngine
        Compare it with this config:


        Will help if you post the link that raises this error, share only the section after domain for privacy
        CEO of Eblasoft
        EspoCRM Expert since 2014
        Full Stack Web Developer since 2008
        Creator of Numerous Successful Extensions & Projects​

        Comment


        • #5
          The link generated is /?entryPoint=pdf&entityType=Contact&entityId=65ce3d 4cf00198684&templateId=656f4c8eca16affc8

          Looking in the config file, I've compared in Notepad++ and it's just line 57 (Version) which is different.

          Comment


          • eymen-elkum
            eymen-elkum commented
            Editing a comment
            Try different template with simple content like showing name only, the current template may contains some links that deleted by uninstalling

          • malg
            malg commented
            Editing a comment
            No, even doing a blank document with just the name of the contact (or even no contact information, just 'test') throws the same error message.

          • shalmaxb
            shalmaxb commented
            Editing a comment
            malg This means, that the custom module changed something in the way, PDF is printed from the contact. As you explain (also by the link, which is created), the print function calls the entity contacts and one PDF template (the one for Max66). That means, that this has been inserted like something default, when printing a PDF from contacts.

        • #6
          anything in the espo Log File?

          Comment


          • #7
            shalmaxb it says the below:

            Line 2: [2024-06-26 08:07:23] CRITICAL: (0) Entity type 'Max66' does not exist. :: GET / :: /home/XXXXXXXXXX/public_html/application/Espo/ORM/Defs/Defs.php(82)

            Interestingly, searching for the phrase 'Max66' within the files, it finds it still exists within:

            custom\Espo\Custom\Resources\layouts\Contact\botto mPanelsDetail.json
            command\custom\Espo\Custom\Resources\i18n\en_US\Co ntact.json
            custom\Espo\Custom\Resources\i18n\en_GB\Contact.js on
            command\data\cache\application\metadata.php
            command\data\cache\application\objMetadata.php
            command\data\cache\application\ormMetadata.ph

            So although it's been removed, it still seems to have references in a variety of locations.

            Comment


            • #8
              It seems, that the mentioned custom module was not programmed correctly, as custom files should not appear in the core folders, what the cache files indicate.
              You could delete any appearance in the mentioned files and - if present - also in the database. The cache can be deleted without problems, it will be created by the system again (and hopfully without references to the old files).

              Comment


              • #9
                I guess it's in custom\Espo\Custom\Resources\i18n\en_US\Contact.js on. Maybe a link to a non existent entity type. Maybe you can remove via the UI.

                Comment


                • #10
                  malg,

                  In /your_instance_name/custom/Espo/Custom/Resources/metadata/entityDefs/Contact.js find something like this:

                  Code:
                  "links": {
                          "max66Children": {
                              "type": "hasChildren",
                              "foreign": "parent",
                              "entity": "Max66",
                              "isCustom": true
                          }
                  }
                  In there are no existing links in Contact.json, but there are only deleted ones, then delete everything mentioned above and save the changes. After that make Rebuild - the error will disappear.
                  Last edited by victor; 08-07-2024, 10:11 AM.

                  Comment

                  Working...
                  X