Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ブログ記事詳細画面で、オートリダイレクトが効かない #1237

Closed
fuchigam1 opened this issue Sep 10, 2019 · 2 comments
Closed
Assignees
Labels
Bug バグ

Comments

@fuchigam1
Copy link
Collaborator

概要

コンテンツとしてブログコンテンツが /news/ で存在する場合として、
サブサイトとして、スマートフォン用サイトをエイリアスを /s/ で作成しているとする。
サブサイト設定内の「デバイス・言語」項目内「メインサイトから自動的にリダイレクト」を有効化しているとき、とする

スマホで /news/archives/1 にアクセスすると、/s/ 側にリダイレクトしない。
期待するのは、/news/archives/1 にスマホでアクセス時、/s/news/archives/1 に遷移すること。

baserCMS version : 4.2.2

想定される原因のところ

/lib/Baser/Lib/BcSite.php::shouldRedirects() 内の existsUrl() による判定時、コンテンツの存在チェックを行っているが、ブログ記事の場合、コンテンツのURLではなく、存在判定のURLとして「/news/archives/1」($this->here)が利用されているため、コンテンツが存在しない=リダイレクトしない、となっている

@ryuring ryuring added the Bug バグ label Sep 10, 2019
@ryuring ryuring modified the milestone: 4.2.4 Sep 10, 2019
@ryuring
Copy link
Collaborator

ryuring commented Sep 10, 2019

@materializing 余力ありましたら調査お願いしますー

@ryuring
Copy link
Collaborator

ryuring commented Sep 24, 2019

@materializing
こちらのコミットで解決しました。
e8fe36d
10399e0

@ryuring ryuring closed this as completed Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug バグ
Projects
None yet
Development

No branches or pull requests

2 participants