No announcement yet.

Portal error 404

  • Filter
  • Time
  • Show
Clear All
new posts

  • Portal error 404

    Hi All

    We are looking at ESPOCRM and so far very impressed.

    On installation (Out of the Box) we had to do the following changes

    Add the following to the install folders php.ini file


    and then add the following change to .htcaccess file in \Api\V1

    RewriteBase /companyname/api/v1/ to RewriteBase /api/v1/

    Installation went well and all is working fine.

    But now the Portal test.

    We went through the documentation for creating a Portal, adding a new Role and User.

    The given URL provides a

    -------------------------------------------- 404 Page Not Found

    The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.
    Visit the Home Page


    Can we please get some help with this as its the last part in our journey.

    Thank you in Advance


  • #2
    Hello MATO.
    The error 404 (page not found) means that mapping is wrong. What kind of a web server do you use, Apache or NGINX? Do you use default or custom portal name?


    • #3
      Hi Maximus

      Its an Apache server with a default portal name.

      Thanks for your help


      • #4
        More info on this.

        Current version: 5.6.2
        Portal folder is set to 705


        • #5
          1. EspoCRM is not available by using such URL as /companyname/api/v1/. It is available by using just /companyname.
          2. Try to comment on the RewriteBase directive in the /ESPOCRM_DIRECTORY/api/v1/.htaccess file.
          3. Try to enter into the portal from Administration -> Portal -> click on the portal link.


          • #6
            > Portal folder is set to 705
            For the Portal directory should be set permission 755 and for files inside of it 644. All permission should be set according to these requirements
            Firstly I suggest to set the proper permission, and if it not will help then try to make a few described previously steps.


            • #7
              Ok so have checked all permission on Host and have created a local XAMP version to rule out ISP

              Out of interest should we see a folder created in espocrm/portal called 5d1c8a6b7c444e37d ?


              • #8
                No one folder doesn't create in the portal directory. it is not a physical way to the portal directory. 5d1c8a6b7c444e37d it is just an ID that stored in the DB. When you call the /espocrm/portal/5d1c8a6b7c444e37d/ it requests for the portal with ID 5d1c8a6b7c444e37d and geting an access to it.


                • #9
                  Hi Maximus

                  I can now create a local portal as long as the following is added to the

                  espocrm/api/vi/portal-access .htaccess file

                  RewriteBase /espocrm/api/v1/portal-access/

                  When I do the same to the external server version it fails

                  I do believe its an .htaccess issue now

                  External Server .htaccess files change


                  RewriteBase /api/v1/


                  RewriteBase /api/v1/portal-aceess/

                  Possible absolute file path issue although if I add /espocrm/api/vi/ it breaks the main system

                  Any ideas


                  • #10
                    Try to comment RewriteBase with # sign and don't use it at all? What will happen if you do it?


                    • #11
                      OK absolute didn't make a difference.

                      Running out of ideas


                      • #12
                        Hi Maximus

                        I have gone over all your suggestions and we are still unable to get the portal working.

                        If we comment RewriteBase with # sign at the api/vi level we can not access the main ESPO.

                        We notice many .htaccess within the directory structure "is there a guide to what .htaccess should be used ?


                        Does anyone have a good idea on how to trace back the 404 error as we are not seeing any log data and google analytics is a pain to get going.


                        Thank you for your help so far.



                        • #13
                          By adding enabling RewriteBase /Portal/ in the /Portal/.htaccess we can now get the © 2019 EspoCRM - now we just need the login prompt page?


                          • #14
                            Does anyone see any issue with the following script, is the basepath correct?
                            <script type="text/javascript">
                            $(function () {
                            Espo.loader.cacheTimestamp = 1562590884;
                            Espo.require('app-portal', function (App) {
                            var app = new App({
                            id: '5d233e463ea1b68f5',
                            useCache: true,
                            cacheTimestamp: 1562590884,
                            basePath: '../../',
                            url: 'api/v1/portal-access/5d233e463ea1b68f5'
                            }, function (app) {


                            • #15
                              finally getting an error in the log.

                              [2019-07-08 13:34:28] Espo.ERROR: (404) Controller 'Portal-access' is not found; GET /api/v1/portal-access/5d233e463ea1b68f5/Settings [] []