Project

General

Profile

Actions

Bug(バグ) #2461

closed

携帯版プロフィール画面で「自己紹介」の項目名が表示されない

Added by Kiwa Sakai over 13 years ago. Updated over 9 years ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Assignee:
Target version:
Start date:
2011-10-03
Due date:
% Done:

100%

Estimated time:
3.6 で発生するか:
Unknown (未調査)
3.8 で発生するか:
Unknown (未調査)

Description

Overview (現象)

携帯版プロフィール画面 (/member/profile)にて、自己紹介の項目名が表示されない。


「よ ろ し く ね」という内容が表示されている項目が自己紹介。

現象確認バージョン

OpenPNE 3.6RC2
OpenPNE 3.7.0-dev (master)

Causes (原因)

下記部分においてフォームのタイプがtextareaかつpresetだった場合にcaptionの追加がなされていない.この条件に該当するものが「自己紹介」だけとなるため「自己紹介」のみが表示されない状態となっている.

apps/mobile_frontend/modules/member/templates/profileSuccess.php 59行目〜

 59   if ('textarea' === $profile->getFormType())
 60   {
 61     $value = op_auto_link_text_for_mobile((string)$profile);
 62   } 
 63   elseif ($profile->getProfile()->isPreset())
 64   { 
 65     $presetConfig = $profile->getProfile()->getPresetConfig();
 66     $caption = __($presetConfig['Caption']);
 67     if ('country_select' === $profile->getFormType())
 68     { 
 69       $value = __($culture->getCountry((string)$profile));
 70     } 
 71     elseif ('op_preset_birthday' === $profile->getName())
 72     { 
 73       $value = op_format_date((string)$profile, 'XShortDateJa');
 74     } 
 75     else
 76     {
 77       $value = __((string)$profile);
 78     }
 79   } 

Way to fix (修正内容)

diff --git a/apps/mobile_frontend/modules/member/templates/profileSuccess.php b/apps/mobile_frontend/modules/member/templates/profileSuccess.php
index 5f0d9c6..b018ffb 100644
--- a/apps/mobile_frontend/modules/member/templates/profileSuccess.php
+++ b/apps/mobile_frontend/modules/member/templates/profileSuccess.php
@@ -56,11 +56,7 @@ foreach ($member->getProfiles(true) as $profile)
     continue;
   }

-  if ('textarea' === $profile->getFormType())
-  {
-    $value = op_auto_link_text_for_mobile((string)$profile);
-  }
-  elseif ($profile->getProfile()->isPreset())
+  if ($profile->getProfile()->isPreset())
   {
     $presetConfig = $profile->getProfile()->getPresetConfig();
     $caption = __($presetConfig['Caption']);
@@ -78,6 +74,11 @@ foreach ($member->getProfiles(true) as $profile)
     }
   }

+  if ('textarea' === $profile->getFormType())
+  {
+    $value = op_auto_link_text_for_mobile($value);
+  }
+
   if ($member->getId() == $sf_user->getMemberId())
   {
     if ($profile->getPublicFlag() == ProfileTable::PUBLIC_FLAG_FRIEND)

Files


Related issues 2 (0 open2 closed)

Related to OpenPNE 3 - Backport(バックポート) #3099: 携帯版プロフィール画面で「自己紹介」の項目名が表示されないFixed(完了)開 石切山2011-10-03

Actions
Related to OpenPNE 3 - Backport(バックポート) #3214: 携帯版プロフィール画面で「自己紹介」の項目名が表示されないFixed(完了)Yuya Watanabe2011-10-03

Actions
Actions #1

Updated by Yuya Watanabe over 13 years ago

  • Description updated (diff)
  • Status changed from New(新規) to Accepted(着手)
  • Assignee set to Yuya Watanabe
  • Target version set to OpenPNE 3.7.0

原因

下記部分においてフォームのタイプがtextareaかつpresetだった場合にcaptionの追加がなされていない.この条件に該当するものが「自己紹介」だけとなるため「自己紹介」のみが表示されない状態となっている.

apps/mobile_frontend/modules/member/templates/profileSuccess.php 59行目〜

 59   if ('textarea' === $profile->getFormType())
 60   {
 61     $value = op_auto_link_text_for_mobile((string)$profile);
 62   } 
 63   elseif ($profile->getProfile()->isPreset())
 64   { 
 65     $presetConfig = $profile->getProfile()->getPresetConfig();
 66     $caption = __($presetConfig['Caption']);
 67     if ('country_select' === $profile->getFormType())
 68     { 
 69       $value = __($culture->getCountry((string)$profile));
 70     } 
 71     elseif ('op_preset_birthday' === $profile->getName())
 72     { 
 73       $value = op_format_date((string)$profile, 'XShortDateJa');
 74     } 
 75     else
 76     {
 77       $value = __((string)$profile);
 78     }
 79   } 

問題が発生した経緯

#1160の修正コミットとなる 1e9b885468 によりtextareaだった場合にpresetかつtextareaだった場合を考慮されなかった.

修正方針

textareaかつpresetである場合にもcaptionを表示するように修正する.

Actions #2

Updated by wa ta over 13 years ago

  • Status changed from Accepted(着手) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

更新履歴 d5d34afc79d157b88afba125631adbe97c4e11d3 で適用されました。

Actions #3

Updated by Yuya Watanabe over 13 years ago

  • Description updated (diff)
Actions #4

Updated by Kousuke Ebihara about 13 years ago

  • Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)
  • % Done changed from 50 to 70
Actions #5

Updated by Yuma Sakata about 13 years ago

  • Status changed from Pending Testing(テスト待ち) to Fixed(完了)
  • % Done changed from 70 to 100

テストOKです。

Actions #6

Updated by kaoru n over 9 years ago

  • 3.6 で発生するか set to Unknown (未調査)
  • 3.8 で発生するか set to Unknown (未調査)
Actions

Also available in: Atom PDF