Hi, I use current 1.4.14 to export and import a complex node from one environment to an other. On most nodes, the transfer works - but for 2 I get an error trying to import:
No link template 'canonical' found for the 'file' entity type

I have no idea what is causing the problem. How can I debug the problem to get the cause?

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

vistree created an issue. See original summary.

nginex’s picture

Status: Active » Needs review
Related issues: +#3556685: Retain url query and fragments in Text Field data-entity imports

Could you please check the fix from #3556685: Retain url query and fragments in Text Field data-entity imports

I believe this is the root cause

vistree’s picture

@nginex, thank you for your hint. Unfortunately, the patch (diff) from your linked issue does not help in my case.

nginex’s picture

Status: Needs review » Active
vistree’s picture

I checked my export yml and can agree that the problem is related to file entities embeded in CKeditor 5 text fields like:
<a href="/sites/default/files/media/document/2025-10/exmaple.pdf" title="Argumentation Kombinat" data-entity-type="file" data-entity-uuid="3d9e7c13-8778-47e3-8009-85a31cdb8658" data-entity-substitution="file"><span>PDF</span></a>

vistree’s picture

If I remove
data-entity-uuid="3d9e7c13-8778-47e3-8009-85a31cdb8658"
The import of the node works.

yfma’s picture

It was working with 1.4.13, after we upgraded to 1.4.14, the issue happened.

yce made their first commit to this issue’s fork.

yce’s picture

Hi,

Looks like the importer tried to generate a canonical URL for the File entity however the File entity does not define a canonical URL template.
Using the createFileUrl() method in case of a File entity seems to solve the issue.

yce’s picture

Status: Active » Needs review

jannakha made their first commit to this issue’s fork.

jannakha’s picture

Version: 1.4.14 » 1.4.x-dev

latest dev