Announcement

Collapse
No announcement yet.

Packing mods into extension give error 404

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

  • Packing mods into extension give error 404

    Hello,

    I'm trying to adapt EspoCRM to day-by-day use of my agency.

    I managed to create the fields I needed in the User and Team entities, it's working fine.

    But I've tried to pack into installable extension and when I install result in error 404.

    What did I forgot?

    files/custom/Espo/Modules/MedyaWeightMod/Resources/i18n/en_US/Team.json
    Code:
    {
    "fields": {
    "useWeightInOpportunitiesDistribution": "This team use Weight to distribute opportunitites?"
    },
    "tooltips": {
    "useWeightInOpportunitiesDistribution": "Check if this team use weight of each user to distribute opportunities."
    }
    }​
    files/custom/Espo/Modules/MedyaWeightMod/Resources/i18n/en_US/User.json
    Code:
    {
    "fields": {
    "weightInOpportunitiesDistribution": "Weight of this user in team to distribute opportunities"
    },
    "tooltips": {
    "weightInOpportunitiesDistribution": "Fill a number between 0 and 100 representing the relevance of this user in opportunities' distribution."
    }
    }​


    files/custom/Espo/Modules/MedyaWeightMod/Resources/layouts/Team/detail.json
    Code:
    [
    {
    "rows": [
    [
    {
    "name": "name"
    },
    {
    "name": "useWeightInOpportunitiesDistribution"
    }
    ],
    [
    {
    "name": "roles"
    },
    {
    "name": "positionList"
    }
    ],
    [
    {
    "name": "layoutSet"
    },
    false
    ]
    ],
    "style": "default",
    "label": ""
    }
    ]​
    ​​

    files/custom/Espo/Modules/MedyaWeightMod/Resources/layouts/Team/list.json
    Code:
    [
    {
    "name": "name",
    "link": true
    },
    {
    "name": "useWeightInOpportunitiesDistribution"
    }
    ]​
    ​​​

    files/custom/Espo/Modules/MedyaWeightMod/Resources/layouts/Team/listSmall.json
    Code:
    [
    {
    "name": "name",
    "link": true
    },
    {
    "name": "useWeightInOpportunitiesDistribution"
    }
    ]​
    ​​​

    files/custom/Espo/Modules/MedyaWeightMod/Resources/layouts/User/detail.json
    Code:
    [
    {
    "rows": [
    [
    {
    "name": "userName"
    },
    {
    "name": "weightInOpportunitiesDistribution"
    }
    ],
    [
    {
    "name": "name"
    },
    {
    "name": "title"
    }
    ],
    [
    {
    "name": "emailAddress"
    },
    {
    "name": "phoneNumber"
    }
    ],
    [
    {
    "name": "gender"
    },
    false
    ]
    ],
    "style": "default",
    "label": ""
    }
    ]​
    ​​

    files/custom/Espo/Modules/MedyaWeightMod/Resources/layouts/Team/list.json
    Code:
    [
    {
    "name": "name",
    "link": true
    },
    {
    "name": "userName",
    "width": 20
    },
    {
    "name": "title",
    "width": 18
    },
    {
    "name": "emailAddress",
    "width": 20
    },
    {
    "name": "isActive",
    "width": 10
    },
    {
    "name": "weightInOpportunitiesDistribution"
    }
    ]​
    ​​​

    files/custom/Espo/Modules/MedyaWeightMod/Resources/layouts/Team/listSmall.json
    Code:
    [
    {
    "name": "name",
    "link": true
    },
    {
    "name": "userName",
    "width": 30
    },
    {
    "name": "emailAddress",
    "width": 30
    },
    {
    "name": "weightInOpportunitiesDistribution"
    }
    ]​​
    files/custom/Espo/Modules/MedyaWeightMod/Resources/metadata/entityDefs/Team.json
    Code:
    {
    "fields": {
    "useWeightInOpportunitiesDistribution": {
    "notNull": true,
    "type": "bool",
    "audited": true,
    "tooltip": true,
    "isCustom": true
    }
    }
    }​


    files/custom/Espo/Modules/MedyaWeightMod/Resources/metadata/entityDefs/Team.json
    Code:
    {
    "fields": {
    "weightInOpportunitiesDistribution": {
    "type": "int",
    "required": true,
    "min": 0,
    "max": 100,
    "audited": true,
    "tooltip": true,
    "isCustom": true
    }
    }
    }​​
    ​​

    files/custom/Espo/Modules/MedyaWeightMod/Resources/metadata/scopes/Team.json
    Code:
    {
    "module": "MedyaWeightMod"
    }
    ​​​
    ​​​

    files/custom/Espo/Modules/MedyaWeightMod/Resources/metadata/scopes/User.json
    Code:
    {
    "module": "MedyaWeightMod"
    }
    ​​​
    ​​​

    files/custom/Espo/Modules/MedyaWeightMod/Resources/metadata/scopes/User.json
    Code:
    {
    "order": 50
    }
    ​​​​
    ​​​

    In the console of the container, I found this errors:

    Code:
    172.20.0.2 - - [10/Nov/2022:06:23:50 +0000] "GET /client/custom/modules/medya-mods/src/controllers/team.js HTTP/1.1" 404 518 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
    172.20.0.2 - - [10/Nov/2022:06:18:50 +0000] "GET /client/custom/modules/medya-mods/src/controllers/team.js?r=1668060790 HTTP/1.1" 404 518 "https://unicesumar-criciuma.medyadigital.com.br/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"​​

  • #2
    telecastg wrote his input here, it might help to see if you missed any step. Sorry can't help you more:

    I did not find an answer for this especially. Is there a possibility to pack a whole entity with layout, relationships and custom fields as extension so that deployment could be done easily?

    Comment


    • #3
      Originally posted by espcrm View Post
      telecastg wrote his input here, it might help to see if you missed any step. Sorry can't help you more:

      https://forum.espocrm.com/forum/gene...able#post76727
      Thanks for the answer.

      I'm trying all possibilities to solve this, but It's so hard.

      But let's go.

      Now, I'm trying to use "ext-template", but when I call "node build --all", it return:

      Code:
      ...
      Merge configs...
      PHP Warning:  require_once(vendor/autoload.php): Failed to open stream: No such file or directory in /Users/giuseppesilva/DEV/Tests/EspoCRM/Extension/site/bootstrap.php on line 33
      PHP Fatal error:  Uncaught Error: Failed opening required 'vendor/autoload.php' (include_path='/Users/giuseppesilva/DEV/Tests/EspoCRM/Extension/site') in /Users/giuseppesilva/DEV/Tests/EspoCRM/Extension/site/bootstrap.php:33​
      Do you know how to solve it?

      Comment


      • giuseppesilva
        giuseppesilva commented
        Editing a comment
        I really tried everything I thought to fix this error, but my ability was not enough. That's why I came to the forum to try to get some insight. In another post I managed and posted my solution. But not in this case. Anyway, I believed here to get help and not sarcasm as an answer. That's it. Thank you all.

      • espcrm
        espcrm commented
        Editing a comment
        You must be reading this incorrectly if you think it is sarcasm. No joke were made in this thread. My code skill is as good as trial and error and give up when I fail.

        I'm always looking forward to solution being post, I'm managing the unofficial wiki after all. It might not be something that relevant to me currently but I can look back to it for reference and reading and learning.

      • giuseppesilva
        giuseppesilva commented
        Editing a comment
        espcrm no problem! Thank you for all <3
    Working...
    X