fix(core,basic): 검색 봇 화면 렌더러 패리티 결손 일괄 수정
일반 화면(React)과 봇 화면(PHP)은 같은 레이아웃을 각각 렌더하는데 봇 화면 쪽 지원 범위가 뒤처져, 확장이 교체한 본문이 통째로 빈 채 나갔다 (공개 이슈 ). 같은 결손 계열을 전수 조사해 함께 닫는다. - 확장 주입 props 를 렌더 진입 시점에 해석해 자손 전체에 상속 → 게시글·답글 원글·댓글·페이지·상품 설명 5개 지점 복구 - 사용자 작성 HTML 정화기 신설 — isHtml 판정에 따라 이스케이프/정화. 미정화 상태에서 봇 경로로 저장형 스크립트가 실제 실행됐다 - 노드 키 패리티: conditions / type:iterator / responsive 매칭 규칙 / children 문자열 / text 우선순위 / $t:defer / 레이아웃 초기 상태 - 표현식: 단일 바인딩 판정 교체, ||·&& 를 값 반환(JS 시맨틱)으로, 비교식이 raw 경로에서 null 이 되던 문제 - 데이터소스: 엔드포인트 표현식 전면 해석 + 레이아웃 8곳 선언 보강 - 봇 페이지 캐시 1회 전량 무효화 업그레이드 스텝 지원 범위 SSoT 표를 문서에 고정하고, 한쪽만 고치는 것을 막는 검사 룰과 레이아웃 전수 순회 테스트로 잠갔다.
This commit is contained in:
1 parent
b505ac7ba7
commit
0dfb45951b
34 files changed
+5244
-172
No files matched your search
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Tests\Feature\Seo;
|
||||
|
||||
use App\Seo\SeoMetaResolver;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
@@ -158,9 +160,14 @@ class SeoPageRenderingTest extends TestCase
|
||||
$this->assertArrayHasKey('priority', $seo, 'search/index.json seo에 priority 키가 존재해야 합니다');
|
||||
$this->assertLessThanOrEqual(0.5, $seo['priority'], '검색 페이지 SEO priority는 0.5 이하여야 합니다');
|
||||
|
||||
// data_sources 확인 (검색 결과는 SEO 데이터소스 불필요)
|
||||
// data_sources 확인 — 봇에게도 실제 검색 결과를 보여준다.
|
||||
// 종전에는 비워 두어 봇에게 빈 껍데기 페이지가 나갔다 (수집은 허용하면서 내용은 없는 상태).
|
||||
$this->assertArrayHasKey('data_sources', $seo, 'search/index.json seo에 data_sources 키가 존재해야 합니다');
|
||||
$this->assertEmpty($seo['data_sources'], '검색 페이지의 SEO data_sources는 비어있어야 합니다');
|
||||
$this->assertContains(
|
||||
'searchResults',
|
||||
$seo['data_sources'],
|
||||
'검색 페이지 SEO data_sources에 searchResults가 포함되어야 합니다 (미포함 시 봇에게 빈 결과 목록이 나갑니다)'
|
||||
);
|
||||
|
||||
// structured_data 확인 (SearchResultsPage)
|
||||
$this->assertArrayHasKey('structured_data', $seo, 'search/index.json seo에 structured_data 키가 존재해야 합니다');
|
||||
@@ -231,20 +238,20 @@ class SeoPageRenderingTest extends TestCase
|
||||
public function test_all_enabled_layouts_resolve_without_throw_under_multilingual_settings(): void
|
||||
{
|
||||
// 코어 설정을 다국어 JSON array 로 시뮬레이션 (운영자가 MultilingualInput 사용 시)
|
||||
\Illuminate\Support\Facades\Config::set('g7_settings.core.general.site_name', [
|
||||
Config::set('g7_settings.core.general.site_name', [
|
||||
'ko' => '한글몰', 'en' => 'KoreanMall',
|
||||
]);
|
||||
\Illuminate\Support\Facades\Config::set('g7_settings.core.seo.og_default_site_name', '');
|
||||
\Illuminate\Support\Facades\Config::set('g7_settings.core.seo.og_image_default_width', 1200);
|
||||
\Illuminate\Support\Facades\Config::set('g7_settings.core.seo.og_image_default_height', 630);
|
||||
\Illuminate\Support\Facades\Config::set('g7_settings.core.seo.twitter_default_card', 'summary_large_image');
|
||||
\Illuminate\Support\Facades\Config::set('g7_settings.core.seo.twitter_default_site', '');
|
||||
\Illuminate\Support\Facades\Config::set('g7_settings.core.seo.meta_title_suffix', '');
|
||||
\Illuminate\Support\Facades\Config::set('g7_settings.core.seo.meta_description', '');
|
||||
\Illuminate\Support\Facades\Config::set('g7_settings.core.seo.meta_keywords', '');
|
||||
Config::set('g7_settings.core.seo.og_default_site_name', '');
|
||||
Config::set('g7_settings.core.seo.og_image_default_width', 1200);
|
||||
Config::set('g7_settings.core.seo.og_image_default_height', 630);
|
||||
Config::set('g7_settings.core.seo.twitter_default_card', 'summary_large_image');
|
||||
Config::set('g7_settings.core.seo.twitter_default_site', '');
|
||||
Config::set('g7_settings.core.seo.meta_title_suffix', '');
|
||||
Config::set('g7_settings.core.seo.meta_description', '');
|
||||
Config::set('g7_settings.core.seo.meta_keywords', '');
|
||||
app()->setLocale('ko');
|
||||
|
||||
$resolver = app(\App\Seo\SeoMetaResolver::class);
|
||||
$resolver = app(SeoMetaResolver::class);
|
||||
$rii = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->layoutBasePath));
|
||||
|
||||
$errors = [];
|
||||
|
||||
Reference in new issue
Block a user