Comment create/prefix urls buggy in typo 5.3 (with url-prefix)

Hi, just upgraded to 5.3 (from 5.0, I think) and noticed that my
comments were no longer working. A bit of digging gave me the source: it
seems that the urls for the comment creation (and preview) were not
including the url-prefix (in typo config).

So instead of /prefix/to/my/blog/comments?article_id=xxx, I was getting
just /comments?article_id=xxx – which failed obviously, since I run
multiple Typo blogs on the server and need the prefix-url functionality.

For now I patched it in a quick&dirty way in articles.rb (hardcoded some
paths :), but that of course is no good long-term solution ;).

Otherwise looks nice. My wife had some problems with the Atom feeds
acting in a funky way, but that seems to have gone away now after some
typo cache cleaning and a few Passenger restarts.

-Petri

Petri Wessman wrote:

Hi, just upgraded to 5.3 (from 5.0, I think) and noticed that my
comments were no longer working. A bit of digging gave me the source: it
seems that the urls for the comment creation (and preview) were not
including the url-prefix (in typo config).

So instead of /prefix/to/my/blog/comments?article_id=xxx, I was getting
just /comments?article_id=xxx – which failed obviously, since I run
multiple Typo blogs on the server and need the prefix-url functionality.

Are you by any chance using mongrel?

Matijs van Zuijlen wrote:

Are you by any chance using mongrel?
No, I’m using Phusion Passenger (http://www.modrails.com) with Apache,
it’s pretty awesome. It’s not like it cannot see the url-prefix conf
setting in typo – everything else except the comment URLs obeys that
setting just fine.

-Petri

Petri Wessman wrote:

Matijs van Zuijlen wrote:

Are you by any chance using mongrel?

No, I’m using Phusion Passenger (http://www.modrails.com) with Apache,
it’s pretty awesome.

Agreed. I’m happy to have switched from mongrel to passenger myself.

It’s not like it cannot see the url-prefix conf
setting in typo – everything else except the comment URLs obeys that
setting just fine.

I’ll have a look at it: I have typo deployed in a sub-URL myself, so
this
problem should be affecting me as well.

Petri Wessman wrote:

_comment_form.html.erb), which seem to be generating the URLs without
the prefix. I hacked those in article.rb as a quick fix, but didn’t know
enough about Typo’s internals to do it right.

I also tried switching to some of the other themes, but all of them
seemed to have the same problem.

This apparently is a known bug (although I didn’t know :slight_smile: ):

https://fdv.lighthouseapp.com/projects/11171/tickets/99-articlecomment_url-and-articlepreview_comment_url-dont-work-with-relative-url-roots

Matijs van Zuijlen wrote:

Petri Wessman wrote:

It’s not like it cannot see the url-prefix conf
setting in typo – everything else except the comment URLs obeys that
setting just fine.

I’ll have a look at it: I have typo deployed in a sub-URL myself, so this
problem should be affecting me as well.

Thanks. Looking at the theme (Scribbish), it seems that those URLs are
generated by @article.comment_url and @article.preview_comment_url (in
_comment_form.html.erb), which seem to be generating the URLs without
the prefix. I hacked those in article.rb as a quick fix, but didn’t know
enough about Typo’s internals to do it right.

I also tried switching to some of the other themes, but all of them
seemed to have the same problem.

-Petri

Matijs van Zuijlen wrote:

This apparently is a known bug (although I didn’t know :slight_smile: ):

https://fdv.lighthouseapp.com/projects/11171/tickets/99-articlecomment_url-and-articlepreview_comment_url-dont-work-with-relative-url-roots

Thanks for the pointers to the ticketing system, wasn’t aware of that
:). Ok, now I know where to check for bug reports and to possibly make
some tickets of my own.

-Petri