fix: quote fulltext column name, add path to menu sync
fulltext is a MySQL reserved word — must be backtick-quoted. Menu items require path column for Joomla routing. Authored-by: Moko Consulting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2286,9 +2286,11 @@ class MokoWaaS extends CMSPlugin implements BootableExtensionInterface
|
||||
case 'menus':
|
||||
foreach ($items as $item)
|
||||
{
|
||||
$alias = $item['alias'] ?? '';
|
||||
$record = (object) [
|
||||
'title' => $item['title'] ?? '',
|
||||
'alias' => $item['alias'] ?? '',
|
||||
'alias' => $alias,
|
||||
'path' => $item['path'] ?? $alias,
|
||||
'menutype' => $item['menutype'] ?? 'mainmenu',
|
||||
'type' => $item['type'] ?? 'component',
|
||||
'link' => $item['link'] ?? '',
|
||||
|
||||
@@ -210,7 +210,7 @@ final class ContentSync extends CMSPlugin implements SubscriberInterface
|
||||
{
|
||||
$db = Factory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select('title, alias, introtext, fulltext, state, catid, language, featured, metadesc, metakey, metadata, created, modified, publish_up, images, urls, attribs, access')
|
||||
->select($db->quoteName(['title', 'alias', 'introtext', 'fulltext', 'state', 'catid', 'language', 'featured', 'metadesc', 'metakey', 'metadata', 'created', 'modified', 'publish_up', 'images', 'urls', 'attribs', 'access']))
|
||||
->from($db->quoteName('#__content'))
|
||||
->where($db->quoteName('state') . ' >= 0');
|
||||
$db->setQuery($query);
|
||||
@@ -284,7 +284,7 @@ final class ContentSync extends CMSPlugin implements SubscriberInterface
|
||||
{
|
||||
$db = Factory::getDbo();
|
||||
$query = $db->getQuery(true)
|
||||
->select('title, alias, menutype, type, link, language, published, home, params, img, access')
|
||||
->select('title, alias, path, menutype, type, link, language, published, home, params, img, access')
|
||||
->from($db->quoteName('#__menu'))
|
||||
->where($db->quoteName('client_id') . ' = 0')
|
||||
->where($db->quoteName('id') . ' > 1')
|
||||
|
||||
Reference in New Issue
Block a user