-
Notifications
You must be signed in to change notification settings - Fork 141
【システム】 コンテンツコピー時に layout_template が引き継がれない #4337
Copy link
Copy link
Open
Description
概要
固定ページをコピーする際、コピー元の layout_template(レイアウトテンプレート)が空文字になってしまう。
baserCMS version : 5.2.x
事前準備
以下の内容で plugins/BcThemeSample/templates/layout/sample.php レイアウトテンプレートを作成する
<!DOCTYPE html>
<html>
<head>
<?php $this->BcBaser->charset() ?>
<?php $this->BcBaser->title() ?>
</head>
<body>
<?php $this->BcBaser->content() ?>
</body>
</html>※ 空のPHPでも問題なし
再現手順
- 管理画面にログインし、コンテンツ一覧(
/baser/admin/contents)を開く - 固定ページを新規作成し編集ページにアクセスする
- レイアウトテンプレートに事前準備で作成したレイアウトテンプレートを指定して保存する
- コンテンツ一覧(
/baser/admin/contents)に戻り、3. で作成した固定ページをコピーする - コピーした固定ページの編集画面にアクセスしレイアウトテンプレートが引き継がれてコピーされていないことを確認する
原因
copy() メソッド内で layout_tmplate というタイポが存在する(正しくは layout_template)。
コピー元エンティティのプロパティが存在しないため、?? 演算子により常に空文字 '' が設定される。
備考
下記のコピーメソッドにもタイポが存在する
- baser-coreのContentFoldersTable.php
- bc-content-linkのContentLinksTable.php
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels