Short link with "_" or "-": overview not generated
Asked by Pixel Solutions:

Hello,

I've a very strange problem (I'm using Confluence Cloud).

I use the short links quite much. However, sometimes, the short link is generated with a "_" or "-" at its end.

The link works (when I click on it, the page opens), but the link overview is not generated. Not in the editor itself, and not on the page when I display it.

Here is an example in the screenshot below:

* Three of those short links only contain letters: their overview is generated normally
* Four links ends with "_" or "-": no overview is generated

Seems like some sort of regex problem ? Or is it a setting which I have to modify on my Confluence instance ?

Thank you very much!

![Image1.png](/t5/image/serverpage/image-id/90440i9CF7E2621416A647/image-size/large?v=v2&px=999 "Image1.png")


Answers:
author: Diego
body: Hello [@Pixel Solutions](/t5/user/viewprofilepage/user-id/3853646) !  
As I understand, the Page Title preview does not work when the Tiny Link to a page has either _ or - characters at the end of the Tiny Link.

I tried to replicate this behaviour based on the description given but was unable to. ++*None of my site pages had Tiny Links with a _ or - at the end.*++

However, I noticed that ++*your Tiny Links that are affected by the issue had the / at the end*++. None of my instances Tiny Links has a / at the end.

Taking this details in consideration, ++*I added a / at the end of my Tiny Links the behavior is present*++. If I do add a / at the end of my Regular page URLs, the behavior is not present.

With this in mind, I would like to confirm a few things with you:
> 1. *Are your Tiny Links being natively generated with the / character at the end?*
> 2. *What happens if you remove the / character from the Tiny Link you pasted?*
> 3. *What is the naming pattern of the affected pages?*
> 4. *Is there any main difference in naming and/or content between the affected pages and the ones that are not affected?*

<br />

I believe that this behavior might be connected to how Tiny Links are generated. If we look here:
> * ++***[\[Atlassian Documentation\] How to programmatically generate the tiny link of a Confluence page](https://confluence.atlassian.com/confkb/how-to-programmatically-generate-the-tiny-link-of-a-confluence-page-956713432.html)***++

We see that / is part of the Tiny Link being generated. Inserting a / that does not exist within the original Tiny Link *++might lead Confluence into a dead end where it can not recognize that link as being part of the pages.++*

Let us hear from you, [@Pixel Solutions](/t5/user/viewprofilepage/user-id/3853646) . Looking forward to your reply.

comments: author: Pixel Solutions
body: Hello,

Thank you for your answer.

1) Yes, they apparently are. The links I provide are the ones generated in the "Short link" field of the "Informations about the page" page:

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/90865i9357D75F6DBF0B50/image-size/large?v=v2&px=999 "Capture.PNG")

However, it seems that the "/" is present only for the pages which have the problem (in other words for pages with the "_" or "-" at the end).

For the pages which don't have the problem, the short url is generated without the "/" at the end.

2) It's the same. No title overview is generated in both cases (in the editor as well as when displaying the page):

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/90867i5450C653396743F2/image-size/large?v=v2&px=999 "Capture.PNG")  

Notice the italic in the first case only...

3) No visible difference in naming pattern... Example of two pages:

"ECH 401 - As a consumer, I want to authenticate inside the application"

=\> URL of this page is OK

"ECH 301 - As a consumer, I want to create a user account"

=\> URL is not OK (ends with "_/")

NB: All those pages are located at the same place in the Confluence pages hierarchy.

4) Contents of all of those pages is, currently, exactly the same, verbatim: only some titles and a bit "Lorem Ipsum" text.

IMHO, it really seems to be a Confluence bug:

* Either an invalid detection RegEx (if we suppose that having an "_" or "-" at the end of a short URL is OK and should not crash the overview)
* Either in the short url generation itself (if we suppose that having an "_" or "-" at the end of a short URL is not a desirable behaviour)

Many thanks :-)


Tags: cloud

link