In view of type comments, Comments edit link point to node view while it should point to edit comment link

Attached Image explain the problem.

Thanks

Comments

iamjon’s picture

StatusFileSize
new8.35 KB

Majdi,
Confirmed. Here is my export.

majdi’s picture

I test it with the export you attached , yes the problem exist

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new558 bytes

@iamjon

You created a node view, which fails on certain instances

Here is a patch to fix this issue in general

majdi’s picture

Patch in #3 working for me

iamjon’s picture

Status: Needs review » Reviewed & tested by the community

My bad.
Changing status based on #4

ericduran’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.66 KB

I'm coming over from #1069336: Wrong link provided for comment editing or deleting

This patch fixes the edit link and the delete link.

ericduran’s picture

Status: Needs review » Reviewed & tested by the community

Oops, the above patch is for 7.x not 6.x Sorry about that, anyways I'll leave it here so when the patch in #3 is fixed, we can just change this to patch to be ported.

metalinspired’s picture

Line added in views_handler_field_comment_link_edit.inc should be like:
$this->options['alter']['path'] = "comment/" . $comment->cid . "/edit";

ericduran’s picture

@metalinspired my patch is for 7.x not 6.x

metalinspired’s picture

@ericduran I am aware of that. Simply look at how delete path is structured and you will see why I made post correcting edit link.

dawehner’s picture

Just to be sure patch http://drupal.org/node/1037112#comment-4105702 is really enough for delete and edit link?

metalinspired’s picture

go to Find content, switch to Comments and look how Edit link is structured

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Patch in #3 committed to 3.x in D6 and D7 -- left Eric's patch because I'm confused about it. If the delete link needs to be fixed too, let's make as eparate issue.

metalinspired’s picture

StatusFileSize
new1.66 KB

Instead of trying to explain myself again here's modified patch from #6 :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

amitaibu’s picture

Status: Closed (fixed) » Needs review

Setting correct status.

Sborsody’s picture

StatusFileSize
new1.33 KB

This needs re-patching as #14 was missed. Here's a re-roll for 7.x-3.x.

Anonymous’s picture

#18 works for me. Thanks.

Anonymous’s picture

Not quite. The edit link now points to the right URL but still throws these notices:

Notice: Undefined property: stdClass::$status in comment_access() (line 1427 of /srv/www/.../public_html/modules/comment/comment.module).
Notice: Undefined property: stdClass::$comment_count in comment_node_page_additions() (line 724 of /srv/www/.../public_html/modules/comment/comment.module).
ericduran’s picture

Status: Needs review » Fixed

As mention by merlinofchaos we should "make as separate issue.". As this is getting complicated to follow.

The original issue is indeed fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tbeauchemin’s picture

[ Drupal 7.10 - Views 7.x-3.0 ]

I this issue supposed to be fixed ? Because the Edit and Delete link work for me in a view.
However, I get this error message when viewing the node:

Notice: Undefined property: stdClass::$status in comment_access() (line 1430 of /Applications/MAMP/htdocs/gts_management/modules/comment/comment.module).
Notice: Undefined property: stdClass::$status in comment_access() (line 1430 of /Applications/MAMP/htdocs/gts_management/modules/comment/comment.module).
Notice: Undefined property: stdClass::$status in comment_access() (line 1430 of /Applications/MAMP/htdocs/gts_management/modules/comment/comment.module).

Any Advice ?

duckzland’s picture

Version: 6.x-3.x-dev » 7.x-3.0

Same problem here D7 7.10 + views 3.0 + comment edit & delete & view link

Notice: Undefined property: stdClass::$status in comment_access() (line 1430 of D:\UniServer\www\commerce\modules\comment\comment.module).

jtse’s picture

[Drupal 7.10 - Views 7.x-3.0]
Same problem. I think this happened shortly after upgrading Views to 3.0.

donquixote’s picture