Some items have extension added to their names => wikilinks don't work

Hi,
has anyone else noticed this weird behaviour? There are very few reports about wikilinks in DTTG at all.

Symptoms:

Some wikilinks in markdown files suddenly stop working in DTTG, while still functional in DTP and Obsidian.

In a markdown file with various wikilinks some may still be functional, others not.
This happens with wikilinks to other file types too, e.g. pdf or xlsx, and images.

This was driving me crazy because I couldn’t figure out what was going on. Links that worked fine one day, didn’t work the next.
Until I finally noticed this: the file list in DTTG displays some names with an extension (even though extensions are never shown in DTTG).

Immediate cause:

The file’s extension, e.g. “.md”, was somehow added to the item’s name property. But only in DTTG, not in DTP . How is this even possible?
Note: the extension is not added to the filename - rechnungen.mddoes not become rechnungen.md.md

Results:
In DTTG, a wikilink like [[Start]] doesn’t work any more when the item’s name has changed to Start.md. If I change the wikilink to [[Start.md]], it works.

The same applies to other file types than .md: in DTTG a wikilink to a pdffile has to exactly match the item’s name (not its filename!). [[Example.pdf]]works only when .pdf was added to the item’s name. Without that, the link has to be just [[Example]].

If I manually remove the extension from the name, the wikilinks work again. The extension might come back another day, though.

Embedded images are treated differently in DTTG: the wikilink has to have an image extension, e.g. ![[image.png]], but the item’s name must only be image. If the item’s name has become image.png, it is not recognised.

Underlying issue ?
I think it must be purely a metadata problem, since file names in Finder are not affected.
I can’t see any pattern in which files are affected, or if any of my actions might have triggered the effect.

I’m reporting this as a DTTG issue, because the effects are only noticeable in DTTG. But it could conceivably originate from DTP.

Though the added extension can’t be seen anywhere in DTP - not in the list view, not in the inspector - items that have it can be found with a search for name:>.md (“name ends with ‘.md’”). Same goes for .pdf, .xlsx, etc.

To anyone willing: please try this search - even if you don’t use wikilinks yourself.

How could I work around this problem, until it can be fixed? I can’t manually remove the appended extensions in DTTG - there are too many. And I don’t see how I could access them in DTP, since they are invisible there.
Any thoughts?

Best regards
Doris


Background:
I noticed this only recently after I started building a family wiki in DEVONthink, and testing its functionality and appearance in DTTG frequently.
But I have now found files with this issue in several databases. Most of the affected files are recent, though some I haven’t touched in years.

Most of my files are in indexed folders on my Mac and some in indexed iCloud Drive folders (kept downloaded).

DTTG 3.8.14 on iPhone with OS 26.2
DTTG 4.0.3 on iPad with iPadOS 26.2
DTP on MacBook Pro with MacOS Tahoe 26.2
Syncing via Bonjour and Dropbox

Wikilinks settings in DTTG and in DTP:
Automatically: On
Square Brackets: On
Names and Aliases: Off

I ran Verify & Repair on all databases; and most of them were recently rebuilt, too - to no effect.

Though the added extension can’t be seen anywhere in DTP - not in the list view, not in the inspector - items that have it can be found with a search for name:>.md (“name ends with ‘.md’”). Same goes for .pdf, .xlsx, etc.

Have you enabled DEVONthink’s Settings > General > Appearance > Show filename extensions?


Why are you running version 3.x on your phone? DEVONthink To Go 3.x is in maintenance. The current version and active focus of mobile development is 4.0.3.

I switched it off to demonstrate that the pseudo-extensions visible for some items in DTTG do not appear in DTP..When the setting is enabled, all items have exactly one extension, as they should.

Security blanket? Initially, I was wary of going all in and wanted to see how reliable v.4 is. At the moment, I‘m not happy with v.4 - it is very sluggish at times, even stalls. I‘ll try and add to the appropriate thread tomorrow,

Don’t start a thread. In DEVONthink To Go, please select Action menu (…) > About > Contact Us and include information about how large your syncing databases are. Thanks.

@BLUEFROG Now that at least one other user has encountered the issue (@Krzin42:Blocked recursion in DTTG 4’s MD file), I’d appreciate it if you could take a closer look at my detailed report. Maybe @eboehnisch could have a look too?

I urge you to run these searches in DTTG and desktop DT on your synced databases:
Compare the number of results for
kind:markdown and name:>.md,
kind:pdf and name:>.pdf
and other extensions in your databases. You might well find discrepancies.

Across all my databases, I found these numbers:
kind:markdown: 1549 name:>.md: 95
kind:pdf: 6325 name:>.pdf: 154

name:>.md should not return any results, because .md is not normally a part of an item’s name.

1 Like

I will have a look. @BLUEFROG, please open an issue for this (or update an existing one).

@eboehnisch Thank you for looking into it. The bug really ruins the wiki experience in DTTG.

However, I have found a workaround to tide me over until it is fixed:

EDIT: that was premature. It seemed to work the first few times I tried on just a few files. The extraneous extensions are now not visible in DTTG either, but now none of my wikilinks work in DTTG anymore. I hope at least something can be learned from this.

I’ll leave the following in as documentation but: DO NOT TRY YOURSELF

The extraneous extensions are not visible in the desktop DT interface. But items having them can be found with a search for name:>.md, for example.
I found out that in AppleScript, the record property name has this extraneous extension, while the property name without extension does not have it.
So I created a smart rule script that replaces name with name without extension for the affected items. This change then syncs to DTTG, and wikilinks pointing to those items work again.

Here is my smart rule and script for anyone who also experiences this problem. I added criteria for the file types I generally use and might link to via wikilinks.
Caveat: the script has no safeguards - use with caution. There may be situations where name and name without extension legitimately differ.

The script for the smart rule:

on performSmartRule(theRecords)
	tell application id "DNtp"
		repeat with theRecord in theRecords
			set theName to name of theRecord
			set theShortName to name without extension of theRecord
			
			if theName is not equal to theShortName then
				set name of theRecord to theShortName
				log message "Removed extension from item name" record theRecord
			end if
		end repeat
	end tell
end performSmartRule

I also created smart rules that alert me when items newly acquire the extension. They run before and after sync and hopefully will help pinpoint the circumstances when that happens. I’ll let you know if I find out more.

We have not seen any occurrence of any extra extensions being added to files. However, we have a modification coming in the next maintenance release that should hopefully address what you’re seeing with WikiLinks.