Closed Hummingfrogs closed 7 years ago
Have you entered your OpenWeatherMap API key in the settings?
Hi, I added OpenWeatherMap API into "Admin > Additional settings > Weather" and clicked Save button, it seems to be saved once, but after leaving admin page and when return to this page, API Key disappears (remain in blank). Then after this I tried to add a city, and failed. I don't think this is a bug, but I don't figure out what or how to to add a city correctly. Thanks,
Just tried it myself, it doesn't indeed save the key - a bug there? I added the key from the app itself (cog in the left bottom corner)
Wow! By adding API key into App's Settings text field, succeeded to add a city! Thanks! By the way , there're two options for adding a API key both Admin panel and App panel itself, isn't it confusing for user ?
In my opinion, when the app is opened, it should default to settings when no key is present and forbid any city adding at all at that moment.
Sorry for being long to change this feature... i was very busy on many projects. Don't hesitate to propose a PR to define settings in admin part
Fixed by 2a693ed1611f5203a27ef71d828b2245e774dab6
Signing status
Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here. "No errors have been found."App list
Enabled: - activity: 2.5.2 - admin_notifications: 1.0.0 - audioplayer: 2.0.21.0.6 - bruteforcesettings: 1.0.2 - comments: 1.2.01.0.0 - dav: 1.3.0: 1.2.0 - drawio: 0.8.81.2.0 - federatedfilesharing: 1.2.0 - federation: 1.2.0 - files: 1.7.2.0 - files_markdown: 1.0.1: 1.1.1 - files_pdfviewer: 1.1.1 - files_reader: 1.0.4 1.2.0 - files_sharing: 1.4.0 - files_texteditor: 2.4.1 - files_trashbin: 1.2.0 - files_versions: 1.5.0 - files_videoplayer: 1.1.0 - firstrunwizard: 2.1 - gallery: 17.0.0 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - news: 11.0.5 - nextcloud_announcements: 1.1 - notifications: 2.0.0 - oauth2: 1.0.5 - password_policy: 1.2.2 - previewgenerator: 1.0.6 - provisioning_api: 1.2.0 - quota_warning: 1.0.0 - serverinfo: 1.2.0 - sharebymail: 1.2.0 - survey_client: 1.0.0 - systemtags: 1.2.0 - theming: 1.3.0 - twofactor_backupcodes: 1.1.1 - twofactor_totp: 1.3.0 - updatenotification: 1.2.0 - weather: 1.4.2 - workflowengine: 1.2.0 Disabled: - admin_audit - encryption - files_external - user_external - user_ldapConfig report
{ "system": { "instanceid": "ocibprihprl6", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "nextcloud.nabecyan.dyndns.org" ], "datadirectory": "\/var\/www\/nextcloud\/data", "overwrite.cli.url": "https:\/\/MYPRIVATEDOMAIN", "dbtype": "mysql", "version": "12.0.0.29", "dbname": "nextcloud", "dbhost": "localhost", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "loglevel": 3 } }Web server error log
49.135.XXX.XXX - - [28/Jun/2017:18:46:56 +0900] "POST /index.php/apps/weather/city/add HTTP/1.1" 401 1025 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4" 49.135.70.127 - - [28/Jun/2017:18:46:58 +0900] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 1377 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36" 211.16.242.200 - hideki [28/Jun/2017:18:46:59 +0900] "PROPFIND /remote.php/dav/files/USERNAME/ HTTP/1.1" 207 1591 "-" "Mozilla/5.0 (Windows) mirall/2.3.1 (build 8) (Nextcloud)"Nextcloud log
{"reqId":"ztIIj0fGINFQ7mvZsBbp","level":3,"time":"2017-06-28T09:51:59+00:00","remoteAddr":"49.135.70.127","user":"USERNAME","app":"PHP","method":"GET","url":"\/index.php\/settings\/admin\/additional","message":"Undefined index: openweathermap_api_key at \/var\/www\/nextcloud\/apps\/weather\/templates\/admin.php#6","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit\/603.2.4 (KHTML, like Gecko) Version\/10.1.1 Safari\/603.2.4","version":"12.0.0.29"}Browser log
At Admin>Logging ,reported as below.Error PHP Undefined index: openweathermap_api_key at /var/www/nextcloud/apps/weather/templates/admin.php#6