Closed (fixed)
Project:
Views vCards
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Jun 2018 at 20:40 UTC
Updated:
19 Aug 2019 at 12:39 UTC
Jump to comment: Most recent
The generated .vcf file will not import into contacts - I get the message "No importable cards were found.". I have tried on both my apple contacts on my mac and my google contacts in my gmail account. Pathauto is installed and up to date.
Here is what I noticed:
The generated .vcf file contains twig comments before the BEGIN and after the END notations. Also there are numerous blank lines inbetween data. I have attached my .vcf (saved as a .txt file so it would upload here).
If I remove the comments and all the blank lines and whitespace. It imports. Any ideas how to get the code to strip the blank lines or not add them, as well as the twig comments?
| Comment | File | Size | Author |
|---|---|---|---|
| alex-romano-vcf.txt | 1.03 KB | mecurran |
Comments
Comment #2
mecurran commentedalso tried it with 8.x - 2.xdev. Same results.
Comment #3
mecurran commentedI have some log errors as well that I am currently trying to decipher. There are a handful of errors all coming from this location:
http://melick-porter/admin/structure/views/ajax/display/attorney_node_di...
I am going to put them in a text file so I can trying to work through them. I will post it here as well.
Comment #4
mecurran commentedupgraded core from 8.5.2 to 8.5.4, errors in log went away. no change in vcard behavior - still has space.
Comment #5
neograph734It seems that theme debug mode is enabled. This is a development feature that should not be running in a production environment. Once you disable that, vcards should work as expected. Have a look here: https://www.drupal.org/docs/8/theming/twig/debugging-twig-templates.
Please let me know if that resolves your issue.
IMO this is not a bug of this module.
Comment #6
mecurran commentedThank you - that resolved the issue. I agree, it is certainly not a bug. ... But it was not readily apparent to me that twig debug comments would appear in a produced file. Perhaps a mention in the README might be helpful to others that come across this issue and save them a lot of time :)
Comment #7
neograph734Glad to hear your issue was solved. I believe this to be an edge case, so covering it in the README does not make much sense to me. I could however try to cover this on the status report page. If theme debug mode is enabled the system should throw some alert that vcards will not work.
Renaming the issue accordingly.
Comment #9
neograph734I've added a warning to the latest dev release that should solve this.