Content type adapters (K2, VirtueMart, HikaShop) are dead code #36

Open
opened 2026-05-31 01:18:58 +00:00 by jmiller · 1 comment
Owner

Problem

Three content type adapters exist in src/packages/com_mokoog/src/ContentType/:

  • K2Adapter
  • VirtueMartAdapter
  • HikaShopAdapter

Plus a ContentTypeInterface. However, the system plugin (MokoOG::findImage() and MokoOG::loadOgData()) only handles com_content natively. The adapters are never instantiated or called anywhere.

Similarly, the content plugin only supports com_content.article, com_menus.item, and com_categories.categorycom_content - not K2, VirtueMart, or HikaShop.

Impact

The adapters are dead code. Users with K2, VirtueMart, or HikaShop get no OG tag support despite the adapters being fully implemented.

Acceptance Criteria

  • System plugin loads and iterates registered adapters for non-com_content pages
  • Adapters provide title, description, and image for auto-generation fallback
  • Content plugin supports K2/VM/HikaShop edit forms (or document as future scope)
  • Adapter registration is extensible (e.g., via plugin parameter or DI)

Files

  • src/packages/plg_system_mokoog/src/Extension/MokoOG.php
  • src/packages/plg_content_mokoog/src/Extension/MokoOGContent.php
  • src/packages/com_mokoog/src/ContentType/*.php
## Problem Three content type adapters exist in `src/packages/com_mokoog/src/ContentType/`: - `K2Adapter` - `VirtueMartAdapter` - `HikaShopAdapter` Plus a `ContentTypeInterface`. However, the system plugin (`MokoOG::findImage()` and `MokoOG::loadOgData()`) only handles `com_content` natively. The adapters are never instantiated or called anywhere. Similarly, the content plugin only supports `com_content.article`, `com_menus.item`, and `com_categories.categorycom_content` - not K2, VirtueMart, or HikaShop. ## Impact The adapters are dead code. Users with K2, VirtueMart, or HikaShop get no OG tag support despite the adapters being fully implemented. ## Acceptance Criteria - [ ] System plugin loads and iterates registered adapters for non-com_content pages - [ ] Adapters provide title, description, and image for auto-generation fallback - [ ] Content plugin supports K2/VM/HikaShop edit forms (or document as future scope) - [ ] Adapter registration is extensible (e.g., via plugin parameter or DI) ## Files - `src/packages/plg_system_mokoog/src/Extension/MokoOG.php` - `src/packages/plg_content_mokoog/src/Extension/MokoOGContent.php` - `src/packages/com_mokoog/src/ContentType/*.php`
jmiller added the enhancementpriority: mediumbug labels 2026-05-31 01:18:58 +00:00
Author
Owner

Branch created: feature/36-content-type-adapters-k2-virtuemart-hika

git fetch origin
git checkout feature/36-content-type-adapters-k2-virtuemart-hika
Branch created: [`feature/36-content-type-adapters-k2-virtuemart-hika`](https://git.mokoconsulting.tech/MokoConsulting/MokoJoomOpenGraph/src/branch/feature/36-content-type-adapters-k2-virtuemart-hika) ```bash git fetch origin git checkout feature/36-content-type-adapters-k2-virtuemart-hika ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomOpenGraph#36