Group Email Config Page Broken After Update – name.js Loads as HTML

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smachado
    Member
    • Feb 2024
    • 31

    #1

    Group Email Config Page Broken After Update – name.js Loads as HTML

    Hi everyone,

    I'm experiencing a serious issue with my EspoCRM installation after a recent update. Context:
    • EspoCRM version: (please fill if known)
    • Installed on: Plesk (Linux hosting)
    • PHP version: 8.3 (set via Plesk)
    • FastCGI enabled
    Issue Description:


    When I go to the Group Email Accounts settings page, nothing loads. The console shows this error:
    cpp
    CopiarEditar
    Uncaught (in promise) SyntaxError: Unexpected token '<', expecting '}' in name.js
    When I check the request, I see that the file name.js is being returned as an HTML page, not a JS script.

    If I visit the URL directly:
    ruby
    CopiarEditar

    It loads the EspoCRM HTML page, not the JS source. Relevant Folder Structure:


    The path /public/client/src/views/fields/ contains the file name.js, which is there and accessible via the file manager. What I’ve tried:
    • Confirmed that the file exists and has correct permissions (rwx r-x r-x)
    • .htaccess is present and has:
      apache
      CopiarEditar
      <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ index.php [L] </IfModule>
    • Set correct document root: /crm.hierrosisaga.com/public
    • Nginx proxy is enabled with intelligent file processing
    • Ran: php rebuild.php → no effect (PHP 8.3 compatible)
    • Checked MIME types and no restrictions in Apache/Nginx config
    • Cleared cache and rebuilt multiple times
    Suspected Problem:


    It seems Apache or Nginx is routing JS files through index.php, possibly because the route /client/src/views/fields/name.js is not correctly excluded.

    I believe I might be missing a correct Alias for the /client/ folder. My Question:
    • How can I configure Apache/Nginx or EspoCRM properly so that direct JS files (like name.js) load as raw JavaScript and not HTML?
    • Is there a recommended .htaccess or Apache alias directive for this?
  • yuri
    Member
    • Mar 2014
    • 8964

    #2
    It does not seem to belong to the bug reports.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • lazovic
      Super Moderator
      • Jan 2022
      • 1021

      #3
      Hi smachado,

      Can you please show your Apache and NGINX configurations?

      Comment

      • smachado
        Member
        • Feb 2024
        • 31

        #4
        Hey @lazovic!!!!

        Comment

        • smachado
          Member
          • Feb 2024
          • 31

          #5
          I’m currently trying to deploy EspoCRM on a shared hosting environment using Plesk. The installation is technically successful, and PHP is running correctly (verified via phpinfo()), but I am unable to access the CRM interface — I keep seeing the configuration warning page that says I need to properly configure the webserver.

          After reviewing the documentation, I understand that for production environments, Apache needs to be configured with:
          apache
          CopiarEditar
          Alias /client/ /path-to-espocrm/client/ <Directory /path-to-espocrm/public/> AllowOverride All </Directory>
          However, this is not possible in my hosting plan. I’m on a shared server with no root access to Apache configuration files, and I'm limited to .htaccess rules and settings via the Plesk interface.

          I’ve already configured the domain root to point to /public, and .htaccess is working (mod_rewrite is enabled). But since I can't define the required Alias directive, access to static client assets like /client/src/views/fields/name.js returns a 403 Forbidden error, and the application doesn't load properly.

          The PHP environment is:
          • PHP 8.3.14 with FastCGI
          • mod_rewrite is active
          • All required PHP extensions are installed and working
          • File permissions are correct (Espo shows "Success" on all permissions)

          Questions:
          1. Is there any supported workaround for using EspoCRM on shared hosting without Alias?
          2. Could copying the /client folder inside /public be a temporary workaround? (not ideal, but maybe functional?)
          3. Is it possible to override this setting within Espo’s configuration files or .htaccess somehow?

          Any help from the community or devs would be greatly appreciated. Thanks in advance.

          Comment

          Working...