I was using it fine yesterday and I run the daily updates.
If I go back to the stable release the editor works again. Could one of the latest commit have broken it?
Thanks
Here my latest update.
====================================
Component
Version
LibreNMS
1.51-70-g83522c6
DB Schema
2019_02_10_220000_add_dates_to_fdb (132)
PHP
7.2.16
MySQL
10.1.35-MariaDB
RRDTool
1.6.0
SNMP
NET-SNMP 5.7.2
====================================
[OK] Composer Version: 1.8.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
Seeing this error in the http2-4 logs:
[22/May/2019:08:28:13 -0400] “GET /plugins/Weathermap/editor.php HTTP/1.1” 500 5007
The plugin has two classes called Weathermap… If both of them get loaded it causes the error. I’ll try to fiddle with it . You could fix it by namespacing the classes in your local install.
I would but I don’t know what namespacing is? Is this related to the laravel?
Thank Murrant
Yip
I have the same issue this morning.
Hi
I receiving the following error this morning when trying to access the Weathermap Editor:
[2019-05-22 08:08:48] production.ERROR: Cannot declare class Weathermap, because the name is already in use {“userId”:1,“email”:“[email protected] ”,“exception”:"[object] (Symfony\Component\Debug\Exception\FatalErrorException(code: 1): Cannot declare class Weathermap, because the name is already in use at /opt/librenms/html/plugins/Weathermap/Weathermap.php:5)
[stacktrace]
#0 {main}
"}
Even if I …
No sure how to link it probably
Well, I figured out why. The workaround for Weathermap breaks people using subdirectories…
Well, I updated Weathermap, but I don’t have access to merge it
librenms-plugins:master
← murrant:update-weathermap
opened 04:23PM - 22 May 19 UTC
Fixes:
* duplicate class name
* issues with paths
* direct use of DB crede… ntials and direct DB access
* map-poller.php doesn't need to boot LibreNMS, it only needs the config
* use $librenms_base from config.inc.php and define it better there.
* apparently trailing whitespace removal because my editor doesn't like it :D
1 Like
how do we update with out a merge?
Hope im saying it correctly
wget https://github.com/librenms-plugins/Weathermap/pull/60.diff
git apply 60.diff
This worked for me on all three systems:
cd /opt/librenms/html/plugins
mv Weathermap Weathermap-bad
git clone https://github.com/librenms-plugins/Weathermap.git
mv /opt/librenms/html/plugins/Weathermap-bad/configs/*.conf /opt/librenms/html/plugins/Weathermap/configs/
chown -R www-data /opt/librenms/html/plugins/Weathermap/configs
1 Like
Yep, The changes are now merged.
db84
28 May 2019 15:46
12
I reran daily.sh and i still get the error:
"}
[2019-05-28 11:44:36] production.ERROR: Cannot declare class Weathermap, because the name is already in use {“userId”:1,“email”:“[email protected] ”,"exceception\FatalErrorException(code: 1): Cannot declare class Weathermap, because the name is already in use at /opt/librenms/html/plugins/Weathermap/Weatherm
[stacktrace]
Should I be on a different branch?
Chas
28 May 2019 15:56
13
don’t think daily.sh touches plugins, as its a seperate git install.
You need to either run through the above solution, or for me the following worked perfectly.
Backup /opt/librenms/html/plugins/Weathermap/configs/ just incase.
In the Weathermap directory
cd /opt/librenms/html/plugins/Weathermap/
git pull
or if you have merge conflicts due to further weathermap customization e.g weathermap animation then backup the whole directory and run
cd /opt/librenms/html/plugins/Weathermap/
git fetch --all
git reset --hard origin/master