Can't create Cwicly links to attached files

Cwicly Plugin version: 1.3.1


When selecting an attached file like a PDF, Cwicly links are broken.
(Tested with buttons, div, etc, so it does not seem to be block related.)

NOTE: Existing blocks on a post don’t seem to be affected, it only happens with new blocks.

WORKAROUND: It works when directly entering the file URL.
→ Edit link field with pencil icon, copy URL, remove link, edit field, paste URL, select proposed link.



Thanks so much for your report!

I have been able to reproduce this issue and have added it to the bug tracker. It will be fixed in the next update.

Best regards,

Hi @yankiara,

Thank you for bringing this to our attention!

With 1.3.2, you should now be able to create links to the page of the attached files.
Kindly let me know if this is the case on your end.

Thank you in advance.

Sorry @Araminta but I don’t understand.

Now, when setting a link, if I choose a pdf attachment FILE, then save, on frontend the link leads to attachment PAGE, which is not wanted:


But then, if I edit the link with pencil button and press ENTER, it is OK on frontend:



NOTE that I don’t choose the attachment page in link dropdown but the actual PDF file.
The link should lead to pdf file and not attachent page.

BUMP @Araminta, this is NOT FIXED and pretty embarrassing for clients use (see my previous post).

Besides, it seems there’s a new issue, we can’t unlink with dedicated button:

Hello @yankiara,

The file attachment URL was considered default behaviour by WordPress up until 6.4, not the media URL.
This is why your link directs users to the attachment page and your report was not considered as justified.

Now that 6.4 draws a more specific line on what attachment pages are and that their use is no longer a default, we will make the appropriate changes in the next update.

I can also confirm the issue with the link removal.


OK sorry, I hardly never used manual (popup) link to attachment file before in Gutenberg. I only used the file block, which opens the media library to select a file. So I didn’t even remember WP behaviour with the link popup and file attachment, if I ever knew it.

Sometimes I have copy-pasted pdf text links from media library in link popup but without using the search/completion tool, so I guess for me everything was working as I expected, hence my surprise when using the input completion :wink:

Glad to know that WP changed this :smile:

Hello @yankiara,

This has been addressed in and now relies on the wp_attachment_pages_enabled option described at Changes to attachment pages – Make WordPress Core.

When attachment pages are enabled, the attachment link will redirect to the attachment page. When disabled, it will redirect to the media/file directly.