×

Notice

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

TOPIC: link to article wrong with sh404sef in mod_comments

link to article wrong with sh404sef in mod_comments 15 years 2 months ago #6546

  • Mario Medina
  • Mario Medina's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Hi! I have a problem with mod_comments. The link to article is not working if i have sh404sef. It redirects to ..../.html?...... instead of the right path to the article.

It seems that on line 194 of
/administrator/components/com_comment/plugin/com_content/josc_com_content.class.php
the contentId variable should only need to be numeric, without the alias. If i comment that line, like below, it works again.

function linkToContent($contentId, $commentId='', $joscclean=false, $admin=false, $dbg=false) {
$appl =& JFactory::getApplication();

if ($appl->scope == 'mod_comments') {
$mod_data = $this->getCatSecAliasMod($contentId);
$this->_route_catid = $mod_data->catid;
$this->_route_sectionid = $mod_data->sectionid;
//$contentId = $contentId . '-' . $mod_data->alias;
}

link to article wrong with sh404sef in mod_comments 15 years 2 months ago #6550

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
Aha - I suppose this bug only happens if "file suffix" in sh404SEF is blank. mod_comments assumes that it is set to html.

This is a little beyond my knowledge so we'll wait for Daniels' feedback on this - obviously there is a bug but I think we need a way to check sh404SEF "file suffix" option so the module generates correct links.

Thanks again Mario!

link to article wrong with sh404sef in mod_comments 15 years 2 months ago #6554

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
sh404SEF expect numeric value - that can be the reason why when I use it on localhost it crashes! Oh my god!

K, I will check this on Thursday and let you know how it goes.

link to article wrong with sh404sef in mod_comments 15 years 1 month ago #7135

  • ziko
  • ziko's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
hi, i have the same problem in my site. Does there any solution to solve this wrong link in the module mod_comments ?
thx

link to article wrong with sh404sef in mod_comments 15 years 1 month ago #7291

  • chalupa
  • chalupa's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I was having the same problem, but after I commented out that line, it seems to work. Thanks for the help!

link to article wrong with sh404sef in mod_comments 15 years 1 month ago #7293

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I remember that i've added the alias variable only because the module was not generating friendly URLs with joomla's default SEF system turned on. I will have to test it with 404sef. Thanks for the help guys!

link to article wrong with sh404sef in mod_comments 14 years 11 months ago #8154

  • garfy
  • garfy's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 12
  • Thank you received: 0
can you tell me exactly how to uncomment that line?

Do I need to delete it?

Do I need to delete this whole code?

function linkToContent($contentId, $commentId='', $joscclean=false, $admin=false, $dbg=false) {
$appl =& JFactory::getApplication();

if ($appl->scope == 'mod_comments') {
$mod_data = $this->getCatSecAliasMod($contentId);
$this->_route_catid = $mod_data->catid;
$this->_route_sectionid = $mod_data->sectionid;
//$contentId = $contentId . '-' . $mod_data->alias;
}

link to article wrong with sh404sef in mod_comments 14 years 11 months ago #8155

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
uncommenting is just placing // at the begining of the line.

So from:
$contentId = $contentId . '-' . $mod_data->alias;
it should become:
//$contentId = $contentId . '-' . $mod_data->alias;

link to article wrong with sh404sef in mod_comments 14 years 11 months ago #8202

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
to add the // at the beginning of a line is to "comment-out" the code, uncomment would be to remove the // comment marker :P

link to article wrong with sh404sef in mod_comments 14 years 11 months ago #8204

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
:blush: good point and you are absolutely right. I will think a little bit more next time :)

link to article wrong with sh404sef in mod_comments 14 years 11 months ago #8209

  • JonusC
  • JonusC's Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 785
  • Thank you received: 48
The fault is very forgivable - as I said before, your English is better than many Australians I know! I also think you are a little (un)lucky for getting a language major as a developer/helper for JoomlaComment :laugh:

link to article wrong with sh404sef in mod_comments 14 years 9 months ago #8523

  • Royal Trude
  • Royal Trude's Avatar
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 37
  • Thank you received: 0
always a good idea to search first, ask questions later -- I had this problem with content comments @ Kalamies.com but now fixed.

:thumbs-up-to-those-who-solved-this-smiley:

link to article wrong with sh404sef in mod_comments 14 years 6 months ago #9701

  • Robin Molnar
  • Robin Molnar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Well, this doesn't solve it for me because, either way, the links generated point towards http://domain/index.php/

Any suggestion?

Thanks

link to article wrong with sh404sef in mod_comments 14 years 6 months ago #9702

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
That is strange. Please check out how the new module is working for you Robin.

link to article wrong with sh404sef in mod_comments 14 years 6 months ago #9703

  • Robin Molnar
  • Robin Molnar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Thanks Daniel,

I will check it out and let you know of the outcome.

Robin

link to article wrong with sh404sef in mod_comments 14 years 6 months ago #9709

  • Robin Molnar
  • Robin Molnar's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
OK, it works with the new versions (component + module). I found, however, a new bug (I will post it o a new thread).

Thanks,
Robin
  • Page:
  • 1
Time to create page: 0.126 seconds