Repository navigation
Import failing when importing a vcard-button #976
Description
Activity
Could you throw the link export into something like https://jsonformatter.curiousconcept.com ?
It's probably just a formatting/parsing error.
The export is formated in json, the vcard data is stored as json in the database.
If the quotes in the vcard data isn't escaped properly when exporting, the importer can't read the file properly.
Normally you should just get something like a "failed to import" error on your dashboard. I'll have to take a look at that.
If that's the case, the import system should be able to read the properly formatted data already.
If we can test any individual issue here, we can start to rule out more specific formatting issues.
@andi98 if you send me an email with your link export I might be able to send you a patched file you could try.
- addedbugSomething isn't workingSomething isn't workingphpPull requests that update Php codePull requests that update Php code
on May 7, 2026 I isolated a validation failure on current
main(7bd6cea) that does not depend on malformed JSON.blocks/vcard/handler.phpstores the contact as JSON inlink.exportLinks()serializes that string inside the outer export, butimportData()appliesnullable|exturlto every importedlink, includingtype: "vcard". Theexturlrule accepts onlyhttp,https,mailto, andtelschemes, so correctly encoded contact JSON fails it.I ran the actual
exturlclosure fromAppServiceProvider.phpunder PHP 8.3.6 with synthetic contact data, including quotes in the organization name. Both layers of JSON decode successfully and preserve the contact exactly, but the rule rejects the vCard value; an HTTPS URL passes as a control.This is an isolated validator reproduction, not a completed database import test. PR #962 changes vCard generation and does not touch this import validation. A fix needs type-appropriate validation for the contact payload while retaining URL validation for ordinary links. Simply reformatting a valid export won't address this particular rejection.
The controller/database reproduction is now complete, and I opened draft #1004. On original main, importing the valid vCard returned an error after removing the user's existing links. The change validates link payloads first and uses JSON-object validation for vCards.
All 13 focused tests pass against the change using the real Laravel controller, UploadedFile requests, repository migrations and SQLite. The draft explains the existing lockfile/test-suite setup problems and the validation limits; it does not claim a browser/MySQL test or transactional rollback for every possible import failure.
LinkStack version
4.8.6
Description
Hello, when importing a link export from one user to another user on the same instance it fails when the JSON file contains a link with "type": "vcard".
I get a "Invalid link" exception from UserController:
LinkStack/app/Http/Controllers/UserController.php
Line 1016 in 2dfa544
Probably the validator fails for the JSON in the "link" attribute.
Details about your system
Docker on Debian
How to reproduce
Export the bookmark list from a user with a vcard-button and try to import it for another user.
Possible Solution
No response
Additional Context
No response