ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Losing Comments when changing templates

November 04, 2011 4:47pm

Subscribe [1]
  • #1 / Nov 04, 2011 4:47pm

    tylerjames

    10 posts

    Hey Everyone. Here’s my issue. I recently did some rebranding and changed the structure of my site slightly. I went from displaying multiple excerpts to single entry posts. So I had a template called “blog” which contained the excepts and was my index and another called, “post” which managed the single entries. When I made the change, all I did was copied the “post” template and pasted it into my index template. Everything is working fine, except I can’t see my comments or facebook likes and such. With the fb likes, i understand it’s url based and the likes are being pinned to: http://site/post/post-title.html. And now the url has shifted to http://site/p1. I have no idea why i lost my comments though. They do reappear if I hardcode the url. Any help with this would be amazing!!

  • #2 / Nov 07, 2011 9:09am

    Sue Crocker

    26054 posts

    Hi, Tyler.

    One thing you may not realize about comments, is that they require a url_title in segment_3 in order to work. You’ll need to have some sort of way of identifying that particular url_title.

    Normally you have comments show like this:

    http://example.com/index.php/site/comments/bill-sarah-wedding where bill-sarah-wedding is the url title you want comments to show with. I understand that you are doing something different on your home page.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases