diff --git a/CHANGELOG.md b/CHANGELOG.md index 405fb15bc..822bb617a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v4.0.0-beta2 + +- Add view list and single name fix. +- Add component code name fix. +- Add reset list of powers. + # v4.0.0-beta1 - Add the compiler menu back. diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index 63e44ff64..3343c7290 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -3139,7 +3139,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
<?php echo JText::_('Text'); ?>
<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
+COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo Text::_('Text'); ?>
<?php echo Text::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details."
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
@@ -6388,7 +6388,7 @@ COM_COMPONENTBUILDER_JOOMLA_MODULE_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_JOOMLA_MODULE_NEW="A New Joomla Module"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NO="No"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NONE="None"
-COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>
<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
+COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo Text::_('Text'); ?>
<?php echo Text::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_DESCRIPTION="All libraries added to modules are added to the component media folder for now
So over here you are able to manually add HTML code to your model default tmpl.
" COM_COMPONENTBUILDER_JOOMLA_MODULE_NOTE_LIBRARIES_OPTIONS_LABEL="Libraries Options" @@ -7232,7 +7232,7 @@ COM_COMPONENTBUILDER_LAYOUT_NAME_LABEL="Name" COM_COMPONENTBUILDER_LAYOUT_NAME_MESSAGE="Error! Please add name here." COM_COMPONENTBUILDER_LAYOUT_NEW="A New Layout" COM_COMPONENTBUILDER_LAYOUT_NO="No" -COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>
<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
+COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo Text::_('Text'); ?>
<?php echo Text::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
COM_COMPONENTBUILDER_LAYOUT_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details."
COM_COMPONENTBUILDER_LAYOUT_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
@@ -7804,7 +7804,6 @@ COM_COMPONENTBUILDER_PLACES_ACROSS_JCB_WHERE_THIS_S_IS_LINKED="Places across JCB
COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S="Please add files to (%s)"
COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders to (%s)"
COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATER="Please check again later"
-COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_SOON_ANDOR_FOLLOW_THE_PROGRESS_ON_SGITVDMDEVA="Please check again soon! and/or follow the progress on %sgit.vdm.dev."
COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST="Please first make a selection from the list."
COM_COMPONENTBUILDER_PLEASE_NOTE_THAT_THIS_PACKAGE_BHAS_NOB_CHECKSUM_VALIDATION="Please note that this package has no checksum validation!"
COM_COMPONENTBUILDER_PLEASE_SELECT_A_COMPONENT_THAT_YOU_WOULD_LIKE_TO_COMPILE="Please select a component that you would like to compile."
@@ -8497,7 +8496,7 @@ COM_COMPONENTBUILDER_SITE_VIEW_NEW_TAB_2="New Tab 2"
COM_COMPONENTBUILDER_SITE_VIEW_NEXT="Next"
COM_COMPONENTBUILDER_SITE_VIEW_NO="No"
COM_COMPONENTBUILDER_SITE_VIEW_NONE="None"
-COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>
<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
+COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo Text::_('Text'); ?>
<?php echo Text::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_CUSTOM_TOOLBAR_PLACEHOLDER_DESCRIPTION="Use this placeholder in the body [[[SITE_TOOLBAR]]]
to add the custom position of the toolbar."
COM_COMPONENTBUILDER_SITE_VIEW_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details."
@@ -8995,7 +8994,7 @@ COM_COMPONENTBUILDER_TEMPLATE_NAME_LABEL="Name"
COM_COMPONENTBUILDER_TEMPLATE_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_TEMPLATE_NEW="A New Template"
COM_COMPONENTBUILDER_TEMPLATE_NO="No"
-COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo JText::_('Text'); ?>
<?php echo JText::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
+COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_DESCRIPTION="<?php echo Text::_('Text'); ?>
<?php echo Text::sprintf('Hello %s', $this->user->name); ?>
<?php echo JustTEXT::_('Text'); ?>
"
COM_COMPONENTBUILDER_TEMPLATE_NOTE_ADD_PHP_LANGUAGE_STRING_LABEL="Add PHP Language String"
COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_DESCRIPTION="All libraries you select will dynamically be added to the header of the page according to the settings of the selected library. Each library will also get its respective buttons added to the component global options if it has any set. Please take a look at the libraries for more details."
COM_COMPONENTBUILDER_TEMPLATE_NOTE_LIBRARIES_SELECTION_LABEL="Select libraries you would like to use in your code"
@@ -9031,6 +9030,7 @@ COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE
COM_COMPONENTBUILDER_THESE_ARE_THE_SAME_PACKAGES_FOUND_ON_A_S_GITHUBA_AND_CAN_BE_IMPORTED_BY_SIMPLY_MAKING_A_SELECTION_AND_THEN_CLICKING_THE_BGET_PACKAGEB_BUTTONBR_SOME_OF_THESE_PACKAGES_WOULD_REQUIRE_A_KEY_SINCE_THEY_ARE_NOT_FREE_A_S_GET_A_KEY_TODAYA="These are the same packages found on gitHub and can be imported by simply making a selection and then clicking the [Get Package] button.<?php echo JText::sprintf('Hello %s', $this->user->name); ?><\\/code>
\\r\\nJust get UPPERCASE language string:<\\/b>
\\r\\n<?php echo JustTEXT::_('Text'); ?><\\/code>\\\"\\n\\theading=\\\"h4\\\"\\n\\/>\"', 1, '2015-06-03 15:23:13', '2022-02-02 13:35:21', 15, '', 539, 'edaac8c1-d2df-4e51-9d48-e1d7259984a3', '', '', '', '', ''),
+(561, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Note - Add PHP Language String', 'NOT NULL', '', 14, '\"<?php echo Text::_('Text'); ?><\\/code>
\\r\\n<?php echo Text::sprintf('Hello %s', $this->user->name); ?><\\/code>
\\r\\nJust get UPPERCASE language string:<\\/b>
\\r\\n<?php echo JustTEXT::_('Text'); ?><\\/code>\\\"\\n\\theading=\\\"h4\\\"\\n\\/>\"', 1, '2015-06-03 15:23:13', '2024-04-08 07:54:26', 16, '', 539, 'edaac8c1-d2df-4e51-9d48-e1d7259984a3', '', '', '', '', ''),
(562, '', '', '', '', '', '', '', '', '', '', 'MEDIUMTEXT', '', '', '', 'PHP (helper_site)', 'NOT NULL', 2, 8, '\" \"', 1, '2015-06-07 22:39:33', '2019-07-08 14:14:42', 4, '', 540, 'f4134f92-7dc5-4729-9a16-bfaa51de27f9', '', '', '', '', ''),
(563, '', '', '', '', '', '', '', '', 1, '', 'TINYINT', 2, '', '', 'Add PHP (helper_site Class)', 'NOT NULL', '', 17, '\" \"', 1, '2015-06-07 22:39:54', '2015-08-25 21:15:22', 2, '', 548, 'ff624860-89db-4465-97f1-962bf09dcc9f', '', '', '', '', ''),
(564, '', '', '', '', '', '', '', '', 11, '', 'TINYINT', 2, '', '', 'Site Menu', 'NOT NULL', '', 3, '\" \"', 1, '2015-06-09 19:58:37', '2019-06-11 12:15:59', 3, '', 549, '5ad1beb3-ad4c-4704-a1fd-be7045e3478a', '', '', '', '', ''),
@@ -4769,7 +4769,7 @@ INSERT INTO `#__componentbuilder_field` (`id`, `add_css_view`, `add_css_views`,
(2581, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'PHP Dashboard Note', 'NOT NULL', '', 14, '\" use the public function getMethodName()<\\/b> to insure the data is set to the view,
Note the convention public function get...()<\\/b> replace the ... with the unique method name.\\\"\\n\\/>\"', 1, '2019-07-09 15:37:53', '2019-07-09 15:40:26', 2, '', 939, 'ac1e8e4e-74f5-4e5d-9d26-de73e2b4dd85', '', '', '', '', ''),
(2582, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Plugin Note', 'NOT NULL', '', 14, '\"So over here you are able to manually code your plugin methods which usually will be the event name you are targeting.<\\/p>We have also added some methods via the boilerplate repo<\\/a> that can serve as a starting point, simple select them and it will be added to your code.<\\/p>If you have added any fields in the Config\\/Params tab, these fields will be available to you in the $this->params<\\/code> object, and can be accessed via the field name $this->params->get(\'fieldname\');<\\/code> with the get method.<\\/p>\\\"\\n\\theading=\\\"h4\\\"\\n\\tclass=\\\"alert alert-info\\\"\\n\\/>\"', 1, '2019-07-10 10:45:56', '2019-07-10 11:04:59', 3, '', 940, '9f50213b-07b5-4147-a24c-f3d390498c6c', '', '', '', '', ''),
(2583, '', '', '', '', '', '', '', '', 64, '', 'VARCHAR', '', '', '', 'Extension Type', 'NOT NULL', '', 11, '\" \"', 1, '2019-07-10 19:45:26', '2021-08-10 11:54:35', 4, '', 856, '7e059ab7-d79b-4218-9488-6f38d85d17a0', '', '', '', '', ''),
-(2584, '', '', '', '', '', '', '', '', 11, '', 'INT', 2, '', '', 'Class Property (plugins)', 'NOT NULL', '', 6, '\" \"', 1, '2019-07-10 19:59:30', '2019-07-15 00:26:37', 9, '', 937, '9fff86dc-3fbb-4001-9dc0-c2b89164b00c', '', '', '', '', ''),
+(2584, '', '', '', '', '', '', '', '', 11, '', 'INT', 2, '', '', 'Class Property (plugins)', 'NOT NULL', '', 6, '\" \"', 1, '2019-07-10 19:59:30', '2024-04-09 11:17:54', 10, '', 937, '9fff86dc-3fbb-4001-9dc0-c2b89164b00c', '', '', '', '', ''),
(2585, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Property Selection', 'NOT NULL', '', 35, '\" \"', 1, '2019-07-10 22:18:17', '2021-09-05 09:44:54', 4, '', 938, 'cc01a6b1-7f18-4452-bfa6-4d64fc595a49', '', '', '', '', ''),
(2586, '', '', '', '', '', '', '', '', '', '', 'TEXT', '', '', '', 'Default (property value)', 'NOT NULL', 2, 25, '\" \"', 1, '2019-07-12 23:05:12', '2021-08-10 12:05:06', 6, '', 390, '73ef5c00-c8c5-4cb7-9f69-6aed98346818', '', '', '', '', ''),
(2587, '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Beta Stage', 'NOT NULL', '', 14, '\" \"', 1, '2019-07-13 23:26:13', '0000-00-00 00:00:00', 1, '', 941, 'c352c5af-833a-4368-bd13-0ccb3a2f3e88', '', '', '', '', ''),
diff --git a/admin/sql/updates/mysql/4.0.0-beta1.sql b/admin/sql/updates/mysql/4.0.0-beta1.sql
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/admin/sql/updates/mysql/4.0.0-beta1.sql
@@ -0,0 +1 @@
+
diff --git a/admin/src/Controller/PowersController.php b/admin/src/Controller/PowersController.php
index 937633ec7..bc1ee39a2 100644
--- a/admin/src/Controller/PowersController.php
+++ b/admin/src/Controller/PowersController.php
@@ -19,6 +19,7 @@ use Joomla\CMS\Session\Session;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Componentbuilder\Power\Factory as PowerFactory;
+use VDM\Joomla\Utilities\GetHelper;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -145,7 +146,7 @@ class PowersController extends AdminController
ArrayHelper::toInteger($pks);
// check if there is any selections
- if ($pks == [])
+ if ($pks === [])
{
// set error message
$message = ''.Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED').'
';
@@ -156,21 +157,39 @@ class PowersController extends AdminController
return false;
}
+ $status = 'error';
+ $success = false;
+
// check if user has the right
$user = Factory::getUser();
if($user->authorise('power.reset', 'com_componentbuilder'))
{
- // set success message
- $message = ''.Text::_('COM_COMPONENTBUILDER_THIS_RESET_FEATURE_IS_STILL_UNDER_DEVELOPMENT').'
';
- $message .= ''.Text::sprintf('COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_SOON_ANDOR_FOLLOW_THE_PROGRESS_ON_SGITVDMDEVA', '').'
';
+ $guids = GetHelper::vars('power', $pks, 'id', 'guid');
+
+ if (PowerFactory::_('Superpower')->reset($guids))
+ {
+ // set success message
+ $message = ''.Text::_('COM_COMPONENTBUILDER_SUCCESS').'
';
+ $message .= ''.Text::_('COM_COMPONENTBUILDER_THESE_POWERS_HAVE_SUCCESSFULLY_BEEN_RESET').'
';
+ $status = 'success';
+ $success = true;
+ }
+ else
+ {
+ $message = '' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '
';
+ $message .= '' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_POWERS_HAS_FAILED') . '
';
+ }
+
// set redirect
- $redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false);
- $this->setRedirect($redirect_url, $message);
- return true;
+ $redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', $success);
+ $this->setRedirect($redirect_url, $message, $status);
+
+ return $success;
}
+
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false);
$this->setRedirect($redirect_url);
- return false;
+ return $success;
}
}
\ No newline at end of file
diff --git a/admin/src/Field/PluginsclassmethodsField.php b/admin/src/Field/PluginsclassmethodsField.php
index 90416ed25..6e800a796 100644
--- a/admin/src/Field/PluginsclassmethodsField.php
+++ b/admin/src/Field/PluginsclassmethodsField.php
@@ -65,12 +65,17 @@ class PluginsclassmethodsField extends ListField
}
$db->setQuery((string)$query);
$items = $db->loadObjectList();
- $options = array();
+ $options = [];
if ($items)
{
$options[] = Html::_('select.option', '', 'Select a method');
foreach($items as $item)
{
+ if (!isset($item->visibility))
+ {
+ continue;
+ }
+
// we are using this code in more then one field JCB custom_code
if ('method' === 'method')
{
@@ -80,6 +85,7 @@ class PluginsclassmethodsField extends ListField
{
$select = $item->visibility . ' $' . $item->method_name;
}
+
$options[] = Html::_('select.option', $item->id, $select);
}
}
diff --git a/admin/src/Field/PluginsclasspropertiesField.php b/admin/src/Field/PluginsclasspropertiesField.php
index 8d87c0861..7dac6e05f 100644
--- a/admin/src/Field/PluginsclasspropertiesField.php
+++ b/admin/src/Field/PluginsclasspropertiesField.php
@@ -65,12 +65,17 @@ class PluginsclasspropertiesField extends ListField
}
$db->setQuery((string)$query);
$items = $db->loadObjectList();
- $options = array();
+ $options = [];
if ($items)
{
$options[] = Html::_('select.option', '', 'Select a property');
foreach($items as $item)
{
+ if (!isset($item->visibility))
+ {
+ continue;
+ }
+
// we are using this code in more then one field JCB custom_code
if ('method' === 'property')
{
@@ -80,6 +85,7 @@ class PluginsclasspropertiesField extends ListField
{
$select = $item->visibility . ' $' . $item->property_name;
}
+
$options[] = Html::_('select.option', $item->id, $select);
}
}
diff --git a/admin/src/Field/PowersclassmethodsField.php b/admin/src/Field/PowersclassmethodsField.php
index f1c6b90f4..790b11647 100644
--- a/admin/src/Field/PowersclassmethodsField.php
+++ b/admin/src/Field/PowersclassmethodsField.php
@@ -65,12 +65,17 @@ class PowersclassmethodsField extends ListField
}
$db->setQuery((string)$query);
$items = $db->loadObjectList();
- $options = array();
+ $options = [];
if ($items)
{
$options[] = Html::_('select.option', '', 'Select a method');
foreach($items as $item)
{
+ if (!isset($item->visibility))
+ {
+ continue;
+ }
+
// we are using this code in more then one field JCB custom_code
if ('method' === 'method')
{
@@ -80,6 +85,7 @@ class PowersclassmethodsField extends ListField
{
$select = $item->visibility . ' $' . $item->method_name;
}
+
$options[] = Html::_('select.option', $item->id, $select);
}
}
diff --git a/admin/src/Field/PowersclasspropertiesField.php b/admin/src/Field/PowersclasspropertiesField.php
index ae1639b5c..ffeee5374 100644
--- a/admin/src/Field/PowersclasspropertiesField.php
+++ b/admin/src/Field/PowersclasspropertiesField.php
@@ -65,12 +65,17 @@ class PowersclasspropertiesField extends ListField
}
$db->setQuery((string)$query);
$items = $db->loadObjectList();
- $options = array();
+ $options = [];
if ($items)
{
$options[] = Html::_('select.option', '', 'Select a property');
foreach($items as $item)
{
+ if (!isset($item->visibility))
+ {
+ continue;
+ }
+
// we are using this code in more then one field JCB custom_code
if ('method' === 'property')
{
@@ -80,6 +85,7 @@ class PowersclasspropertiesField extends ListField
{
$select = $item->visibility . ' $' . $item->property_name;
}
+
$options[] = Html::_('select.option', $item->id, $select);
}
}
diff --git a/admin/src/Model/Admin_viewModel.php b/admin/src/Model/Admin_viewModel.php
index f198cda10..778e88d72 100644
--- a/admin/src/Model/Admin_viewModel.php
+++ b/admin/src/Model/Admin_viewModel.php
@@ -1529,6 +1529,12 @@ class Admin_viewModel extends AdminModel
{
$data['system_name'] = $data['name_single'];
}
+
+ // validate that the list and single view name are not the same
+ if ($data['name_single'] === $data['name_list'])
+ {
+ $data['name_list'] .= '_s';
+ }
// Set the GUID if empty or not valid
if (empty($data['guid']) && $data['id'] > 0)
diff --git a/admin/src/Model/Joomla_componentModel.php b/admin/src/Model/Joomla_componentModel.php
index 64eb421e3..ab72351f2 100644
--- a/admin/src/Model/Joomla_componentModel.php
+++ b/admin/src/Model/Joomla_componentModel.php
@@ -34,6 +34,7 @@ use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\FOF\Encrypt\AES;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
+use VDM\Joomla\Utilities\String\ComponentCodeNameHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Componentbuilder\Extrusion\Helper\Extrusion;
@@ -1460,6 +1461,9 @@ class Joomla_componentModel extends AdminModel
{
$data['system_name'] = $data['name'];
}
+
+ // make sure that the component code name is safe.
+ $data['name_code'] = ComponentCodeNameHelper::safe($data['name_code']);
// Set the GUID if empty or not valid
if (empty($data['guid']) && $data['id'] > 0)
diff --git a/admin/tmpl/admin_view/default.php b/admin/tmpl/admin_view/default.php
index 61c330b70..9f29e94de 100644
--- a/admin/tmpl/admin_view/default.php
+++ b/admin/tmpl/admin_view/default.php
@@ -207,476 +207,491 @@ defined('_JEXEC') or die;