How to enable nested comments on non-standard theme?

Topics: Themes
Dec 29, 2009 at 6:48 AM

Hi!

I am using non-standard BE theme and it doesn't support nested comments.

Which modifications I should make to enable nested comments on it? (If it is important, I am using CrazyWheels theme from jankoatwarpspeed.com)

I really like how it works on standard theme on BE 1.5.1 and want to get almost the same view.

Thank you in advance for your support!

Coordinator
Dec 29, 2009 at 6:58 AM

Check out section 5.3 (Nested Comments) in the documentation on Theme Creation.

It covers the basic requirements.  You can also compare that to the Standard theme to see what it's doing (which is basically what the documentation explains).

Dec 29, 2009 at 9:36 PM

Thank you, BenAmada!

You are really helpful, I made all modifications from the docs and nested comments looks fine.

Only one strange problem occured - on production server comments (nested and usual) are not added on IE 8 ("adding comment" message goes to infinite loop). On FF and Chrome all works good, as well as on IE 8 under development machine.

Here is my site (in russian): http://delu-vremya.com/

I am trying to add comment to first (and the one) post.

Coordinator
Dec 30, 2009 at 2:01 AM

I tried adding comments on your site in both FF and IE8.

I see the problem, but am not sure of the solution.  The URL to the posts have a bunch of percent encoded values because of the Russian characters.  When adding a comment, an asynchronous POST to the server is done.  The POST is sent to the correct URL in FF.  But in IE, a 404 error is occurring because it's trying to do a POST to:

/ru/post/?????????????-?????

in Firefox, the POST is being done to:

/ru/post/%D0%92%D1%81%D1%82%D1%83%D0%BF%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5-%D1%81%D0%BB%D0%BE%D0%B2%D0%BE.aspx

and there is no 404.  This URL matches the URL in the address bar.

As a workaround, I would try using non-Russian SLUGs when creating your posts.  The post Title can still be Russian.  But maybe use a non-Russian Slug.  You can at least try that and see if it then works in IE8, which I'm guessing it will.

Coordinator
Dec 30, 2009 at 3:55 AM
BenAmada wrote:   404 error is occurring because it's trying to do a POST to:

/ru/post/?????????????-?????

in Firefox, the POST is being done to:

/ru/post/%D0%92%D1%81%D1%82%D1%83%D0%BF%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D0%B5-%D1%81%D0%BB%D0%BE%D0%B2%D0%BE.aspx

and there is no 404.  This URL matches the URL in the address bar.

As a workaround, I would try using non-Russian SLUGs when creating your posts.  The post Title can still be Russian.  But maybe use a non-Russian Slug.  You can at least try that and see if it then works in IE8, which I'm guessing it will.

There is slug translation extension for doing just that - convert Cyrillic characters into Latin in the slug, so you get rid of those "????" : http://devblog.ailon.org/devblog/post/2008/04/SlugTransliterator.aspx

 How convenient is that? :)

Coordinator
Dec 30, 2009 at 4:28 AM
rtur wrote:
BenAmada wrote:   404 error is occurring because it's trying to do a POST to:

/ru/post/?????????????-?????

There is slug translation extension for doing just that - convert Cyrillic characters into Latin in the slug, so you get rid of those "????" : http://devblog.ailon.org/devblog/post/2008/04/SlugTransliterator.aspx

 How convenient is that? :)

Great, sounds like that's just what's needed!
(bookmarked for the next person who runs into this)

Dec 30, 2009 at 7:28 AM

Thank you, BanAmada for pointing me to the problem!

I tried adding another post with English slug and commenting works well.

But it is not a good idea for me to go from Russian to transliterated or English tags. You see, there is a huge trend on Russian-language sites to move to Cyrillic links on websites. Maybe it is not completely compliant with Web standards, but local search engines as well Google support it, most browsers support it (all three browsers that I am using for testing - FF, Chrome and IE show slugs in Russian, not in encoded form). It is good for SEO and good for people to see links in their own language. Moreover, currently Russia has its own Russian-language top level domain zone and it is expected that most sites in that zone will use Cyrillic links. It means that sites using old transliterated tags will be less competitive on other equal conditions.

So, using transliteration is not an option.

I hope that it is possible to correct this from BE side. Maybe it is possible to do POST to page referring it by ID? Or encode page address like Firefox does?