Cacti / plugin_weathermap

Weathermap for Cacti 1.x
MIT License
80 stars 25 forks source link

Duplicating weathermap from console (Management/Weathermaps) fails with SQL column does not exist. #128

Closed sgvfr closed 10 months ago

sgvfr commented 10 months ago

Weathermap version: b2f3403fc (HEAD -> develop, origin/develop, origin/HEAD) QA: Modify confirmation API to add header and footer most current pull of cacti devel 1.3

Trying to duplicate a weathermap from the console fails.

  1. Management / weathermaps
  2. Select an existing weathermap
  3. choose "duplicate" from dropdown and click "Go".
2023-11-14 13:06:14 - SQL Backtrace: (/plugins/weathermap/weathermap-cacti-plugin-mgmt.php[70]:weathermap_form_actions(), /plugins/weathermap/weathermap-cacti-plugin-mgmt.php[405]:map_duplicate(), /plugins/weathermap/weathermap-cacti-plugin-mgmt.php[1420]:sql_save())

2023-11-14 13:06:14 - DBCALL ERROR: SQL Save on table 'weathermap_maps': Column 'debug' does not exist, unable to save!
TheWitness commented 10 months ago

Was this an new weather map install or upgrade. If upgrade, from what version?

TheWitness commented 10 months ago

This one should be resolved. Before I tag it, I have to get to the others though.

sgvfr commented 10 months ago

looks like a missed ( , or an extra ) on Weathermap.class.php

1611: $dy = (100 - $p) * $scalefactor);

i changed locally to: $dy = ((100 - $p) * $scalefactor);

500 cleared.

[Wed Nov 15 09:27:37.566982 2023] [php:error] [pid 2479099] [client 10.52.12.200:52835] PHP Parse error: Unclosed '{' on line 1610 does not match ')' in /var/www/html/cacti/plugins/weathermap/lib/WeatherMap.class.php on line 1611, referer: http://10.52.101.249/plugins.php

sgvfr commented 10 months ago

sorry, this was reported in https://github.com/Cacti/plugin_weathermap/issues/127 already.

sgvfr commented 10 months ago

I'll close this one as the new bug was introduced under a different issue (127) this bug was fixed and can confirm working for me with the latest pull.