generated from MokoConsulting/Template-Joomla
WIP: refactor(insight): rename element com_mokosuitesight → com_mokosuiteinsight + SHORT menu constant + install migration (#13) #16
Reference in New Issue
Block a user
Delete Branch "fix/rename-com-mokosuiteinsight"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
⚠ BREAKING — component ELEMENT rename. Review + STAGING-TEST before release.
Renames the component element
com_mokosuitesight→com_mokosuiteinsight(repo/product is MokoSuiteInsight; the element was missing the "in"), adds the missing admin.sys.ini+_SHORTmenu constant, and ships an idempotent install migration so existing sites don't end up with a duplicate/orphaned extension.Resolves #13 (which also covered the
COM_..._SHORTshort-name ask — superseded here; no separate_SHORT_NAMEduplicate issue exists).Token changes (component-owned files)
com_mokosuitesightcom_mokosuiteinsight<file>+ 5 webservices option refsMoko\Component\MokoSuiteSight(MokoSuiteSight)…MokoSuiteInsightnamespacedecls + manifest<namespace>COM_MOKOSUITESIGHTCOM_MOKOSUITEINSIGHT<menu>(now_SHORT) + new sys.iniResidual legacy tokens in component-owned files: 0 functional. The only
com_mokosuitesight/#__mokosuitesightstrings left insource/script.phpare the migration's deliberate references to the OLD names (it has to find them to reconcile).php -lclean.Files created / renamed / modified
git mv): wholesource/packages/com_mokosuitesight/**→com_mokosuiteinsight/**(14 files) incl. manifestmokosuitesight.xml→mokosuiteinsight.xml.com_mokosuiteinsight/admin/language/en-GB/com_mokosuiteinsight.sys.ini—COM_MOKOSUITEINSIGHT="MokoSuite Insight",COM_MOKOSUITEINSIGHT_SHORT="Insight",COM_MOKOSUITEINSIGHT_XML_DESCRIPTION="…". Wired via<languages folder="admin/language">in<administration>;<menu>nowCOM_MOKOSUITEINSIGHT_SHORT.source/pkg_mokosuitesight.xml(component<file>id/zip →com_mokosuiteinsight),source/script.php(+migration),plg_webservices_.../src/Extension/MokoSuiteInsight.php(API routecomponentoption →com_mokosuiteinsight).Migration (
source/script.php→Pkg_MokoSuiteInsightInstallerScript::postflight)migrateLegacyInsightElement()— idempotent, fail-open, strict no-op on fresh installs (returns immediately if no legacycom_mokosuitesightrow):#__extensions— if both legacy + fresh rows exist (upgrade): keep the fresh row, port legacyparams/enabledwhen fresh is still default, delete the legacy orphan; else rename legacy element in place.#__menu—REPLACE(link, 'option=com_mokosuitesight','option=com_mokosuiteinsight')+component_idrepoint to the fresh extension id.#__assets— renamenamecom_mokosuitesight→com_mokosuiteinsight, clash-guarded.Explicitly EXCLUDED (and why)
#__mokosuitesight_*data-table rename — those tables are created (plg_system_.../sql/*) and queried only byplg_system_mokosuitesight, which is not renamed here. Renaming them now would break the still-old plugin. Deferred to the plugin-rename follow-up. (No componentsql/updatesRENAME TABLE added, for the same reason — it would be authoritative for tables the component doesn't own.)plg_system_mokosuitesight,plg_webservices_mokosuitesightelement/folder/namespace renames and thepkg_mokosuitesightpackage element — sibling extensions, out of scope for #13, no separate rename issue exists yet. Only the component cross-references inside the webservices plugin were updated (content-only) so the API still points at the renamed component. Thev1/mokosuitesight/...public API URL prefixes were left as-is (plugin-owned API contract).Manual verification checklist (staging)
com_mokosuiteinsight.com_mokosuitesight) → exactly one component row remains (com_mokosuiteinsight), no duplicate/orphan in Extensions manager.#__assetsrenamed, no clash).#__mokosuitesight_*and plugin still functional (table rename intentionally deferred).Follow-up needed (human decision)
Track a sibling issue to rename
plg_system_mokosuitesight/plg_webservices_mokosuitesight/pkg_mokosuitesight+ the#__mokosuitesight_*tables (with matching migration) to fully unify the stem — analogous to the ERP repo's separate plugin-rename issue.https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.