I try to find why my plugin didn't work as expected (save of new devices dosen't call other hook)!
And I find that when you do a save on a host the function form_save (inside host.php) there is a call to the hook host_save.
Even if the documentation say :
host_save
file introduced retired
host.php 1.0.0
Nothing is saying what it suppose to be different than api_device_save or api_device_new.
So it's not clear for me if I have to register my hook to host_save, or api_device_new or save?
For what I understand api_device_save is before the ID is defined.
But it's look like their is nothing as new (only when a device is added) and called only once
host sve call to unexistand API_jhook how come ?
Moderators: Developers, Moderators
host sve call to unexistand API_jhook how come ?
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Re: host sve call to unexistand API_jhook how come ?
All plugins hooks have to return the $save variable regardless if they change it or not because they cascade from plugin to plugin.
So, what that means is that you have a plugin using that book, that is not returning the save variable.
So, what that means is that you have a plugin using that book, that is not returning the save variable.
Before history, there was a paradise, now dust.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: host sve call to unexistand API_jhook how come ?
Dump your plugin_hooks table and send it to my Email @ thewitness@cacti.net.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 1 guest