Hi everyone,
I'm experiencing a serious issue with my EspoCRM installation after a recent update. Context:
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:
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:
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
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
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?
Comment