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

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

    #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
    • 8958

    #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
      • 1020

      #3
      Hi smachado,

      Can you please show your Apache and NGINX configurations?

      Comment

      Working...