Hello, thanks for the module!

I'm exporting single vcards (containing only one entry). There is no name for the downloaded file generated, so the browser just downloads a file called vcf. I wrote a little patch, which checks if the generated filename is empty and replaces the empty string with a hardcoded "vcard".

CommentFileSizeAuthor
#2 filename_is_missing_on-2560491-2.patch747 bytesnebel54

Comments

Nebel54 created an issue. See original summary.

nebel54’s picture

StatusFileSize
new747 bytes
neograph734’s picture

Thanks you for finding the first flaw :).

I'll have a look at the module and the patch tomorrow. I'd like to figure out why there is no name in the first place. I'll keep you posted.

neograph734’s picture

I just checked again, but all my vcards were exported with the username of the vcard I requested. Could it be your username contained non-alphanumeric characters or perhaps characters that are forbidden in path/filenames?

I am trying to reproduce the specific situation.

nebel54’s picture

Ok, thank you – that's strange. With username you mean the logged-in username or some assigned field?

neograph734’s picture

The logged in username (I wanted to use something that would be unique for each user).

neograph734’s picture

Do you have a chance of fetching the value of <? key($items); ?> before you rewrite it with $filename?
If it is indeed some forbidden character we might try to transliterate the filename.

neograph734’s picture

Status: Active » Postponed (maintainer needs more info)

neograph734’s picture

Status: Postponed (maintainer needs more info) » Fixed

Committed to latest dev release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.