×

Notice

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

TOPIC: [Solved]Wrong link in the ContentItem in the backend (manage comments)

[Solved]Wrong link in the ContentItem in the backend (manage comments) 10 years 1 month ago #9865

  • zombla
  • zombla's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 22
  • Thank you received: 0
CompojoomComment 4.1.2
Hi Daniel
1 - When I click on the link in the ContentItem which is in the backend (manage comments), a 404 page displayed. and not the comment in question.
2 - The page appears in the same page instead of the backend (in parent), not in a new page.
Thank you

[Solved]Wrong link in the ContentItem in the backend (manage comments) 10 years 1 month ago #9867

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
hey Zombla,
I'm not sure I really understand the problems.

1. can you post the link that goes to 404? and also post the real url that the comment should lead to.

2. do you wish that the link open in new tab or what?

[Solved]Wrong link in the ContentItem in the backend (manage comments) 10 years 1 month ago #9868

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hi again,
I've tested it and you are right the link in backend is wrong.
To fix this go to administrator/components/com_comment/plugin/com_content/josc_com_content.class.php

public function linkToContent

you will see this
		if ($appl->scope == 'mod_comments' ||  $appl->scope == 'com_comment') {
			$mod_data = $this->getCatSecAliasMod($contentId);
			$this->_route_slug = '';
			$this->_route_catid = $mod_data->catid;
			$this->_route_sectionid = $mod_data->sectionid;
			$contentId = $contentId . ':' . $mod_data->alias;
		}

change it to this:
		$josctask = JOSC_utils::decodeData('josctask');
		if ($appl->scope == 'mod_comments' || $josctask  == 'ajax_search') {
			$mod_data = $this->getCatSecAliasMod($contentId);
			$this->_route_slug = '';
			$this->_route_catid = $mod_data->catid;
			$this->_route_sectionid = $mod_data->sectionid;
			$contentId = $contentId . ':' . $mod_data->alias;
		}

Please report if all links are looking fine.
Thank you!

[Solved]Wrong link in the ContentItem in the backend (manage comments) 10 years 1 month ago #9871

  • zombla
  • zombla's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 22
  • Thank you received: 0
Hi Daniel
=)
Now it works very fine

Daniel Dimitrov wrote: 2. do you wish that the link open in new tab or what?

Yes, exactly what I mean =)
Thank you

[Solved]Wrong link in the ContentItem in the backend (manage comments) 10 years 1 month ago #9874

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
go to administrator/com_comment/views/comments/tmpl/default.php
line 143
	<a href="<?php echo $comment->link ?>"><?php echo $comment->ctitle ?></a>
change it to
	<a href="<?php echo $comment->link ?>" target="_blank"><?php echo $comment->ctitle ?></a>

But actually if you are using firefox what is the problem to hold down the ctrl key and click on the link?
  • Page:
  • 1
Time to create page: 0.127 seconds