Weathermap editor not working this morning

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.

No sure how to link it probably

No, it is related to PHP. https://www.php.net/manual/en/language.namespaces.basics.php

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

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.

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?

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

That worked, thank you!

1 Like