nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.56k stars 4.08k forks source link

Address fields missing from contact #5931

Closed founderio closed 5 years ago

founderio commented 7 years ago
### Steps to reproduce 1. Open Contacts app 2. Select one specific contact 3. Look for the address data that was there before Edited output of the respective card properties: ``` MariaDB [cloud]> select * from oc_cards_properties where cardid = 001; +------+---------------+--------+------------+-----------------------------------------------------+-----------+ | id | addressbookid | cardid | name | value | preferred | +------+---------------+--------+------------+-----------------------------------------------------+-----------+ | 2682 | 5 | 001 | N | Kadabra;Abra;;; | 0 | | 2683 | 5 | 001 | FN | Abra Kadabra | 0 | | 2684 | 5 | 001 | EMAIL | mailsomething@something.domain | 0 | | 2685 | 5 | 001 | EMAIL | maildifferent@something.domain | 0 | | 2686 | 5 | 001 | TEL | +49 1234 5678 | 0 | | 2687 | 5 | 001 | TEL | +49 4321 9876 | 0 | | 2688 | 5 | 001 | ADR | ;;Umlautstra�e 01;Somecity;;77777;Deutschland | 0 | | 2689 | 5 | 001 | BDAY | 16040101 | 0 | | 2690 | 5 | 001 | IMPP | skype:username | 0 | | 2691 | 5 | 001 | IMPP | icq:somenumbersnooneneeds | 0 | | 2692 | 5 | 001 | UID | 00000000-0000-0000-0000-000000000000 | 0 | | 2693 | 5 | 001 | CATEGORIES | Freunde | 0 | +------+---------------+--------+------------+-----------------------------------------------------+-----------+ 12 rows in set (0.00 sec) ``` Note the encoding issue in the street name, might be related. It seems to only be failing for contacts with these special characters. I've included encoding info in the database version section below. ### Expected behaviour I see the address of the contact. ### Actual behaviour The address for the contact is not shown, but the browser console shows this error: TypeError: Cannot read property 'value' of undefined Full log below, tried several times. Side note: the address template does not get loaded when I start fresh & select one of the broken contacts. Only when selecting a functional contact I see a request to `https://cloud.dhelixnet.de/apps/contacts/templates/detailItems/adr.html`. ### Server configuration **Operating system**: Ubuntu 14.04.5 LTS **Web server:** Apache/2.4.7 (Ubuntu) **Database:** 5.5.56-MariaDB-1ubuntu0.14.04.1
Character set information, as this may be related. ``` MariaDB [cloud]> SHOW VARIABLES LIKE 'char%'; +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | latin1 | | character_set_connection | latin1 | | character_set_database | latin1 | | character_set_filesystem | binary | | character_set_results | latin1 | | character_set_server | latin1 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+ 8 rows in set (0.00 sec) MariaDB [cloud]> SHOW CREATE TABLE oc_cards_properties; [...] CREATE TABLE `oc_cards_properties` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `addressbookid` bigint(20) NOT NULL DEFAULT '0', `cardid` bigint(20) unsigned NOT NULL DEFAULT '0', `name` varchar(64) COLLATE utf8_bin DEFAULT NULL, `value` varchar(255) COLLATE utf8_bin DEFAULT NULL, `preferred` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`), KEY `card_contactid_index` (`cardid`), KEY `card_name_index` (`name`), KEY `card_value_index` (`value`) ) ENGINE=InnoDB AUTO_INCREMENT=2847 DEFAULT CHARSET=utf8 COLLATE=utf8_bin ```
**PHP version:** 7.0.21-1~ubuntu14.04.1+deb.sury.org+1 **Nextcloud version:** (see Nextcloud admin page) 12.0.0 **Updated from an older Nextcloud/ownCloud or fresh install:** Updated from all the way back to an early ownCloud version. No major versions skipped. **Where did you install Nextcloud from:** Manual install. **Signing status:**
Signing status No errors have been found.
**List of activated apps:**
App list ``` Enabled: - activity: 2.5.2 - admin_audit: 1.2.0 - bruteforcesettings: 1.0.2 - calendar: 1.5.3 - checksum: 0.3.5 - comments: 1.2.0 - contacts: 1.5.3 - dav: 1.3.0 - deck: 0.2.1 - external: 2.0.3 - federatedfilesharing: 1.2.0 - federation: 1.2.0 - files: 1.7.2 - files_downloadactivity: 1.1.1 - files_external: 1.3.0 - files_markdown: 1.0.1 - files_pdfviewer: 1.1.1 - 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 - nextcloud_announcements: 1.1 - notifications: 2.0.0 - oauth2: 1.0.5 - password_policy: 1.2.2 - provisioning_api: 1.2.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 - updatenotification: 1.2.0 - workflowengine: 1.2.0 Disabled: - encryption - ojsxc - spreed - user_external - user_ldap ```
**Nextcloud configuration:**
Config report ``` { "system": { "instanceid": "51bc4ee6246e5", "installed": true, "maintenance": false, "version": "12.0.0.29", "installedat": "1335529785.0068", "lastupdatedat": "1342630087.1883", "upgrade.disable-web": true, "datadirectory": "\/var\/www\/owncloud-data", "dbtype": "mysql", "dbname": "cloud", "dbhost": "localhost", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "theme": "", "trusted_domains": [ "cloud.dhelixnet.de" ], "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "mail_from_address": "accounts", "mail_smtpmode": "smtp", "mail_domain": "dhelixnet.de", "mail_smtpauthtype": "LOGIN", "mail_smtphost": "mail.dhelixnet.de", "mail_smtpport": "25", "mail_smtpsecure": "tls", "versions": "true", "enable_previews": true, "preview_max_scale_factor": 10, "secret": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/cloud.dhelixnet.de", "check_for_working_webdav": true, "check_for_working_wellknown_setup": true, "check_for_working_htaccess": true, "loglevel": "1", "log_type": "file", "logfile": "\/var\/log\/nextcloud\/nextcloud.log", "log_rotate_size": 104857600, "updater.release.channel": "stable" } } ```
**Are you using external storage, if yes which one:** no **Are you using encryption:** no **Are you using an external user-backend, if yes which one:** no ### Client configuration **Browser:** Inox 59.0.3071.115 (Equivalent to Chrome/Chromium) **Operating system:** Arch Linux ### Logs #### Web server error log
Web server error log Too much noise due to sync activity. Yell if you really need this. ``` ```
#### Nextcloud log (data/nextcloud.log)
Nextcloud log Up to last login attempt, yell if you need more. File paths redacted. ``` {"reqId":"f6ZTEDgAcTwAthXfezlV","level":1,"time":"2017-07-30T21:51:36+00:00","remoteAddr":"2001:16b8:22d4:8700:1dd0:f76b:2772:4181","user":"--","app":"admin_audit","method":"POST","url":"\/login","message":"Login attempt: \"admin\"","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/59.0.3071.115 Safari\/537.36","version":"12.0.0.29"} {"reqId":"f6ZTEDgAcTwAthXfezlV","level":1,"time":"2017-07-30T21:51:36+00:00","remoteAddr":"2001:16b8:22d4:8700:1dd0:f76b:2772:4181","user":"admin","app":"admin_audit","method":"POST","url":"\/login","message":"Login successful: \"admin\"","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/59.0.3071.115 Safari\/537.36","version":"12.0.0.29"} {"reqId":"YhPGpikoFEVpYWdc7Dqv","level":1,"time":"2017-07-30T21:51:40+00:00","remoteAddr":"2001:16b8:22d4:8700:1dd0:f76b:2772:4181","user":"admin","app":"admin_audit","method":"GET","url":"\/core\/preview.png?file=REDACTED (width: \"32\", height: \"32\" crop: \"1\", mode: \"fill\")","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/59.0.3071.115 Safari\/537.36","version":"12.0.0.29"} {"reqId":"BXyeslwIbauYvsLybgs9","level":1,"time":"2017-07-30T21:51:40+00:00","remoteAddr":"2001:16b8:22d4:8700:1dd0:f76b:2772:4181","user":"admin","app":"admin_audit","method":"GET","url":"\/core\/preview.png?file=REDACTED (width: \"32\", height: \"32\" crop: \"1\", mode: \"fill\")","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/59.0.3071.115 Safari\/537.36","version":"12.0.0.29"} {"reqId":"YkgUJ5FQKW7xuWiJoOpg","level":1,"time":"2017-07-30T22:05:02+00:00","remoteAddr":"","user":"--","app":"cli","method":"--","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for local cache","userAgent":"--","version":"12.0.0.29"} {"reqId":"YkgUJ5FQKW7xuWiJoOpg","level":1,"time":"2017-07-30T22:05:02+00:00","remoteAddr":"","user":"--","app":"cli","method":"--","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for distributed cache","userAgent":"--","version":"12.0.0.29"} {"reqId":"d1UmZi2cF9DJm1XUnoQ5","level":1,"time":"2017-07-30T22:05:33+00:00","remoteAddr":"","user":"--","app":"cli","method":"--","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for local cache","userAgent":"--","version":"12.0.0.29"} {"reqId":"d1UmZi2cF9DJm1XUnoQ5","level":1,"time":"2017-07-30T22:05:33+00:00","remoteAddr":"","user":"--","app":"cli","method":"--","url":"--","message":"Memcache \\OC\\Memcache\\APCu not available for distributed cache","userAgent":"--","version":"12.0.0.29"} ```
#### Browser log
Browser log ``` core.js:7 JQMIGRATE: Migrate is installed, version 1.4.0 angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 TypeError: Cannot read property 'value' of undefined at new (detailsItem_controller.js:50) at Object.invoke (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:4718) at $controllerInit (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:10354) at nodeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9263) at compositeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8620) at publicLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8500) at lazyCompilation (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8844) at boundTranscludeFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8637) at controllersBoundTransclude (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9385) at ngRepeatAction (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:29871) (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 DevTools failed to parse SourceMap: https://cloud.dhelixnet.de/apps/contacts/js/vendor/angular-cache/dist/angular-cache.js.map angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 TypeError: Cannot read property 'value' of undefined at new (detailsItem_controller.js:50) at Object.invoke (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:4718) at $controllerInit (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:10354) at nodeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9263) at compositeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8620) at publicLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8500) at lazyCompilation (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8844) at boundTranscludeFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8637) at controllersBoundTransclude (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9385) at ngRepeatAction (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:29871) (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:10467 $digest @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:17542 $apply @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:17790 (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:25890 dispatch @ core.js:3 r.handle @ core.js:3 angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 TypeError: Cannot read property 'value' of undefined at new (detailsItem_controller.js:50) at Object.invoke (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:4718) at $controllerInit (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:10354) at nodeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9263) at compositeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8620) at publicLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8500) at lazyCompilation (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8844) at boundTranscludeFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8637) at controllersBoundTransclude (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9385) at ngRepeatAction (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:29871) (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:10467 $digest @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:17542 $apply @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:17790 (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:25890 dispatch @ core.js:3 r.handle @ core.js:3 angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 TypeError: Cannot read property 'value' of undefined at new (detailsItem_controller.js:50) at Object.invoke (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:4718) at $controllerInit (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:10354) at nodeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9263) at compositeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8620) at publicLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8500) at lazyCompilation (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8844) at boundTranscludeFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8637) at controllersBoundTransclude (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9385) at ngRepeatAction (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:29871) (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:10467 $digest @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:17542 $apply @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:17790 (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:25890 dispatch @ core.js:3 r.handle @ core.js:3 angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 TypeError: Cannot read property 'value' of undefined at new (detailsItem_controller.js:50) at Object.invoke (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:4718) at $controllerInit (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:10354) at nodeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9263) at compositeLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8620) at publicLinkFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8500) at lazyCompilation (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8844) at boundTranscludeFn (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:8637) at controllersBoundTransclude (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:9385) at ngRepeatAction (angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:29871) (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:13920 (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:10467 $digest @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:17542 $apply @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:17790 (anonymous) @ angular.js?v=c82e0c375434a0bbb80944ec9c2980c2-0:25890 dispatch @ core.js:3 r.handle @ core.js:3 ```
LukasReschke commented 7 years ago

cc @georgehrke

ChristophWurst commented 5 years ago

cc @skjnldsv

skjnldsv commented 5 years ago

wow, what an oldie :grin: @founderio is it still happening on latest contacts 3.0.x versions?

founderio commented 5 years ago

@skjnldsv yes, still happening on 3.0.5. Although I cannot see the mentioned error message in my log anymore, the address is still missing for the corrupted contacts. Re-Tested with Firefox 66 just now. The address shows up in synced devices just fine, btw.

founderio commented 5 years ago

wow, what an oldie

Wow, how quickly the time passed.. Feels just like yesterday I reported this

skjnldsv commented 5 years ago

@founderio can you paste the vcf file please? You can obfuscate the sensitive data .

founderio commented 5 years ago

@skjnldsv Sure, here you go. (txt suffix due to GitHub's file name filter...)

No guarantees that the broken data is actually still there - some automatic conversion on the export or in my editor might have some impact here. Data is replaced with dummy data, but I left the "Straße" bit intact as I suspect the ß to be messed up somehow..

ff9d8b0f-5865-4faf-993d-bceba83cd624.txt

skjnldsv commented 5 years ago

Can you tri contacts's test release here please? contacts.tar.gz

founderio commented 5 years ago

Hey, sorry for the late response. I can confirm that the test release works. I can see the address field now!

skjnldsv commented 5 years ago

Let's close this then, it was not a server issue :) Contacts 3.1.x releases will solve your issue