[ZBX-20541] Drop down menus empty due to "Template is not a constructor" Created: 2022 Feb 06  Updated: 2024 Apr 10  Resolved: 2022 Apr 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 5.0.20, 5.4.10
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Derock Assignee: Andrejs Verza
Resolution: Won't fix Votes: 0
Labels: frontend
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

PHP 7.4 and nginx on Ubuntu 20.04 LTS.
Zabbix version & NGINX config: https://pastebin.com/2N21n88E
Same issue occurs with 5.0 LTS version.


Attachments: PNG File Termius_fGPP34Txcd.png     PNG File image-2022-06-17-06-46-42-763.png     PNG File msedge_JOd6f27IGk.png     PNG File msedge_r7YC308MUR.png     PNG File r198zJ.png    
Team: Team A
Sprint: Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022)
Story Points: 0.5

 Description   

Steps to reproduce:

  1. Install Zabbix following the official guide (Download and install Zabbix 5.4 for Ubuntu 20.04 (Focal), MySQL, NGINX)
    1. Note: I moved the nginx config to /etc/nginx/sites-available and symlink-ed it to /etc/nginx/sites-enabled
    2. I also setup SSL and added a PHP option to increase max upload size.
    3. You can find the nginx config [here|{_}{_}https://pastebin.com/2N21n88E]
  2. Go to Database Type page
  3. Observe

Result:
see attachment (r198zJ.png)

Expected:
The database dropdown should be populated with options.

 

Notes:

Same issue happened when I tried to deploy the docker version of zabbix. 
It looks like new Template is being called before template gets defined. 



 Comments   
Comment by Derock [ 2022 Feb 06 ]

I was able to fix this by moving class.template.js up under jsLoader.php

Comment by Reinis Detlavs (Inactive) [ 2022 Apr 20 ]

Hi Derock! Under normal circumstances, this type of error hasn't been encountered.
Looks like you are using third party scripts (beacon.min.js) that interfere with Zabbix functionality.

Comment by Wilmer Adalid [ 2022 Jun 17 ]

I am also experiencing this issue with UI v 6.0.5

Generated at Wed Jul 30 03:39:35 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.