プロジェクト

全般

プロフィール

Bug(バグ) #2659

コミュニティトピック詳細で退会メンバーのニックネームに「非SNSユーザー表示名設定」が反映されない

isao sano12年以上前に追加. 約12年前に更新.

ステータス:
Fixed(完了)
優先度:
Normal(通常)
担当者:
対象バージョン:
開始日:
2011-12-02
期日:
進捗率:

100%

3.6 で発生するか:
Yes (はい)
[QA]バグ通知済:
いいえ
3.8 で発生するか:
Unknown (未調査)
opCommunityTopicPlugin 絞込条件:

説明

概要

トピック詳細 (/communityTopic/xxxx )にて、トピックを立てたメンバーが退会した場合、ニックネームに「非SNSユーザー表示名設定」が反映されず、ニックネームが空欄になる

再現手順

1. SNS設定(/pc_backend.php/sns/config )にて、「非SNSユーザー表示名設定」を「(退会したメンバー)」に設定する
2. メンバーAがトピックを作成する
3. メンバーAが退会する
4. 別のメンバーで手順2 でつくったトピック (/communityTopic/xxx )を確認する
5. メンバーAのニックネームが「(退会したメンバー)」ではなく、非表示になっている

発生バージョン

OpenPNE3.7.0


関連するチケット

関連している opMessagePlugin - Bug(バグ) #2366: 新規の環境にも関わらず/messageに遷移するとFatal errorが発生する Fixed(完了) 2011-08-23

履歴

#1 Yuma Sakata12年以上前に更新

  • 3.6 で発生するかYes (はい) にセット
  • 3.4 で発生するかYes (はい) にセット

#2 Yuma Sakata12年以上前に更新

  • 3.4 で発生するかYes (はい) から No (いいえ) に変更

再現確認できました。

Environment (再現バージョン)

OpenPNE3.6.1

Way to repro (再現手順)

1. 管理画面SNS設定ページ(/pc_backend.php/sns/config)にて、「非SNSユーザー表示名設定」を「-」に設定する
2. メンバーAでコミュニティトピックを作成する
3. メンバーAを退会させる
4. 別のメンバーで手順2 でつくったトピック(/communityTopic/xx)を確認する
5. メンバーAのニックネームが「-」ではなく、「/member/」と表示される

Way to fix (修正内容)

コミュニティトピック詳細で退会メンバー名に「非SNSユーザー表示名設定」が反映されるように修正お願いします。

備考

コミュニティイベントでも同様の現象が確認できましたので修正お願いします。
3.4系ではSNS設定ページにて非SNSユーザー表示名設定項目がないため、再現確認不可です。

#3 Yuya Watanabe約12年前に更新

  • 対象バージョンOpenPNE 3.7.0 にセット

#4 Yuya Watanabe約12年前に更新

  • 題名サークルトピック詳細で退会メンバーのニックネームに「非SNSユーザー表示名設定」が反映されない から コミュニティトピック詳細で退会メンバーのニックネームに「非SNSユーザー表示名設定」が反映されない に変更
  • 説明 を更新 (diff)

#5 Yuya Watanabe約12年前に更新

  • プロジェクトOpenPNE 3 から opCommunityTopicPlugin に変更
  • 対象バージョン を削除 (OpenPNE 3.7.0)

#6 Yuya Watanabe約12年前に更新

  • 対象バージョン1.0.3 にセット
  • [QA]バグ通知済いいえ にセット

#7 Yuya Watanabe約12年前に更新

  • ステータスNew(新規) から Accepted(着手) に変更
  • 担当者Yuya Watanabe にセット

#8 Yuya Watanabe約12年前に更新

修正内容

PC版に関しては以下のように修正したが,携帯版の場合,そもそも退会者の部分が空白である状態であったため別の修正方針が必要であると思われる.

diff --git a/apps/pc_frontend/modules/communityEvent/templates/showSuccess.php b/apps/pc_frontend/modules/communityEvent/templates/showSuccess.php
index c681251..367a736 100644
--- a/apps/pc_frontend/modules/communityEvent/templates/showSuccess.php
+++ b/apps/pc_frontend/modules/communityEvent/templates/showSuccess.php
@@ -16,7 +16,7 @@ if (count($images))
 $body .= nl2br($communityEvent->getBody());

 $list = array(
-  'Writer'               => link_to($communityEvent->getMember()->getName(), 'member/profile?id='.$communityEvent->getMember()->getId()),
+  'Writer'               => op_link_to_member($communityEvent->getMember()),
   'Name'                 => $communityEvent->getName(),
   'Open date'            => op_format_date($communityEvent->getOpenDate(), 'D').($communityEvent->getOpenDate() ? ' '.$communityEvent->getOpenDateComment() : ''),
   'Area'                 => op_url_cmd($communityEvent->getArea()),
diff --git a/apps/pc_frontend/modules/communityEventComment/templates/_list.php b/apps/pc_frontend/modules/communityEventComment/templates/_list.php
index a5c064f..8c37d61 100644
--- a/apps/pc_frontend/modules/communityEventComment/templates/_list.php
+++ b/apps/pc_frontend/modules/communityEventComment/templates/_list.php
@@ -15,7 +15,7 @@
 <dd>
 <div class="title">
 <p class="heading"><strong><?php echo $comment->getNumber() ?></strong>:
-<?php if ($_member = $comment->getMember()) : ?> <?php echo link_to($_member->getName(), 'member/profile?id='.$_member->getId()) ?><?php endif; ?>
+<?php if ($_member = $comment->getMember()) : ?> <?php echo op_link_to_member($_member) ?><?php endif; ?>
 <?php if ($comment->isDeletable($sf_user->getMemberId())): ?>
  <?php echo link_to(__('Delete'), '@communityEvent_comment_delete_confirm?id='.$comment->getId()) ?>
 <?php endif; ?>
diff --git a/apps/pc_frontend/modules/communityTopic/templates/showSuccess.php b/apps/pc_frontend/modules/communityTopic/templates/showSuccess.php
index 180be8a..9d8f00c 100644
--- a/apps/pc_frontend/modules/communityTopic/templates/showSuccess.php
+++ b/apps/pc_frontend/modules/communityTopic/templates/showSuccess.php
@@ -12,7 +12,7 @@
 <p><?php echo $communityTopic->getName() ?></p>
 </div>
 <div class="name">
-<p><?php if ($_member = $communityTopic->getMember()) : ?><?php echo link_to($_member->getName(), 'member/profile?id='.$_member->getId()) ?><?php endif; ?></p>
+<p><?php if ($_member = $communityTopic->getMember()) : ?><?php echo op_link_to_member($_member) ?><?php endif; ?></p>^M
 </div>
 <div class="body">
 <?php if (count($images = $communityTopic->getImages()) != 0): ?>
diff --git a/apps/pc_frontend/modules/communityTopicComment/templates/_list.php b/apps/pc_frontend/modules/communityTopicComment/templates/_list.php
index f7a5ddf..e2a1f88 100644
--- a/apps/pc_frontend/modules/communityTopicComment/templates/_list.php
+++ b/apps/pc_frontend/modules/communityTopicComment/templates/_list.php
@@ -14,7 +14,7 @@
 <dd>
 <div class="title">
 <p class="heading"><strong><?php echo $comment->getNumber() ?></strong>:
-<?php if ($_member = $comment->getMember()) : ?> <?php echo link_to($_member->getName(), 'member/profile?id='.$_member->getId()) ?><?php endif; ?>
+<?php if ($_member = $comment->getMember()) : ?> <?php echo op_link_to_member($_member) ?><?php endif; ?>^M
 <?php if ($comment->isDeletable($sf_user->getMemberId())): ?>
  <?php echo link_to(__('Delete'), '@communityTopic_comment_delete_confirm?id='.$comment->getId()) ?>
 <?php endif; ?>

#9 Yuya Watanabe約12年前に更新

携帯版で退会者の名前が表示されなかった問題の原因

携帯版では下記URL先のように修正され,表示しない実装になっていた.

https://trac.openpne.jp/ticket/4167 「携帯版のトピック・イベントの親記事、コメント一覧で退会したメンバーのニックネームがURLになっている」

今回の修正で用いている op_link_to_member() は #840 のチケットで実装されていて,これは 3.5.2 からとなっている.

そのため, 今回の対応として https://trac.openpne.jp/ticket/4167 の修正内容を削除することで解決できると思われる.

別の問題について

本チケットを修正していて気づいたが,携帯版でイベントとトピックでコメントのリンク削除の位置が違う.

#10 Yuya Watanabe約12年前に更新

note-8 と note-9 の修正方法を用いると 対象バージョンが OpenPNE 3.6 以上でなければならなくなり, plugins.openpne.jp などでサポートとしている 3.4 が動かなくなるという点に注意しなければならないため,修正内容を検討する必要がある.

とりあえず下記に携帯版の修正内容を示す.

diff --git a/apps/mobile_frontend/modules/communityEvent/templates/showSuccess.php b/apps/mobile_frontend/modules/communityEvent/templates/showSuccess.php
index d766776..e254170 100644
--- a/apps/mobile_frontend/modules/communityEvent/templates/showSuccess.php
+++ b/apps/mobile_frontend/modules/communityEvent/templates/showSuccess.php
@@ -3,18 +3,13 @@
 <?php echo op_within_page_link() ?>
 <?php
 $list = array(
-  'Writer'               => link_to($communityEvent->getMember()->getName(), 'member/profile?id='.$communityEvent->getMember()->getId()),
+  'Writer'               => op_link_to_member($communityEvent->getMember()),
   'Open date'            => op_format_date($communityEvent->getOpenDate(), 'D').($communityEvent->getOpenDate() ? ' '.$communityEvent->getOpenDateComment() : ''),
   'Area'                 => $communityEvent->getArea(),
   'Capacity'             => $communityEvent->getCapacity() ? $communityEvent->getCapacity() : __('Limitless'),
   'Count of Member'      => __('%1% persons', array('%1%' => $communityEvent->countCommunityEventMembers())),
 );

-if (!$communityEvent->getMember() || !$communityEvent->getMember()->getName())
-{
-  $list['Writer'] = '';
-}
-
 if ($communityEvent->countCommunityEventMembers())
 {
   $list['Count of Member'] .= '<br>'.link_to(__('See Member List'), '@communityEvent_memberList?id='.$communityEvent->getId());
diff --git a/apps/mobile_frontend/modules/communityEventComment/templates/_comment.php b/apps/mobile_frontend/modules/communityEventComment/templates/_comment.php
index fd01c4c..cca5798 100644
--- a/apps/mobile_frontend/modules/communityEventComment/templates/_comment.php
+++ b/apps/mobile_frontend/modules/communityEventComment/templates/_comment.php
@@ -1,9 +1,7 @@
 <?php $comment->state(Doctrine_RECORD::STATE_CLEAN); ?>
 <?php echo op_within_page_link() ?>
 [<?php printf('%03d', $comment->getNumber()) ?>]<?php echo op_format_date($comment->getCreatedAt(), 'MM/dd HH:mm') ?><br>
-<?php if ($comment->getMember() && $comment->getMember()->getName()): ?>
-<?php echo link_to($comment->getMember()->getName(), 'member/profile?id='.$comment->getMemberId()) ?>
-<?php endif; ?>
+<?php echo op_link_to_member($comment->getMember()) ?>
 <?php if ($comment->isDeletable($sf_user->getMemberId())): ?>
 &nbsp;[<?php echo link_to(__('Delete'), '@communityEvent_comment_delete_confirm?id='.$comment->getId()) ?>]
 <?php endif; ?><br>
diff --git a/apps/mobile_frontend/modules/communityTopic/templates/showSuccess.php b/apps/mobile_frontend/modules/communityTopic/templates/showSuccess.php
index 2066c59..8bc3283 100644
--- a/apps/mobile_frontend/modules/communityTopic/templates/showSuccess.php
+++ b/apps/mobile_frontend/modules/communityTopic/templates/showSuccess.php
@@ -5,9 +5,7 @@
 <?php echo op_format_date($communityTopic->getCreatedAt(), 'MM/dd HH:mm') ?>
 <?php if ($communityTopic->getMemberId() === $sf_user->getMemberId()): ?>
 <?php endif; ?><br>
-<?php if ($communityTopic->getMember() && $communityTopic->getMember()->getName()): ?>
-<?php echo link_to($communityTopic->getMember()->getName(), 'member/profile?id='.$communityTopic->getMember()->getId()) ?>
-<?php endif; ?>
+<?php echo op_link_to_member($communityTopic->getMember()) ?>^M
 <?php if ($communityTopic->isEditable($sf_user->getMemberId())): ?>
 &nbsp;[<?php echo link_to(__('Edit'), '@communityTopic_edit?id='.$communityTopic->getId()) ?>]
 <?php endif ?>
diff --git a/apps/mobile_frontend/modules/communityTopicComment/templates/_comment.php b/apps/mobile_frontend/modules/communityTopicComment/templates/_comment.php
index a6250a8..9822d12 100644
--- a/apps/mobile_frontend/modules/communityTopicComment/templates/_comment.php
+++ b/apps/mobile_frontend/modules/communityTopicComment/templates/_comment.php
@@ -4,9 +4,7 @@
 <?php if ($comment->isDeletable($sf_user->getMemberId())): ?>
 &nbsp;[<?php echo link_to(__('Delete'), '@communityTopic_comment_delete_confirm?id='.$comment->getId()) ?>]
 <?php endif; ?><br>
-<?php if ($comment->getMember() && $comment->getMember()->getName()): ?>
-<?php echo link_to($comment->getMember()->getName(), 'member/profile?id='.$comment->getMemberId()) ?><br>
-<?php endif; ?>
+<?php echo op_link_to_member($comment->getMember()) ?><br>^M
 <?php echo nl2br($comment->getBody()) ?>

 <?php if (count($comment->getImages())): ?>

#11 Yuya Watanabe約12年前に更新

  • ステータスAccepted(着手) から Pending Fixing(修正待ち) に変更

修正方法を検討するまでステータスを「Pending Fixing」にしておきます.

#12 Minoru Takai約12年前に更新

note-10 の懸念について opMessagePlugin で対応しているので参考までに示しておきます。 https://redmine.openpne.jp/issues/2366

#13 Yuya Watanabe約12年前に更新

  • ステータスPending Fixing(修正待ち) から Accepted(着手) に変更

note-12 で提示された opMesssagePlugin と同様の対処を行います.
op_community_topic_link_to_member()ヘルパ を作成し,このヘルパの中で OpenPNE のバージョン差異を吸収する方針とします.

#15 Kousuke Ebihara約12年前に更新

  • ステータスPending Review(レビュー待ち) から Pending Testing(テスト待ち) に変更
  • 進捗率50 から 70 に変更

#16 isao sano約12年前に更新

テスト完了致しました。
問題ありませんのでこのチケットをFixed(完了)に致します。

#17 isao sano約12年前に更新

  • ステータスPending Testing(テスト待ち) から Fixed(完了) に変更
  • 進捗率70 から 100 に変更

他の形式にエクスポート: Atom PDF