# Trouble with Permalink redirects due to fragment after "#" not being sent to server

**URL:** <https://meta.discourse.org/t/trouble-with-permalink-redirects-due-to-fragment-after-not-being-sent-to-server/132139>\
**Category:** Product Support\
**Created:** [29 oktober 2019 om 12:48 UTC](https://meta.discourse.org/t/trouble-with-permalink-redirects-due-to-fragment-after-not-being-sent-to-server/132139 "2019-10-29T12:48:53Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pgr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pgr/32/156783_2.png) [@pgr](https://meta.discourse.org/u/pgr)\
**Post date:** [29 oktober 2019 om 12:48 UTC](https://meta.discourse.org/t/trouble-with-permalink-redirects-due-to-fragment-after-not-being-sent-to-server/132139/1 "2019-10-29T12:48:53Z")

</div>

EDIT: changed topic title to fit what I discovered to be the problem, thanks to the answers below

I’m getting a weird behaviour with permalinks on my migration work.

> My problem is not the one about internal links not redirecting. I am just trying this by pasting URLs into my browser’s address bar.

These are the two redirects I mean to happen in my tests:

> **[Why two Italian language packs?](https://community.suitecrm.com/t/why-two-italian-language-packs/22397)**
>
> Hello, Thank you Roberto for your job! But I’d like to know why there are two different Italian translation projects: one on Transifex platform, which is not complete, and a second one from Roberto Davila, who has just released it. By now, I...

that’s a **post** redirect, should redirect to the second post like this:

> **[Reports disappeared](https://community.suitecrm.com/t/reports-disappeared/38388/2)**
>
> Try this: login with admin and go to Admin-\> Display Modules and Subpanels Check the list of the hidden modules. If it is there, Drag’n’Drop it to “Displayed Modules” list. It happens some times.

> **[Why two Italian language packs?](https://community.suitecrm.com/t/why-two-italian-language-packs/22397)**
>
> Hello, Thank you Roberto for your job! But I’d like to know why there are two different Italian translation projects: one on Transifex platform, which is not complete, and a second one from Roberto Davila, who has just released it. By now, I...

that’s a **topic** redirect, should go to:

> **[Reports disappeared](https://community.suitecrm.com/t/reports-disappeared/38388)**
>
> I’m currently running 7.3.1 and while I had “Reports” at one time, I don’t have them in the toolbar. I’ve checked, and they “should” be there. Also, I’m working on a sandbox of 7.7 and I don’t see them there neither (shouldn’t be related, but...

I know my normalizations are working fine. My regexp is

`/(?:.*)(\/)(?<topicid>\d*.)-(.[^\/#\?]*)(?<parm>\?(\w*)[=](?<start>\d+))?(?:\/)?(\D+(\/)?)?(?<postid>\d+)?(?:\/)?/normalized.\k<topicid>.\k<postid>`

And I check them in the `rails` console:

```ruby
irb(main):069:0> Permalink.normalize_url('https://community.suitecrm.com/languages/17978-why-two-italian-language-packs#16249')
=> "normalized.17978.16249"

irb(main):068:0> Permalink.normalize_url('https://community.suitecrm.com/languages/17978-why-two-italian-language-packs')
=> "normalized.17978."

```

That is what I intended. I have this in my Permalinks table:

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/1/f1e6c93f85ee3e2feacc032f92694ac5a3a94d57.png)

And this is what it looks like from the database:

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/1/013267bab4697613de00f4c3fb366bfa09f1f07b.png)

**But** when I put this into the browser URL

> **[Why two Italian language packs?](https://community.suitecrm.com/t/why-two-italian-language-packs/22397)**
>
> Hello, Thank you Roberto for your job! But I’d like to know why there are two different Italian translation projects: one on Transifex platform, which is not complete, and a second one from Roberto Davila, who has just released it. By now, I...

it gets redirected to

> **[Reports disappeared](https://community.suitecrm.com/t/reports-disappeared/38388)**
>
> I’m currently running 7.3.1 and while I had “Reports” at one time, I don’t have them in the toolbar. I’ve checked, and they “should” be there. Also, I’m working on a sandbox of 7.7 and I don’t see them there neither (shouldn’t be related, but...

Instead of what it should be

> **[Reports disappeared](https://community.suitecrm.com/t/reports-disappeared/38388/2)**
>
> Try this: login with admin and go to Admin-\> Display Modules and Subpanels Check the list of the hidden modules. If it is there, Drag’n’Drop it to “Displayed Modules” list. It happens some times.

So I see the first post, it doesn’t scroll to the second one as it should.

Why is that `#16249` hash getting added back, if my normalization removed it?

Another way to expose this incongruence (although a bit artificially) is to try the following redirects from the browser’s address bar:

[https://community.suitecrm.com/normalized.17978](https://community.suitecrm.com/normalized.17978).  
correctly redirects to:  
[Reports disappeared - 💬 General Discussion - SuiteCRM](https://community.suitecrm.com/t/why-two-italian-language-packs/38388)

And [Why two Italian language packs? - #2 by roberto - Translation and Language Packs - SuiteCRM](https://community.suitecrm.com/normalized.17978.16249)  
**correctly** redirects to  
[Reports disappeared - #2 by erevodifosin - 💬 General Discussion - SuiteCRM](https://community.suitecrm.com/t/why-two-italian-language-packs/38388/2)

So why doesn’t it work when going through the normal process?

---

_[View the full topic](https://meta.discourse.org/t/trouble-with-permalink-redirects-due-to-fragment-after-not-being-sent-to-server/132139)._
