feat(web-api): seo-блок для product/category get - #599
Open
Ibochkarev wants to merge 1 commit into
Open
Conversation
Headless SSR needs a stable title/canonical/og contract instead of guessing longtitle vs pagetitle and joining site_url by hand.
This was referenced Aug 18, 2026
Member
|
Влил #597 (facets) — этот PR теперь конфликтует с Хорошая новость: конфликт тривиальный, всего два файла и чистый union — обе стороны регистрируют свой сервис в одном месте: Нужны обе записи. Проверил локально: после union-резолва всё зелёное — smoke 90, PHPUnit 273. То есть после ребейза PR готов, вопросов по содержанию нет. Заметил, что ты добавляешь новое событие |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
В ответах
GET /api/v1/product/get/{id}иGET /api/v1/category/get/{id}появляется объектseoсtitle,description,canonical,robotsиog.{title,description,image,type}. Nuxt SSR может собрать<title>, meta description, canonical и базовый Open Graph без своей угадайки по полям ресурса.Плоские поля (
pagetitle,longtitle,description,uri,image/thumb) не меняются.product/list,category/listиcategory/treeполныйseoне отдают.Тип изменений
Связанные Issues
Closes #567
Как это было протестировано?
Локальный CI-гейт (без полной установки MODX/MySQL):
cd core/components/minishop3 php -l src/Services/Seo/PublicSeoBuilder.php php -l src/Services/Seo/PublicSeoService.php composer test:smoke composer ci:php composer stanphp -l(затронутые PHP)composer test:smokecomposer ci:phpcomposer stancomposer ci:php/composer test,npm run lint:ci,composer stan/ GitHub Actions CI)Конфигурация тестирования:
feat/issue-567-public-seo-blockотbetaСкриншоты (если применимо)
Не применимо (JSON API).
Чеклист
composer stan/ CI jobPHPStan)npm run lint:ciдля Vue) — Vue не трогалиДополнительные заметки
Правила derivation:
title← непустойlongtitle, иначеpagetitle.description← непустойdescription, иначеintrotext.canonicalиog.image— absolute URL изsite_urlконтекста (?context=илиcontext_keyресурса) + relative path.robotsдля уже публичных сущностей:index,follow.og.type:product/website.include_seo=0на get убирает ключseo. Default на get — включено.Опциональный хук
msOnGetPublicSeo: плагин патчит$modx->event->returnedValues['seo']. Патч толькоtitleзеркалится вog.title, пока плагин сам не задалog.title. Whitelist отбрасывает неизвестные ключи и не-скаляры. TV mapms3_public_seo_tv_mapв этот PR не входит.Событие появится в Manager после rebuild/upgrade пакета.
Follow-up: get по
uri/alias, multi-size og из галереи (#566),include_seoна list.