Bug 233005 - net-mgmt/zabbix4-frontend: Add missing phpXY-filter dependency
Summary: net-mgmt/zabbix4-frontend: Add missing phpXY-filter dependency
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Danilo G. Baio
URL: https://support.zabbix.com/browse/ZBX...
Keywords: easy
Depends on:
Reported: 2018-11-05 21:32 UTC by Joseph Mulloy
Modified: 2018-11-23 12:36 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+
koobs: merge-quarterly?

add php module "filter" (652 bytes, patch)
2018-11-21 08:22 UTC, pg
pg: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Mulloy 2018-11-05 21:32:19 UTC
The user profile update code in net-mgmt/zabbix4-frontend requires the php filter module which is part of the security/phpXY-filter port/package. Installing this port/package resolves the issue. It should be added as a dependency of zabbix4-frontend, and possibly older ports of Zabbix if it affects them as well. I havn't tested it on them. I upgraded to Zabbix 4 and wanted to use the dark theme and was unable to update my user profile.

Steps to reproduce.

1. Login to Zabbix
2. Click the user profile icon (Looks like a silhouette head and shoulders)
3. Click update
4. Get the below stack trace and profile is not updated.

Fatal error: Uncaught Error: Call to undefined function filter_var() in /usr/local/www/zabbix4/include/classes/validators/CEmailValidator.php:35 Stack trace: #0 /usr/local/www/zabbix4/include/classes/api/services/CUser.php(673): CEmailValidator->validate('jdmulloy@gmail....') #1 /usr/local/www/zabbix4/include/classes/api/services/CUser.php(450): CUser->validateMediaRecipients(Array, Array) #2 /usr/local/www/zabbix4/include/classes/api/services/CUser.php(316): CUser->validateUpdate(Array, Array) #3 /usr/local/www/zabbix4/include/classes/api/clients/CLocalApiClient.php(123): CUser->update(Array) #4 /usr/local/www/zabbix4/include/classes/api/wrappers/CFrontendApiWrapper.php(97): CLocalApiClient->callMethod('user', 'update', Array, '5fc4e351b8a5582...') #5 /usr/local/www/zabbix4/include/classes/api/wrappers/CApiWrapper.php(94): CFrontendApiWrapper->callClientMethod('update', Array) #6 /usr/local/www/zabbix4/include/classes/api/wrappers/CFrontendApiWrapper.php(63): CApiWrapper->callMethod('update', Array) #7 /usr/local/www/zab in /usr/local/www/zabbix4/include/classes/validators/CEmailValidator.php on line 35
Comment 1 pg 2018-11-21 08:22:36 UTC
Created attachment 199402 [details]
add php module "filter"

add php module "filter"
Comment 2 Danilo G. Baio freebsd_committer 2018-11-21 13:10:45 UTC
Is this necessary just on Zabbix 4?
Comment 3 pg 2018-11-21 21:17:22 UTC
(In reply to Danilo G. Baio from comment #2)
In previous versions, I did not observe errors due to the absence of php module "filter".
Comment 4 commit-hook freebsd_committer 2018-11-23 12:33:41 UTC
A commit references this bug:

Author: dbaio
Date: Fri Nov 23 12:33:18 UTC 2018
New revision: 485651
URL: https://svnweb.freebsd.org/changeset/ports/485651

  net-mgmt/zabbix4-frontend: Add missing PHP filter extension

  This requirement was introduced just on Zabbix 4 and it's still
  not documented upstream.

  PR:		233005
  Submitted by:	Pakhom Golynga <pg@pakhom.spb.ru> (maintainer)
  Reported by:	Joseph Mulloy <freebsd-bugs@joe.mulloy.me>

Comment 5 Danilo G. Baio freebsd_committer 2018-11-23 12:36:10 UTC
Reported upstream.
Committed, thank you both!