Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When syncing device templates, undefined function may be raised #2961

Closed
eschoeller opened this issue Sep 22, 2019 · 1 comment
Closed

When syncing device templates, undefined function may be raised #2961

eschoeller opened this issue Sep 22, 2019 · 1 comment
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@eschoeller
Copy link

I don't usually try to sync device templates, but I gave it a shot, and it yielded this error:

Fatal error: Call to undefined function api_data_source_cache_crc_update() in /cacti/cacti-1.2.6-prod/lib/utility.php on line 745
@netniV
Copy link
Member

netniV commented Sep 22, 2019

api_data_source_cache_crc_update() is found in api_data_source.php. In utility.php, it doesn't include that file directly as the source include utility.php normally does.

So, feeding backwards, repopulate_poller_cache() and push_out_host() are two functions that call the crc_update function. However, when I ran the following commands, the only results that were printed were for library sources which usually rely on the call to include other libraries. So, it would be more beneficial to have the full stack trace.

[cacti]$ find . -name \*.php -exec grep -Hn "push_out_host" {} \; | cut -d':' -f 1 | xargs grep -HLn "api_data_source.php"
./plugins/thold/thold_webapi.php
./plugins/thold/thold_webapi.php
./cli/add_datasource.php
./lib/api_automation.php
./lib/api_automation.php
./lib/api_data_source.php
./lib/utility.php
./lib/utility.php
./lib/template.php
./lib/template.php
./lib/template.php
./lib/api_device.php
./lib/api_device.php
[cacti]]$ find . -name \*.php -exec grep -Hn "repopulate_poller_cache" {} \; | cut -d':' -f 1 | xargs grep -HLn "api_data_source.php"
./lib/installer.php
./lib/utility.php

@cigamit cigamit added bug Undesired behaviour resolved A fixed issue labels Sep 22, 2019
@cigamit cigamit changed the title [1.2.6] Sync Device Template fails Cacti 1.2.6 Sync Device Template fails Sep 22, 2019
cigamit added a commit that referenced this issue Sep 22, 2019
Cacti 1.2.6 Sync Device Template fails
@cigamit cigamit added this to the v1.2.7 milestone Sep 22, 2019
@cigamit cigamit closed this as completed Sep 22, 2019
@netniV netniV changed the title Cacti 1.2.6 Sync Device Template fails When syncing device templates, undefined function may be raised Sep 28, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants