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

"Undefined index: icon at /var/www/owncloud/apps/notifications/lib/Handler.php#288" #129

Closed
treuss opened this issue Dec 20, 2017 · 8 comments
Assignees
Labels
Milestone

Comments

@treuss
Copy link

treuss commented Dec 20, 2017

Hi,

my owncloud-logs are filled with error-messages like this:

{
    "app": "PHP",
    "level": 3,
    "message": "Undefined index: icon at /var/www/owncloud/apps/notifications/lib/Handler.php#288",
    "method": "GET",
    "remoteAddr": "**************",
    "reqId": "********************",
    "time": "2017-12-20T10:25:29+01:00",
    "url": "/ocs/v2.php/apps/notifications/api/v1/notifications?format=json",
    "user": "******"
}

Steps to reproduce

Watch the logs grow.

Expected behaviour

The notification icon should probably show up.

Actual behaviour

Error at line 288 in [owncloud]/apps/notifications/lib/Handler.php because of a missing (?) icon.
If you check the img/ folder in notifications you'll find the following files:

icon.png
notifications-new.png
notifications-new.svg
notifications.png
notifications.svg
sample-empty.png
sample-new.png

Since there are 3 cases of icons available in pairs of svg and png but only one single icon.png it seems to me that there's a file missing: icon.svg
Is that possible?

Server configuration

Operating system: raspbian stretch

Web server: nginx/1.10.3

Database: mariadb Ver 15.1 Distrib 10.1.23-MariaDB

PHP version: PHP 7.0.19-1

ownCloud version: 10.0.4

Where did you install ownCloud from: Installation via apt.

Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.3.6
  - announcementcenter: true
  - bookmarks: 0.10.2
  - calendar: 1.5.4
  - checksum: 0.3.5
  - comments: 0.3.0
  - configreport: 0.1.1
  - contacts: 1.5.3
  - dav: 0.3.2
  - external: 1.2
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_antivirus: 0.11.2
  - files_clipboard: 0.6.2
  - files_external: 0.7.1
  - files_external_dropbox: 1.0.0
  - files_pdfviewer: 0.8.2
  - files_sharing: 0.10.1
  - files_texteditor: 2.2.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 16.0.2
  - guests: 0.5.0
  - impersonate: 0.1.2
  - market: 0.2.3
  - music: 0.5.5
  - notes: 2.3.2
  - notifications: 0.3.1
  - ownbackup: 17.7.0
  - passman: 2.1.4
  - polls: 0.8.0
  - provisioning_api: 0.5.0
  - qownnotesapi: 17.7.0
  - security: 0.0.2
  - systemtags: 0.3.0
  - tasks: 0.9.3
  - templateeditor: 0.1
  - twofactor_totp: 0.4.3
  - updatenotification: 0.2.1

The content of config/config.php:

{
    "system": {
        "instanceid": "occvpbgpwcqr",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "*******",
            "****************"
        ],
        "datadirectory": "\/ownclouddata",
        "overwrite.cli.url": "https:\/\/raspi02",
        "dbtype": "mysql",
        "version": "10.0.4.4",
        "installed": true,
        "forcessl": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "   smtp.1und1.de",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "owncloud",
        "mail_domain": "***************",
        "logtimezone": "Europe\/Berlin",
        "loglevel": 0,
        "logfile": "\/var\/log\/owncloud.log",
        "session_lifetime": 624960,
        "session_keepalive": true,
        "remember_login_cookie_lifetime": 1296000,
        "theme": "",
        "maintenance": false,
        "singleuser": false,
        "dbname": "oc",
        "dbhost": "localhost",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "forceSSLforSubdomains": true,
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "appstore.experimental.enabled": true,
        "trashbin_retention_obligation": "auto",
        "updatechecker": false,
        "htaccess.RewriteBase": "\/"
    }
}

Are you using an external user-backend, if yes which one: OwnCloud Desktop Sync, OwnCloud for Android, CalDAV, CardDAV

Client configuration

Browser: Any

Operating system: Any

Logs

ownCloud log (data/owncloud.log)

...
{
    "app": "PHP",
    "level": 3,
    "message": "Undefined index: icon at /var/www/owncloud/apps/notifications/lib/Handler.php#288",
    "method": "GET",
    "remoteAddr": "**************",
    "reqId": "********************",
    "time": "2017-12-20T10:25:29+01:00",
    "url": "/ocs/v2.php/apps/notifications/api/v1/notifications?format=json",
    "user": "******"
}
...

Browser log

Insert your browser log here, this could for example include:

a) No warnings or errors in the javascript console log
b) No http 4xx or 5xx in the network log (only 2xx, 3xx)
@DeepDiver1975
Copy link
Member

@treuss please test this fix: #130

@treuss
Copy link
Author

treuss commented Dec 20, 2017

Works for me @DeepDiver1975 ! Excellent!
When do you expect the fix to appear in master? Or rather: When will a new, signed version be available?

@DeepDiver1975
Copy link
Member

Works for me @DeepDiver1975 ! Excellent!

good to know - let's see what we can do in the next few remaining days before the holidays .... I'll let you know

@DeepDiver1975
Copy link
Member

this will most likely go into 10.0.5 which will be shipped in late January

@treuss
Copy link
Author

treuss commented Dec 20, 2017

Thanx! Excellent!

@treuss treuss closed this as completed Dec 20, 2017
@PVince81 PVince81 modified the milestones: development, QA Jun 13, 2018
phil-davis added a commit that referenced this issue Apr 3, 2019
[stable10] Fixes #129 - only set icon in case an icon is available
@PVince81
Copy link
Contributor

seems the fix is incomplete, see #278

@PVince81
Copy link
Contributor

@DeepDiver1975 any steps to reproduce ?

@PVince81
Copy link
Contributor

I wasn't able to reproduce the issue when setting the "icon" column to null for an existing notification. No warning appears in the logs. Maybe related to PHP version.

Anyway, the fix looks trivial so should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants