Creating a new user. Error 403 (Version 7.5.1)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alexisc
    Senior Member
    • Aug 2019
    • 135

    Creating a new user. Error 403 (Version 7.5.1)

    Version 7.5.1
    PHP 8.0.29
    MySQL 5.7.42-46​

    I can't create a new user.

    Error 403: Access denied
    Can't relate with non-existing Contact record.
    ​​
  • Kharg
    Senior Member
    • Jun 2021
    • 410

    #2
    can you check your logs??

    Comment

    • alexisc
      Senior Member
      • Aug 2019
      • 135

      #3
      Originally posted by Kharg
      can you check your logs??
      There is nothing in the logs, only a pop-up error message

      Comment

      • lazovic
        Super Moderator
        • Jan 2022
        • 810

        #4
        Hi alexisc,

        Please tell me are there any unofficial extensions installed in your instance?

        Comment


        • alexisc
          alexisc commented
          Editing a comment
          no, only the official Advanced Pack
      • alexisc
        Senior Member
        • Aug 2019
        • 135

        #5
        browser shows an error:

        Failed to load resource: the server responded with a status of 403 ()
        espo.js:12946 CRM/api/v1/User

        Server side error 403: Can't relate with non-existing record.​

        Comment

        • esforim
          Active Community Member
          • Jan 2020
          • 2204

          #6
          Did you do anything recently? Or is this first time install?

          Comment

          • SignIn
            Junior Member
            • Jun 2023
            • 3

            #7
            HI, I have a same problem after update. Not just to create a user, but to create/update any record. Nothing in logs. Any ideas?

            Apache:
            Apache/2.4.54
            PHP:
            8.2.7
            MySQL:
            10.3.37-MariaDB​
            Last edited by SignIn; 06-14-2023, 03:08 PM.

            Comment

            • alexisc
              Senior Member
              • Aug 2019
              • 135

              #8
              Originally posted by espcrm
              Did you do anything recently? Or is this first time install?
              no, I haven’t changed anything, I update it regularly, I’ve been using it for several years
              I tried to roll back to the previous version, it doesn’t work on version 7.4 either (I don’t register users so often and didn’t immediately notice the problem)​

              Comment

              • esforim
                Active Community Member
                • Jan 2020
                • 2204

                #9
                Don't know to be honest, in case like this I would try a few location here:

                1) Check any formula
                2) Do the usually rebuild and clear cache
                3) Rename/remove custom folder see if it help
                4) Try edit some other user see if it error too or just create
                5) Try give admin access to another user and try with that account.
                6) I heard API can also create user? try that as well.

                Perhaps trying some of these may narrow down

                Comment


                • item
                  item commented
                  Editing a comment
                  Error 403: Access denied
                  Can't relate with non-existing Contact record.

                  this is a "portal user", only portalUser is related to a Contact.. not a regular/admin User

                  we can only "help so" with nothing relevant information
              • Akemi
                Junior Member
                • Feb 2023
                • 19

                #10
                As from 7.4 you can do a hard rebuild in CLI, have you tried that?

                Comment


                • esforim
                  esforim commented
                  Editing a comment
                  Yes and this one too, I forgot to write.
              • Jakub Grufik
                Senior Member
                • Aug 2022
                • 361

                #11
                alexisc could you share the formula of the user entity, please?

                And if you have some workflows that are being triggered by creating the user you could share it here as well
                Last edited by Jakub Grufik; 06-15-2023, 07:58 PM.

                Comment

                • alexisc
                  Senior Member
                  • Aug 2019
                  • 135

                  #12
                  1) Check any formula
                  - formulas work: no problem

                  2) Do the usually rebuild and clear cache
                  - done, no errors, does not help

                  3) Rename/remove custom folder see if it help
                  - done, does not help

                  4) Try edit some other user see if it error too or just create
                  - I can edit an existing user without problems, my workaround is I create a user using BPM and then edit..

                  5) Try give admin access to another user and try with that account.
                  - did, another admin gets the same error

                  6) I heard API can also create user? try that as well.
                  - no need, create with BPM...

                  7)this is a "portal user", only portalUser is related to a Contact
                  - the problem is related to the creation of a portal user, it is not possible to create a portal user even if it is associated with a contact. Connecting to a contact does not solve the problem.

                  8)As from 7.4 you can do a hard rebuild in CLI, have you tried that?
                  - I'll try and post here

                  9)And if you have some workflows that are being triggered by creating the user you could share it here as well
                  - no such workflows​

                  Comment


                  • esforim
                    esforim commented
                    Editing a comment
                    Well I'm out of idea. This is where the Pro above can help and where it is the end of any of my idea.
                • alexisc
                  Senior Member
                  • Aug 2019
                  • 135

                  #13
                  Originally posted by Akemi
                  As from 7.4 you can do a hard rebuild in CLI, have you tried that?
                  it didn't solve the problem

                  Comment

                  • victor
                    Active Community Member
                    • Aug 2022
                    • 729

                    #14
                    Have you tried granting the necessary permissions again: https://docs.espocrm.com/administrat...n/#permissions? Sometimes they are lost when upgrading. In case of any 403 errors on my instances, first of all, I always rewrite permissions.

                    Comment


                    • macistda
                      macistda commented
                      Editing a comment
                      permissions may be lost e.g. if you use php with nginx because the user / group defined by php (Upgrade) is www-data:www-data and not nginx:nginx or php-temp folder permissions are reset and you have to get them back to your webserver.

                      But there must be a logfile showing this error, without that it is just a guess.

                    • yuri
                      yuri commented
                      Editing a comment
                      Permission issues VERY unlikely to cause such issues.
                  • alexisc
                    Senior Member
                    • Aug 2019
                    • 135

                    #15
                    Originally posted by victor
                    Have you tried granting the necessary permissions again: https://docs.espocrm.com/administrat...n/#permissions? Sometimes they are lost when upgrading. In case of any 403 errors on my instances, first of all, I always rewrite permissions.
                    checked, everything matches the requirements, but the error remains

                    Comment


                    • victor
                      victor commented
                      Editing a comment
                      Please show the formulas you use in the entity User. Also show the Workflows and BPMs in which this entity participates.
                      Last edited by victor; 06-16-2023, 10:43 AM.
                  Working...