Left clicking link to /posts.rss does not work

(Ryan Mulligan) #1

Left clicking this link does not work for me (displays “Oops! That page doesn’t exist or is private.”), but middle clicking it or copying the URL works fine:

link to posts rss

I am using Chrome Version 49.0.2623.87 m on Windows 10.

Unable to link to the raw markup of this forum post
(Kane York) #2

This is the problem where URLs not defined in the Ember Router are assumed to be 404s.

(Tomas Ibarra) #3

I’ll check this. Give me a moment please.

(Tomas Ibarra) #4

I think i found the solution, but it was a little tricky to do it, the route is not being sent to the server, i made a whitelist checker to know if the route is internal or not, can you review this @zogstrip @codinghorror @sam? I can make a PR if you want to, this works actually.

  isInternalPathButNotEmber: function(path){
    return path.indexOf("posts.rss") >= 0

  routeTo(path, opts) {
    if (Em.isEmpty(path)) { return; }

    if (Discourse.get('requiresRefresh') || this.isInternalPathButNotEmber(path)) {
      document.location.href = Discourse.getURL(path);

(Ryan Mulligan) #5

The same problem happens for categories:


(Tomas Ibarra) #7

Yes this is a rare bug, because the routes exists so, the problem is when the POST is sent to the server, is rejected and misinterpreted as a 404 error, but is not passing through Ember i think.

(Régis Hanol) #8

It’s hard for us to review some random code. It’s better if you do the PR and then we review :wink:

(Tomas Ibarra) #9

I made a PR actually but i closed it because it didn’t pass through travis, i make it again anyways?

(Régis Hanol) #10

Sure, don’t trust travis. Unless everything is red.

(Tomas Ibarra) #11

There you go :grin:

(Tomas Ibarra) #12

I made a groundwork for this, here is the PR updated:

(Jeff Atwood) #13