back to phpList.org

Vcard inclusion

Great feature this Vcard inclusion! I have been playing with the [CONTACT] placeholder.

In HTMLformat with the option to include Google analytics code, I get a 404. If I remove the code manually in the browser, and it ends with ?p=vcard, I finally download the Vcard.
In text format works fine.

But where is the import data-vCard screen, as seen on the image at the release notes?
And how to fix the 404?

Thanks!

2 Likes

Thanks for the feedback @Ronald2404!

That screen is from Thunderbird emai client – the purpose of it is to illustrate importing the contact card. This varies between different devices and mail clients, because the vcard import is not handled by phpList or the campaign content itself.

Not sure. Maybe @xheni knows

Thanks Sam,
Thanks for explaining.
I was confused because that import screen was on top of the startscreen of PHPList, I thought it was a PHPList import screen, which I could not find.

Concerning the 404. the testmessage in HTML format has a link to the v-card. I tested in several mail-programs, but it always opens a browser with a 404. Only after removing the GA-code, a download starts.

the code is:
<a href=“https://www.mysite.com/lists/?p=vcard target=”_blank" title=“This link will open in a new window”>Add us to your address book

I propose to change the code to:

<a href="https://www.mysite.com/lists/?p=vcard download>Add us to your address book

to bypass the browser and download immediately (I suspect the title is made by the browser)

I am not a programmer, but i hope my contribution makes sense.

@Ronald2404 @samtuke The 404 is probably caused by the replacement of the placeholder, which adds a space character to the end of the URL.See this line in admin/lib.php

    $content = str_replace($contactInstance, '<a href="'.htmlentities(getConfig('vcardurl')).' ">'.$GLOBALS['strContactMessage'].'</a>', $content);

In some scenarios the URL will be trimmed, thus removing the space, but there’s no reason for the space to be there.
When google tracking is enabled, the extra parameters are added after the space

image

1 Like

Thank you, @duncanc,

fixed,that did the trick!