×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Comment RSS Shows wrong articles

Comment RSS Shows wrong articles 7 years 10 months ago #8125

  • Information Madness
  • Information Madness's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 26
  • Thank you received: 0
I am using JoComment 4.0 beta1 version. Everything works fine except when I click on a particular article's comments feed, it gives me wrong article.

Please check out my website is informationmadness.com/cms

Thank you.

Comment RSS Shows wrong articles 7 years 10 months ago #8134

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
I think, that I know what causes the problem.
Go to adminstrator/components/com_comment/plugin/com_content/josc_com_content.class.php
at around line 73 find:
$rss->useCached("RSS2.0", JPATH_SITE. DS .'components'.DS. 'com_comment'.DS.'joscfeed.xml');
make it
//$rss->useCached("RSS2.0", JPATH_SITE. DS .'components'.DS. 'com_comment'.DS.'joscfeed.xml');

Tell me if it works.

Comment RSS Shows wrong articles 7 years 10 months ago #8138

  • Information Madness
  • Information Madness's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 26
  • Thank you received: 0
hey Daniel,
I couldn't find that line of code anywhere in that class. Is there any other class that I should be looking into?

Comment RSS Shows wrong articles 7 years 10 months ago #8141

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
Ah, you are using beta1.
Could you look for this line in components/com_comment/comment.php - I think it was placed there.

Comment RSS Shows wrong articles 7 years 10 months ago #8143

  • Information Madness
  • Information Madness's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 26
  • Thank you received: 0
great.. that solved the problem. Now just one more question.. When I look at the latest comments module, it does have SEF URLs but when I go to manage comments from Admin.. it doesn't show SEF URLS and same thing for comments RSS... Do you have any idea about that? Please check out my site

Comment RSS Shows wrong articles 7 years 10 months ago #8144

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
Why do you need sef urls in Backend? Sef urls are generally turned off for everything in the backend.

Comment RSS Shows wrong articles 7 years 10 months ago #8145

  • Information Madness
  • Information Madness's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 26
  • Thank you received: 0
was just wondering if its only me or that's the way it is.

thanks for your help.

Comment RSS Shows wrong articles 7 years 10 months ago #8146

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
Keep in mind that backend urls are not important for your website users. They are there only for you.

I will be happy if you write a review extensions.joomla.org/extensions/contact...ticles-comments/4389 or make a small donation :)

Comment RSS Shows wrong articles 7 years 8 months ago #8974

  • Chong Kai Xiong
  • Chong Kai Xiong's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
I fixed this problem by adding the content ID to the cache file name. This nicely preserves the caching.

The attached patch below contains this fix for 4.0.0RC1. Additionally, the cache directory has been changed to cache/com_comment/feeds, in line with the Joomla directory layout.

Patch notes:

1. Apply the patch to /administrator/components/com_comment/plugin/com_content/josc_com_content.class.php

2. You have to manually create the directory cache/com_comment/feeds

3. As the patch generates 1 cache file for each article, you can end up with a lot of files in the cache directory.

My hope is that this could be incorporated into the next release :) feed_cache.txt

Comment RSS Shows wrong articles 7 years 8 months ago #8976

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 154
  • Thank you received: 1081
Yep, I've changed this in joomlacomment 4.1 :) and also started doing this for all further plugins.

I was thinking to save the rss files in the media directory? What do you think about this?

Comment RSS Shows wrong articles 7 years 7 months ago #9185

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
I have tested this well enough and think we should include it in RC2 if that's OK Daniel, this is a very good code improvement!

EDIT: On second thought, no it's best we leave 4.0 as it is - we don't want to introduce yet another bug. The only issue I have with RSS in 4.0 is that they are still in reverse order :P (the oldest is first, i.e. ASC by date, this is the opposite of RSS standard).

I think it would be best to leave it in the cache/ dir instead of media/ because it is a cached-RSS output after all ;) Just seems more logical to me. Plus it makes site maintenance much easier (i.e. clearing caches will refresh RSS feeds).

Comment RSS Shows wrong articles 7 years 7 months ago #9208

  • Chong Kai Xiong
  • Chong Kai Xiong's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
Yes, putting cache files in cache/ can greatly simplify site maintenance due to the centralisation. To JonusC's cache clearing example, I would like to add backing up and file integrity checks.

You could also have a specially optimised filesystem (e.g. ramfs/ramdisk) for the cache directory. All data stored within, whether they are module data or JoomlaComment's feeds, would automatically receive a performance boost when read.

At some point in the future, we might also consider porting the feed cache to the JCache API, and this would put the files there anyway if users choose the file storage backend.

JonusC: In my own installations, I've actually hacked the query to sort the comments latest first. Now if I remember rightly, the current code sorts by ID ASC. Changing it to sort by DATE should also increase its reliability to get posts in chronological order.
  • Page:
  • 1
Time to create page: 0.090 seconds