Skip to content

2.0: Upgrade News plugin admin/front for GP247 v2 compatibility

Choose a tag to compare

@gp247net gp247net released this 11 Jul 10:54
Admin (fatal error -> working): NewsCategoryController/NewsContentController
returned views extending gp247-core::layout and gp247-core::screen.list,
both physically removed in the AdminLTE-to-TailAdmin cutover. Ported both
screens to Livewire (ResourcePanel + HasMultilingualDescriptions, mirroring
GP247\Shop\Admin\Livewire\CategoryManager) with TailAdmin views. Legacy
route names kept identical (admin_news_category.*, admin_news_content.*)
since installed sites already have AdminMenu rows pointing at them. Removed
the now-dead legacy controllers and their now-unused custom validators.

Front (unstyled -> styled): views extended block_main directly, discarding
GP247Front's container/breadcrumb/sidebar-block scaffolding, and used
Bootstrap-era classes with no matching compiled Tailwind CSS. Switched to
block_main_content_center (mirroring screen/shop_item_list.blade.php) and
common/item_single.blade.php (already compiled); the previously-used
common/item_single_long.blade.php was itself dead code from the removed
template. news_detail gains a title heading using the same rich-content
wrapper classes as shop_product_detail's description tab.

Bump gp247.json to version 2.0.0 / requireCore 2.0 to reflect the migration.

Verified end-to-end: installed on a dev DB, all 9 routes register correctly,
all 3 front pages return 200 with expected content, admin routes redirect
to login cleanly (no more fatal 500), no exceptions logged.