diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cce1ea43..1de514dd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ -# v4.0.3-alpha1 +# v4.0.3-alpha2 + +- Fix library save as copy error. #1162 +- Fix the error when no components exists. #1164 +- Fix search page error due to File class. + +# v4.0.3-alpha - Add push option to powers area diff --git a/ComponentbuilderInstallerScript.php b/ComponentbuilderInstallerScript.php index a6c4c791a..7f27e4514 100644 --- a/ComponentbuilderInstallerScript.php +++ b/ComponentbuilderInstallerScript.php @@ -3270,7 +3270,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface echo '
-

Upgrade to Version 4.0.3-alpha1 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 4.0.3-alpha2 Was Successful! Let us know if anything is not working as expected.

'; // Add/Update component in the action logs extensions table. $this->setActionLogsExtensions(); diff --git a/README.md b/README.md index f6d42c7f4..39ce7d3c9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.3-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.3-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 20th August, 2024 -+ *Version*: 4.0.3-alpha1 ++ *Last Build*: 21st August, 2024 ++ *Version*: 4.0.3-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **828072** ++ *Line count*: **828095** + *Field count*: **2098** -+ *File count*: **5739** ++ *File count*: **5740** + *Folder count*: **606** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index f6d42c7f4..39ce7d3c9 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.3-alpha1) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (4.0.3-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 20th August, 2024 -+ *Version*: 4.0.3-alpha1 ++ *Last Build*: 21st August, 2024 ++ *Version*: 4.0.3-alpha2 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **828072** ++ *Line count*: **828095** + *Field count*: **2098** -+ *File count*: **5739** ++ *File count*: **5740** + *Folder count*: **606** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). diff --git a/admin/sql/updates/mysql/4.0.3-alpha.sql b/admin/sql/updates/mysql/4.0.3-alpha.sql new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/admin/sql/updates/mysql/4.0.3-alpha.sql @@ -0,0 +1 @@ + diff --git a/admin/src/Model/CompilerModel.php b/admin/src/Model/CompilerModel.php index 235a1fa7a..ae2eed868 100644 --- a/admin/src/Model/CompilerModel.php +++ b/admin/src/Model/CompilerModel.php @@ -445,10 +445,10 @@ class CompilerModel extends ListModel /** * Get all components in the system * - * @return array + * @return array|null * @since 3.2.0 **/ - public function getComponents(): array + public function getComponents(): ?array { // Get a db connection. $db = $this->getDbo(); @@ -471,9 +471,8 @@ class CompilerModel extends ListModel $db->setQuery($query); // return the result - return $db->loadObjectList(); + return $db->loadObjectList() ?? null; } - /** * Get all dynamic content diff --git a/admin/src/Model/LibraryModel.php b/admin/src/Model/LibraryModel.php index d897c9621..64209ed1c 100644 --- a/admin/src/Model/LibraryModel.php +++ b/admin/src/Model/LibraryModel.php @@ -1176,7 +1176,7 @@ class LibraryModel extends AdminModel // also check to insure these names are not used again if (!isset(ComponentbuilderHelper::$libraryNames[$data['id']]) && in_array($data['name'], ComponentbuilderHelper::$libraryNames)) { - $data['name'] = $this->generateUniqe('name', $data['name']); + $data['name'] = $this->generateUnique('name', $data['name']); } // Set the Params Items to data diff --git a/admin/src/Model/SearchModel.php b/admin/src/Model/SearchModel.php index 6887d31f1..a1ba8bde6 100644 --- a/admin/src/Model/SearchModel.php +++ b/admin/src/Model/SearchModel.php @@ -352,10 +352,10 @@ class SearchModel extends ItemModel /** * Get all components in the system * - * @return array + * @return array|null * @since 3.2.0 **/ - public function getComponents(): array + public function getComponents(): ?array { // Get a db connection. $db = $this->getDbo(); @@ -378,7 +378,6 @@ class SearchModel extends ItemModel $db->setQuery($query); // return the result - return $db->loadObjectList(); - } - + return $db->loadObjectList() ?? null; + } } diff --git a/admin/src/View/Compiler/HtmlView.php b/admin/src/View/Compiler/HtmlView.php index ad43914c7..6ccbec7c8 100644 --- a/admin/src/View/Compiler/HtmlView.php +++ b/admin/src/View/Compiler/HtmlView.php @@ -660,13 +660,13 @@ class HtmlView extends BaseHtmlView foreach (ComponentbuilderHelper::$uk_components[$class] as $name) { // check if the CSS file exists. - if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) + if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) { // load the css. Html::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); } // check if the JavaScript file exists. - if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) + if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) { // load the js. Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); diff --git a/admin/src/View/Get_snippets/HtmlView.php b/admin/src/View/Get_snippets/HtmlView.php index 4f4a051de..8495fbfaa 100644 --- a/admin/src/View/Get_snippets/HtmlView.php +++ b/admin/src/View/Get_snippets/HtmlView.php @@ -167,13 +167,13 @@ class HtmlView extends BaseHtmlView foreach (ComponentbuilderHelper::$uk_components[$class] as $name) { // check if the CSS file exists. - if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) + if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) { // load the css. Html::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); } // check if the JavaScript file exists. - if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) + if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) { // load the js. Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); diff --git a/admin/src/View/Search/HtmlView.php b/admin/src/View/Search/HtmlView.php index 465e8e27a..e829b526f 100644 --- a/admin/src/View/Search/HtmlView.php +++ b/admin/src/View/Search/HtmlView.php @@ -384,13 +384,13 @@ class HtmlView extends BaseHtmlView foreach (ComponentbuilderHelper::$uk_components[$class] as $name) { // check if the CSS file exists. - if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) + if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css')) { // load the css. Html::_('stylesheet', 'media/com_componentbuilder/uikit-v2/css/components/'.$name.$style.$size.'.css', ['version' => 'auto']); } // check if the JavaScript file exists. - if (File::exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) + if (@file_exists(JPATH_ROOT.'/media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js')) { // load the js. Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/'.$name.$size.'.js', ['version' => 'auto'], ['type' => 'text/javascript', 'async' => 'async']); diff --git a/componentbuilder.xml b/componentbuilder.xml index 2be08401c..252f93d76 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 20th August, 2024 + 21st August, 2024 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io Copyright (C) 2015 Vast Development Method. All rights reserved. GNU General Public License version 2 or later; see LICENSE.txt - 4.0.3-alpha1 + 4.0.3-alpha2 Component Builder (v.4.0.3-alpha1) +

Component Builder (v.4.0.3-alpha2)

The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index 2f94cf507..04c4fffa7 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -77,10 +77,28 @@ pkg_component_builder package site - 4.0.3-alpha1 + 4.0.3-alpha https://dev.vdm.io - https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.3-alpha1.zip + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.3-alpha2.zip + + + alpha + + Llewellyn van der Merwe + https://dev.vdm.io + + + + Component Builder + Builds Complex Joomla Components + pkg_component_builder + package + site + 4.0.3-alpha2 + https://dev.vdm.io + + https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v4.0.3-alpha2.zip alpha diff --git a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php index 43a76a352..1616cdf26 100644 --- a/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php +++ b/libraries/vendor_jcb/VDM.Joomla/src/Componentbuilder/Compiler/Helper/Interpretation.php @@ -6614,7 +6614,7 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " check if the CSS file exists."; $setter .= PHP_EOL . $tabV . Indent::_(5) - . "if (File::exists(JPATH_ROOT.'/media/com_" + . "if (@file_exists(JPATH_ROOT.'/media/com_" . CFactory::_('Config')->component_code_name . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; $setter .= PHP_EOL . $tabV . Indent::_(5) . "{"; @@ -6630,7 +6630,7 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " check if the JavaScript file exists."; $setter .= PHP_EOL . $tabV . Indent::_(5) - . "if (File::exists(JPATH_ROOT.'/media/com_" + . "if (@file_exists(JPATH_ROOT.'/media/com_" . CFactory::_('Config')->component_code_name . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; $setter .= PHP_EOL . $tabV . Indent::_(5) . "{"; @@ -6671,7 +6671,7 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " check if the CSS file exists."; $setter .= PHP_EOL . $tabV . Indent::_(5) - . "if (File::exists(JPATH_ROOT.'/media/com_" + . "if (@file_exists(JPATH_ROOT.'/media/com_" . CFactory::_('Config')->component_code_name . "/uikit-v2/css/components/'.\$name.\$style.\$size.'.css'))"; $setter .= PHP_EOL . $tabV . Indent::_(5) . "{"; @@ -6687,7 +6687,7 @@ class Interpretation extends Fields __LINE__,__CLASS__ ) . " check if the JavaScript file exists."; $setter .= PHP_EOL . $tabV . Indent::_(5) - . "if (File::exists(JPATH_ROOT.'/media/com_" + . "if (@file_exists(JPATH_ROOT.'/media/com_" . CFactory::_('Config')->component_code_name . "/uikit-v2/js/components/'.\$name.\$size.'.js'))"; $setter .= PHP_EOL . $tabV . Indent::_(5) . "{"; @@ -7154,7 +7154,7 @@ class Interpretation extends Fields $file )) { - if (File::exists($file['path'])) + if (@file_exists($file['path'])) { $string = FileHelper::getContent( $file['path'] @@ -7170,7 +7170,7 @@ class Interpretation extends Fields { if (ArrayHelper::check($doc)) { - if (File::exists($doc['path'])) + if (@file_exists($doc['path'])) { $string = FileHelper::getContent(