Problem with editing or creating Alert Template

Hi, I have a problems with editing or creating alert templates after night update. What do you think where is the problem ?

I am trying to use new syntax, but it is not working for me, even when I tryning to use alert templates from the librenms docs.

I did daily.sh
root@xxxxx:/opt/librenms# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

And ./validate.php

root@xxxxxx:/opt/librenms# ./validate.php

Component Version
LibreNMS 1.41-71-g9bc0c54
DB Schema 257
PHP 7.0.30-0ubuntu0.16.04.1
MySQL 10.0.34-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Thank you.

Hi, I have the same issue. I got this in the apache logs.

PHP Fatal error:  Uncaught Illuminate\\Contracts\\Container\\BindingResolutionExcepti
on: Target [Illuminate\\Contracts\\View\\Factory] is not instantiable. in /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php:895\nStack trace:
\n#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(735): Illuminate\\Container\\Container->notInstantiable('Illuminate\\\\Cont...')\n#1 /
opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\\Container\\Container->build('Illuminate\\\\Cont...')\n#2 /opt/librenms/ven
dor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\\Container\\Container->resolve('Illuminate\\\\Cont...')\n#3 /opt/librenms/vendor/laravel/fr
amework/src/Illuminate/Foundation/helpers.php(106): Illuminate\\Container\\Container->make('Illuminate\\\\Cont...')\n#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(879): app('Illuminate\\\\Cont...')\n#5 /opt/librenms/html/includes/forms/alert-templates.inc.php(38): view(Array, A in /opt/librenms/vendor/$aravel/framework/src/Illuminate/Container/Container.php on line 895, referer: http://xxx.rez/templates/

I am in the same boat.

Here are my logs.

2018/07/31 12:27:02 [error] 38773#38773: *1633 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\View\Factory] is not instantiable. in /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php:895
Stack trace:
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(735): Illuminate\Container\Container->notInstantiable(‘Illuminate\Cont…’)
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build(‘Illuminate\Cont…’)
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve(‘Illuminate\Cont…’)
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(106): Illuminate\Container\Container->make(‘Illuminate\Cont…’)
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(879): app(‘Illuminate\Cont…’)
#5 /opt/librenms/html/includes/forms/alert-t” while reading response header from upstream, client: x.x.x.x, server: y.y.y.y, request: “POST /ajax_form.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.0-fpm.sock:”, host: “y.y.y.y”, referrer: “http://y.y.y.y/templates/

./validate

====================================

Component Version
LibreNMS 1.41-71-g9bc0c54
DB Schema 257
PHP 7.0.30-0ubuntu0.16.04.1
MySQL 10.0.34-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

[OK] Composer Version: 1.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

I have the exact same problem. I even tried opening and just saving one of the examples.
Slightly different versions…

Component Version
LibreNMS 1.41-71-g9bc0c542a
DB Schema 257
PHP 7.2.7-0ubuntu0.18.04.2
MySQL 10.1.29-MariaDB-6
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

====================================

Looks like the templates are working again.

I just ran daily.sh and validate and tested.

Aha, I figured out what this was. (@laf)

9bc0c54 Broke it by accidentally changing laravel boot to eloquent.
deb405f incidentally fixed it as I was doing some init cleanup and put it back to laravel (luckily because of rebase)

Hard to figure out considering neither of those was directly related to what broke.

Glad it wasn’t me for once :slight_smile: