Opened 14 years ago
Closed 14 years ago
#3106 closed defect (fixed)
ログイン前だとバナーのリンクが機能しない
Reported by: | imamura623 | Owned by: | nagasawa |
---|---|---|---|
Priority: | minor | Milestone: | OpenPNE2.12.9 |
Component: | 指定しない | Version: | 2.12.x & 2.14.x |
Keywords: | OpenPNE2.13.7 | Cc: |
Description (last modified by )
■現象
バナーに関連付けられたURLに遷移しない。
■原因
ログインしていない状態でセキュアな画面にアクセスしているため、
正常なURLに遷移しない。
■修正内容
$before_afterの値で条件分岐し ログイン前とログイン後で別のアクションを指定する必要がある。
- ログイン前⇒do_o_click_banner
- ログイン後⇒do_h_click_banner
({if $before_after == "after"}) <a href="({t_url m=pc a=do_h_click_banner})&target_c_banner_id=({$INC_FOOTER_inc_side_banner.c_banner_id})&sessid=({$PHPSESSID})" target="_blank"> ({else}) <a href="({t_url m=pc a=do_o_click_banner})&target_c_banner_id=({$INC_FOOTER_inc_side_banner.c_banner_id})" target="_blank"> ({/if}) <img src="({t_img_url filename=$INC_FOOTER_inc_side_banner.image_filename})" alt="({$INC_FOOTER_inc_side_banner.nickname})" /></a>
ポータルのプレビュー画面はサイドバー・フッターをログイン前として表示する必要がある。
管理画面でログインした状態なので、ログイン前の情報で上書きするなどの対処が必要。
■関連情報
http://sns.openpne.jp/?m=pc&a=page_c_topic_detail&target_c_commu_topic_id=4119
Change History (35)
comment:1 Changed 14 years ago by
Keywords: | 再現待ち removed |
---|---|
Version: | → 2.12.x & 2.13.x |
comment:2 Changed 14 years ago by
Keywords: | OpenPNE2.13.7 added |
---|---|
Milestone: | → OpenPNE2.12.7 |
comment:3 Changed 14 years ago by
Milestone: | OpenPNE2.12.7 → OpenPNE2.12.9 |
---|
comment:6 Changed 14 years ago by
Summary: | ログイン画面のサイドバナーのリンク不備 → ログイン前だとバナーのリンクが機能しない |
---|
comment:7 Changed 14 years ago by
Keywords: | 差し戻し added; 確認中 removed |
---|
以下の点について修正してください。
- トップバナーにも同様の問題があると思います
- webapp_biz/modules/pc/templates/common/layout.tpl が修正されていません
- ログイン前かログイン後かの判定には $before_after を使った方がいいかもしれません
comment:9 Changed 14 years ago by
Keywords: | 差し戻し added; 確認中 removed |
---|
- 1ファイルしか修正されていません(トップバナーは他のファイルも修正必要)
- trunk しか修正されていません
- チケットの担当者が nobody のままです
comment:10 Changed 14 years ago by
Owner: | changed from nobody to kiwa |
---|---|
Status: | new → assigned |
修正やります。
comment:11 Changed 14 years ago by
Keywords: | 確認中 added; 差し戻し removed |
---|
comment:12 Changed 14 years ago by
Keywords: | 差し戻し added; 確認中 removed |
---|
portal_page_user_top, portal_page_preview では pc モジュールの init.inc を利用することでテンプレート変数 $before_after のアサインをおこなっていますが、この $before_after の値は現在実行中のアクションクラスの isSecure() メソッドの返り値に依存します。
portal_page_user_top の場合は isSecure() が false を返し、 $before_after の値が想定通りの "before" となりますが、 portal_page_preview は isSecure() が true を返すために $before_after の値が "after" となってしまいます。そのため、管理者が SNS にログインしていない状態で portal_page_preview のバナーをクリックした場合、正常に遷移をおこなうことができません。
portal モジュールの場合はほとんどログイン前として扱われるのが望ましいため、以下のどちらかのアプローチで修正する必要があると思います。
- portal モジュール内では常にログイン前バナーを表示する
- portal モジュールの init.inc で、 pc モジュールの init.inc を読み込んだ後、アサインされた $before_after の値を強制的に "before" に上書きする
comment:13 Changed 14 years ago by
Owner: | changed from kiwa to nagasawa |
---|---|
Status: | assigned → new |
修正します。
comment:14 Changed 14 years ago by
Keywords: | 確認中 added; 差し戻し removed |
---|
comment:16 Changed 14 years ago by
Keywords: | 確認中 added; 差し戻し removed |
---|
comment:17 Changed 14 years ago by
Keywords: | テスト待ち added; 確認中 removed |
---|
comment:18 follow-up: 22 Changed 14 years ago by
Keywords: | 差し戻し added; テスト待ち removed |
---|
portal_page_previewのサイドバナーにログイン前バナーが表示されません。{$INC_FOOTER_inc_side_banner}に値が入っていないです。
comment:19 Changed 14 years ago by
Keywords: | 確認中 added; 差し戻し removed |
---|
comment:20 Changed 14 years ago by
Keywords: | 差し戻し added; 確認中 removed |
---|
comment:21 Changed 14 years ago by
Keywords: | 確認中 added; 差し戻し removed |
---|
comment:22 Changed 14 years ago by
Keywords: | 差し戻し added; 確認中 removed |
---|
comment:18 は、ログイン後のバナー画像(任意HTMLは対象外)が反映されてしまう問題を含んでいます。
サイドバナーに関しては comment:21 で修正されていますが、同様の問題がフッターのHTML挿入にもあります。プレビューページでログイン後のフッターが表示されてしまいます(INC_FOOTER_inc_page_footer)
それと、チケットのDescriptionの書式を修正してください。
comment:23 Changed 14 years ago by
Keywords: | 確認中 added; 差し戻し removed |
---|---|
Milestone: | OpenPNE2.12.9 → OpenPNE2.13.3 |
comment:24 Changed 14 years ago by
Milestone: | OpenPNE2.13.3 → OpenPNE2.12.9 |
---|
comment:25 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:26 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:27 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:28 Changed 14 years ago by
Keywords: | 差し戻し added; 確認中 removed |
---|
comment:11 以前の修正に対する指摘です。
- 以下の2ファイルの差分を極力減らしてください。サイドバナー部分の記述がかなり違っています
- webapp/modules/portal/templates/user_top.tpl
- webapp/modules/portal/templates/preview.tpl
- 以下の2ファイルの差分を極力減らしてください。BIZの方にはログイン前のページはないかもしれませんが、今回の修正も入れて合わせておいた方がよいと思います
- webapp/modules/pc/templates/common/layout.tpl
- webapp_biz/modules/pc/templates/common/layout.tpl
comment:29 Changed 14 years ago by
Keywords: | 確認中 added; 差し戻し removed |
---|
comment:30 Changed 14 years ago by
Keywords: | 差し戻し added; 確認中 removed |
---|
webapp/modules/pc/templates/common/layout.tpl に newschedule と todolist は入れないでください。差異を極力減らすといっても webapp_biz のみにあるものを webapp に入れるのは好ましくないです。
comment:31 Changed 14 years ago by
Keywords: | 確認中 added; 差し戻し removed |
---|
comment:32 Changed 14 years ago by
Keywords: | 差し戻し added; 確認中 removed |
---|
空行の連続は必要ないので削除してください。
また指摘が漏れていましたが、以下のテンプレート内でインデントにハードタブと半角スペースが混在しているのでどちらかに統一してください。
- webapp/modules/pc/templates/common/layout.tpl
- webapp_biz/modules/biz/templates/common/layout.tpl
comment:33 Changed 14 years ago by
Keywords: | 確認中 added; 差し戻し removed |
---|
comment:35 Changed 14 years ago by
Keywords: | テスト待ち removed |
---|---|
Resolution: | → fixed |
Status: | new → closed |
確認しました。問題ありません。
動作テスト中に別の現象を発見しましたが、範囲外のため別のチケットにします。→ #3759
修正案が入っているのでキーワード外しますね。