From 27de9a83a5b13c4a8831063fb608ad802a65428b Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 18 Jul 2020 21:36:05 +0200 Subject: [PATCH] Removed the fallback for empty description on title field.Improved the createUser method to allow custom methodd registerUser to create a user. Fixed the empty not_required field issue. --- README.md | 4 +- admin/README.txt | 4 +- admin/helpers/compiler/c_Fields.php | 4 -- admin/helpers/compiler/e_Interpretation.php | 58 +++++++++++-------- admin/models/admin_view.php | 2 +- admin/models/class_method.php | 2 +- admin/models/class_property.php | 2 +- admin/models/custom_code.php | 2 +- admin/models/dynamic_get.php | 2 +- admin/models/field.php | 2 +- admin/models/fieldtype.php | 2 +- admin/models/forms/custom_code.xml | 1 - .../joomla_module_files_folders_urls.xml | 1 - admin/models/forms/joomla_module_updates.xml | 1 - .../joomla_plugin_files_folders_urls.xml | 1 - admin/models/forms/joomla_plugin_updates.xml | 1 - admin/models/forms/language_translation.xml | 3 +- admin/models/help_document.php | 2 +- admin/models/joomla_component.php | 2 +- admin/models/joomla_module.php | 2 +- admin/models/joomla_plugin.php | 2 +- admin/models/library.php | 2 +- admin/models/server.php | 2 +- componentbuilder.xml | 2 +- 24 files changed, 54 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index c687a1110..c588f8c3f 100644 --- a/README.md +++ b/README.md @@ -144,11 +144,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 13th July, 2020 ++ *Last Build*: 16th July, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **282699** ++ *Line count*: **282693** + *Field count*: **1525** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/README.txt b/admin/README.txt index c687a1110..c588f8c3f 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -144,11 +144,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 13th July, 2020 ++ *Last Build*: 16th July, 2020 + *Version*: 2.11.2 + *Copyright*: Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **282699** ++ *Line count*: **282693** + *Field count*: **1525** + *File count*: **1785** + *Folder count*: **295** diff --git a/admin/helpers/compiler/c_Fields.php b/admin/helpers/compiler/c_Fields.php index 4f82d27e8..ed834cccf 100644 --- a/admin/helpers/compiler/c_Fields.php +++ b/admin/helpers/compiler/c_Fields.php @@ -4141,10 +4141,6 @@ class Fields extends Structure { $xmlValue = 'JGLOBAL_TITLE'; } - elseif ($property['name'] === 'description') - { - $xmlValue = 'JFIELD_TITLE_DESC'; - } } // only load value if found or is mandatory if (ComponentbuilderHelper::checkString($xmlValue) diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index b6f3f68b6..8c6214ed0 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -1853,7 +1853,7 @@ class Interpretation extends Fields $method[] = $this->_t(1) . " * @param array \$credentials Array('name' => string, 'username' => string, 'email' => string, 'password' => string, 'password2' => string)"; $method[] = $this->_t(1) . " * @param int \$autologin"; $method[] = $this->_t(1) . " * @param array \$params Array('useractivation' => int, 'sendpassword' => int, 'allowUserRegistration' => int)"; - $method[] = $this->_t(1) . " * @param array \$mode 1 = Site Registrations; 0 = Admin Registration"; + $method[] = $this->_t(1) . " * @param array \$mode 1 = Site Registrations; 0 = Admin Registration; 2 = Custom Helper Method Called registerUser"; $method[] = $this->_t(1) . " *"; $method[] = $this->_t(1) . " * @return int|Error User ID on success, or an error."; $method[] = $this->_t(1) . " */"; @@ -1864,6 +1864,23 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "), \$mode = 1"; $method[] = $this->_t(1) . ")"; $method[] = $this->_t(1) . "{"; + $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) + . " Override mode"; + $method[] = $this->_t(2) . "if (\$mode == 2 && method_exists(__CLASS__, 'registerUser'))"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Update params"; + $method[] = $this->_t(3) . "\$params['autologin'] = \$autologin;"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Now Register User"; + $method[] = $this->_t(3) . "return self::registerUser(\$credentials, \$params);"; + $method[] = $this->_t(2) . "}"; + $method[] = $this->_t(2) . "elseif (\$mode == 2)"; + $method[] = $this->_t(2) . "{"; + $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) + . " Fallback to Site Registrations"; + $method[] = $this->_t(3) . "\$mode = 1;"; + $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " load the user component language files if there is an error."; $method[] = $this->_t(2) . "\$lang = JFactory::getLanguage();"; @@ -1882,7 +1899,7 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Load the user site-registration model"; $method[] = $this->_t(3) - . "\$model = self::getModel('registration', JPATH_ROOT. '/components/com_users', 'Users');"; + . "\$model = self::getModel('registration', \$base_dir . '/components/' . \$extension, 'Users');"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "else //" . $this->setLine(__LINE__) . " 0 = Admin Registration"; @@ -1890,7 +1907,7 @@ class Interpretation extends Fields $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Load the backend-user model"; $method[] = $this->_t(3) - . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/com_users', 'Users');"; + . "\$model = self::getModel('user', JPATH_ADMINISTRATOR . '/components/' . \$extension, 'Users');"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check if we have params/config"; @@ -1904,7 +1921,7 @@ class Interpretation extends Fields $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " If you know of a better path, let me know"; $method[] = $this->_t(4) - ."\$params[\$param] = self::setParams('com_users', \$param, \$set);"; + ."\$params[\$param] = self::setParams(\$extension, \$param, \$set);"; $method[] = $this->_t(3) . "}"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) @@ -1938,7 +1955,7 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Check if password was set"; $method[] = $this->_t(2) - . "if (\$mode = 1 && (!isset(\$credentials['password']) || !isset(\$credentials['password2']) || !self::checkString(\$credentials['password']) || !self::checkString(\$credentials['password2'])))"; + . "if (\$mode == 1 && (!isset(\$credentials['password']) || !isset(\$credentials['password2']) || !self::checkString(\$credentials['password']) || !self::checkString(\$credentials['password2'])))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " Set random password when empty password was submitted,"; @@ -1953,11 +1970,13 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "if (isset(\$credentials['password']) && isset(\$credentials['password2']) && self::checkString(\$credentials['password']) && self::checkString(\$credentials['password2']))"; $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) . "if (\$mode = 1)"; + $method[] = $this->_t(3) . "if (\$mode == 1) //". $this->setLine(__LINE__) + . " 1 = Site-registration mode"; $method[] = $this->_t(3) . "{"; $method[] = $this->_t(4) . "\$data['password1'] = \$credentials['password'];"; $method[] = $this->_t(3) . "}"; - $method[] = $this->_t(3) . "else"; + $method[] = $this->_t(3) . "else //" . $this->setLine(__LINE__) + . " 0 = Admin-registration mode"; $method[] = $this->_t(3) . "{"; $method[] = $this->_t(4) . "\$data['password'] = \$credentials['password'];"; $method[] = $this->_t(3) . "}"; @@ -1973,16 +1992,14 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " Create the new user"; - $method[] = $this->_t(2) . "if (\$mode = 1)"; + $method[] = $this->_t(2) . "if (\$mode == 1) //". $this->setLine(__LINE__) + . " 1 = Site-registration mode"; $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Site-registration mode"; $method[] = $this->_t(3) . "\$userId = \$model->register(\$data);"; $method[] = $this->_t(2) . "}"; - $method[] = $this->_t(2) . "else"; + $method[] = $this->_t(2) . "else //" . $this->setLine(__LINE__) + . " 0 = Admin-registration mode"; $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) . "//" . $this->setLine(__LINE__) - . " Admin-registration mode"; $method[] = $this->_t(3) . "\$model->save(\$data);"; $method[] = $this->_t(3) . "\$userId = \$model->getState('user.id', 0);"; $method[] = $this->_t(2) . "}"; @@ -1999,7 +2016,7 @@ class Interpretation extends Fields $method[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " If you know of a better path, let me know"; $method[] = $this->_t(4) - ."self::setParams('com_users', \$param, \$set);"; + ."self::setParams(\$extension, \$param, \$set);"; $method[] = $this->_t(3) . "}"; $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "//" . $this->setLine(__LINE__) @@ -2086,17 +2103,12 @@ class Interpretation extends Fields $method[] = $this->_t(2) . "}"; $method[] = $this->_t(2) . "// set username"; $method[] = $this->_t(2) - . "if (isset(\$new['username']) && self::checkString(\$new['username']))"; + . "if (!isset(\$new['username']) || !self::checkString(\$new['username']))"; $method[] = $this->_t(2) . "{"; $method[] = $this->_t(3) - . "\$new['username'] = self::safeString(\$new['username']);"; + . "\$new['username'] = \$new['email'];"; $method[] = $this->_t(2) . "}"; - $method[] = $this->_t(2) . "else"; - $method[] = $this->_t(2) . "{"; - $method[] = $this->_t(3) - . "\$new['username'] = self::safeString(\$new['name']);"; - $method[] = $this->_t(2) . "}"; - $method[] = $this->_t(2) . "// linup update user data"; + $method[] = $this->_t(2) . "// lineup update user data"; $method[] = $this->_t(2) . "\$data = array("; $method[] = $this->_t(3) . "'id' => \$new['id'],"; $method[] = $this->_t(3) . "'username' => \$new['username'],"; @@ -16756,7 +16768,7 @@ class Interpretation extends Fields $fix .= PHP_EOL . $this->_t(1) . "{"; $fix .= PHP_EOL . $this->_t(2) . "//" . $this->setLine(__LINE__) . " check if the not_required field is set"; - $fix .= PHP_EOL . $this->_t(2) . "if (" . $Component + $fix .= PHP_EOL . $this->_t(2) . "if (isset(\$data['not_required']) && " . $Component . "Helper::checkString(\$data['not_required']))"; $fix .= PHP_EOL . $this->_t(2) . "{"; $fix .= PHP_EOL . $this->_t(3) diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index abddb2482..e2b24a9b5 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -984,7 +984,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/class_method.php b/admin/models/class_method.php index 0ec5d128d..2c799658a 100644 --- a/admin/models/class_method.php +++ b/admin/models/class_method.php @@ -526,7 +526,7 @@ class ComponentbuilderModelClass_method extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/class_property.php b/admin/models/class_property.php index a79d84a9b..a941e2352 100644 --- a/admin/models/class_property.php +++ b/admin/models/class_property.php @@ -517,7 +517,7 @@ class ComponentbuilderModelClass_property extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php index 52003c0e3..25522e5a4 100644 --- a/admin/models/custom_code.php +++ b/admin/models/custom_code.php @@ -519,7 +519,7 @@ class ComponentbuilderModelCustom_code extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php index 0eb24b6da..76cfb7d75 100644 --- a/admin/models/dynamic_get.php +++ b/admin/models/dynamic_get.php @@ -710,7 +710,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/field.php b/admin/models/field.php index b0ca2e38d..cef6417a5 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -603,7 +603,7 @@ class ComponentbuilderModelField extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index d129cd98b..c0e9c11ec 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -728,7 +728,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/forms/custom_code.xml b/admin/models/forms/custom_code.xml index 2d5d35ba3..382bae82a 100644 --- a/admin/models/forms/custom_code.xml +++ b/admin/models/forms/custom_code.xml @@ -90,7 +90,6 @@ type="component" name="component" label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL" - description="JFIELD_TITLE_DESC" class="list_class" multiple="false" default="0" diff --git a/admin/models/forms/joomla_module_files_folders_urls.xml b/admin/models/forms/joomla_module_files_folders_urls.xml index afe426e47..2d0424ce0 100644 --- a/admin/models/forms/joomla_module_files_folders_urls.xml +++ b/admin/models/forms/joomla_module_files_folders_urls.xml @@ -90,7 +90,6 @@ type="joomlamodules" name="joomla_module" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_FILES_FOLDERS_URLS_JOOMLA_MODULE_LABEL" - description="JFIELD_TITLE_DESC" class="list_class span12" multiple="false" default="0" diff --git a/admin/models/forms/joomla_module_updates.xml b/admin/models/forms/joomla_module_updates.xml index 27329bd60..052c03674 100644 --- a/admin/models/forms/joomla_module_updates.xml +++ b/admin/models/forms/joomla_module_updates.xml @@ -90,7 +90,6 @@ type="joomlamodules" name="joomla_module" label="COM_COMPONENTBUILDER_JOOMLA_MODULE_UPDATES_JOOMLA_MODULE_LABEL" - description="JFIELD_TITLE_DESC" class="list_class span12" multiple="false" default="0" diff --git a/admin/models/forms/joomla_plugin_files_folders_urls.xml b/admin/models/forms/joomla_plugin_files_folders_urls.xml index 3361dce7a..14aebad76 100644 --- a/admin/models/forms/joomla_plugin_files_folders_urls.xml +++ b/admin/models/forms/joomla_plugin_files_folders_urls.xml @@ -90,7 +90,6 @@ type="joomlaplugins" name="joomla_plugin" label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_FILES_FOLDERS_URLS_JOOMLA_PLUGIN_LABEL" - description="JFIELD_TITLE_DESC" class="list_class span12" multiple="false" default="0" diff --git a/admin/models/forms/joomla_plugin_updates.xml b/admin/models/forms/joomla_plugin_updates.xml index 0d8e6f710..e628d878e 100644 --- a/admin/models/forms/joomla_plugin_updates.xml +++ b/admin/models/forms/joomla_plugin_updates.xml @@ -90,7 +90,6 @@ type="joomlaplugins" name="joomla_plugin" label="COM_COMPONENTBUILDER_JOOMLA_PLUGIN_UPDATES_JOOMLA_PLUGIN_LABEL" - description="JFIELD_TITLE_DESC" class="list_class span12" multiple="false" default="0" diff --git a/admin/models/forms/language_translation.xml b/admin/models/forms/language_translation.xml index 1c565041c..c81ebf5c5 100644 --- a/admin/models/forms/language_translation.xml +++ b/admin/models/forms/language_translation.xml @@ -92,7 +92,6 @@ label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_LABEL" rows="4" cols="5" - description="JFIELD_TITLE_DESC" message="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_SOURCE_MESSAGE" class="text_area span12" filter="safehtml" @@ -150,7 +149,7 @@ cols="20" message="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_MESSAGE" class="text_area translation_text_area" - filter="SAFEHTML" + filter="RAW" hint="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_HINT" /> diff --git a/admin/models/help_document.php b/admin/models/help_document.php index 5edbacd75..ece45fb0a 100644 --- a/admin/models/help_document.php +++ b/admin/models/help_document.php @@ -415,7 +415,7 @@ class ComponentbuilderModelHelp_document extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index bdcc71305..ed27334ef 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -878,7 +878,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/joomla_module.php b/admin/models/joomla_module.php index 714c8f9a8..f1e1bc0b2 100644 --- a/admin/models/joomla_module.php +++ b/admin/models/joomla_module.php @@ -698,7 +698,7 @@ class ComponentbuilderModelJoomla_module extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/joomla_plugin.php b/admin/models/joomla_plugin.php index 64ca2553e..7819e6ca2 100644 --- a/admin/models/joomla_plugin.php +++ b/admin/models/joomla_plugin.php @@ -663,7 +663,7 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/library.php b/admin/models/library.php index e5f26141b..5df64cb1c 100644 --- a/admin/models/library.php +++ b/admin/models/library.php @@ -542,7 +542,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/admin/models/server.php b/admin/models/server.php index 7411bbbb8..0008b8c83 100644 --- a/admin/models/server.php +++ b/admin/models/server.php @@ -557,7 +557,7 @@ class ComponentbuilderModelServer extends JModelAdmin public function validate($form, $data, $group = null) { // check if the not_required field is set - if (ComponentbuilderHelper::checkString($data['not_required'])) + if (isset($data['not_required']) && ComponentbuilderHelper::checkString($data['not_required'])) { $requiredFields = (array) explode(',',(string) $data['not_required']); $requiredFields = array_unique($requiredFields); diff --git a/componentbuilder.xml b/componentbuilder.xml index 6cdfa2c07..68395744d 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 13th July, 2020 + 16th July, 2020 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com