diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f697ba0950..d498acdf249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Release Notes for Craft CMS 4 +## 4.2.1.1 - 2022-08-10 + +### Fixed +- Fixed a bug where saving an element with invalid field values could result in some field values being forgotten. ([#11756](https://github.com/craftcms/cms/issues/11756)) +- Fixed a bug where it wasn’t always possible to serve asset bundles via `webpack-dev-server` over SSL. ([#11758](https://github.com/craftcms/cms/pull/11758)) + ## 4.2.1 - 2022-08-09 ### Added diff --git a/composer.lock b/composer.lock index a483eaf5bcf..72d13d43f3c 100644 --- a/composer.lock +++ b/composer.lock @@ -72,16 +72,16 @@ }, { "name": "commerceguys/addressing", - "version": "v1.4.0", + "version": "v1.4.1", "source": { "type": "git", "url": "https://github.com/commerceguys/addressing.git", - "reference": "0478e6015472ad0b4e6c27d34ed9a8f0dbc4dfd3" + "reference": "8b1bcd45971733e8f4224e539cb92838f18c4d06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/commerceguys/addressing/zipball/0478e6015472ad0b4e6c27d34ed9a8f0dbc4dfd3", - "reference": "0478e6015472ad0b4e6c27d34ed9a8f0dbc4dfd3", + "url": "https://api.github.com/repos/commerceguys/addressing/zipball/8b1bcd45971733e8f4224e539cb92838f18c4d06", + "reference": "8b1bcd45971733e8f4224e539cb92838f18c4d06", "shasum": "" }, "require": { @@ -130,9 +130,9 @@ ], "support": { "issues": "https://github.com/commerceguys/addressing/issues", - "source": "https://github.com/commerceguys/addressing/tree/v1.4.0" + "source": "https://github.com/commerceguys/addressing/tree/v1.4.1" }, - "time": "2022-08-08T15:05:58+00:00" + "time": "2022-08-09T11:42:51+00:00" }, { "name": "composer/ca-bundle", @@ -1612,16 +1612,16 @@ }, { "name": "illuminate/collections", - "version": "v9.23.0", + "version": "v9.24.0", "source": { "type": "git", "url": "https://github.com/illuminate/collections.git", - "reference": "9b862a8e7c0da5b00af75b1422d3a29080ef7adb" + "reference": "f9eddfa8599dd224df618b08b2502720027d1f10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/9b862a8e7c0da5b00af75b1422d3a29080ef7adb", - "reference": "9b862a8e7c0da5b00af75b1422d3a29080ef7adb", + "url": "https://api.github.com/repos/illuminate/collections/zipball/f9eddfa8599dd224df618b08b2502720027d1f10", + "reference": "f9eddfa8599dd224df618b08b2502720027d1f10", "shasum": "" }, "require": { @@ -1663,11 +1663,11 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-07-18T13:54:30+00:00" + "time": "2022-08-09T13:26:41+00:00" }, { "name": "illuminate/conditionable", - "version": "v9.23.0", + "version": "v9.24.0", "source": { "type": "git", "url": "https://github.com/illuminate/conditionable.git", @@ -1713,7 +1713,7 @@ }, { "name": "illuminate/contracts", - "version": "v9.23.0", + "version": "v9.24.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -1761,16 +1761,16 @@ }, { "name": "illuminate/macroable", - "version": "v9.23.0", + "version": "v9.24.0", "source": { "type": "git", "url": "https://github.com/illuminate/macroable.git", - "reference": "25a2c6dac2b7541ecbadef952702e84ae15f5354" + "reference": "e3bfaf6401742a9c6abca61b9b10e998e5b6449a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/25a2c6dac2b7541ecbadef952702e84ae15f5354", - "reference": "25a2c6dac2b7541ecbadef952702e84ae15f5354", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/e3bfaf6401742a9c6abca61b9b10e998e5b6449a", + "reference": "e3bfaf6401742a9c6abca61b9b10e998e5b6449a", "shasum": "" }, "require": { @@ -1803,7 +1803,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-02-01T14:44:21+00:00" + "time": "2022-08-09T13:29:29+00:00" }, { "name": "justinrainbow/json-schema", diff --git a/src/config/app.php b/src/config/app.php index 01db24255cf..acca2dfc587 100644 --- a/src/config/app.php +++ b/src/config/app.php @@ -3,7 +3,7 @@ return [ 'id' => 'CraftCMS', 'name' => 'Craft CMS', - 'version' => '4.2.1', + 'version' => '4.2.1.1', 'schemaVersion' => '4.0.0.9', 'minVersionRequired' => '3.7.11', 'basePath' => dirname(__DIR__), // Defines the @app alias diff --git a/src/fieldlayoutelements/CustomField.php b/src/fieldlayoutelements/CustomField.php index af9ff7831c9..be4eb41dd56 100644 --- a/src/fieldlayoutelements/CustomField.php +++ b/src/fieldlayoutelements/CustomField.php @@ -208,8 +208,7 @@ public function formHtml(?ElementInterface $element = null, bool $static = false $view->setIsDeltaRegistrationActive( $isDeltaRegistrationActive && ($element->id ?? false) && - !$static && - !$element?->hasErrors(sprintf('%s.*', $this->attribute())) + !$static ); $html = $view->namespaceInputs(function() use ($element, $static) { return (string)parent::formHtml($element, $static); diff --git a/src/helpers/Db.php b/src/helpers/Db.php index 625969484d5..2854c9f36cb 100644 --- a/src/helpers/Db.php +++ b/src/helpers/Db.php @@ -767,7 +767,7 @@ public static function parseMoneyParam( * @param string|bool $value The param value * @param bool|null $defaultValue How `null` values should be treated * @return array - * @since 3.4.15 + * @since 3.4.14 */ public static function parseBooleanParam(string $column, mixed $value, ?bool $defaultValue = null): array { diff --git a/src/services/Webpack.php b/src/services/Webpack.php index 9015ab1e5f9..d4c91151e11 100644 --- a/src/services/Webpack.php +++ b/src/services/Webpack.php @@ -199,11 +199,9 @@ public function getDevServer(string $class): string * Returns the running status of the webpack dev server. * * @param string $class - * @phpstan-param class-string $class * @param string $loopback * @return bool * @throws GuzzleException - * @throws ReflectionException */ private function _isDevServerRunning(string $class, string $loopback): bool { @@ -216,7 +214,8 @@ private function _isDevServerRunning(string $class, string $loopback): bool return $this->_isDevServerRunning[$class] = $this->_matchAsset($this->_serverResponse[$loopback], $class); } - $client = Craft::createGuzzleClient(); + // Make sure the request isn't too strict for people running the dev server using https and outside the container + $client = Craft::createGuzzleClient(['verify' => false]); try { $res = $client->get(StringHelper::ensureRight($loopback, '/') . 'which-asset'); if ($res->getStatusCode() !== 200) { diff --git a/src/web/assets/cp/dist/cp.js b/src/web/assets/cp/dist/cp.js index 307b07ccc64..a4733b76a6d 100644 --- a/src/web/assets/cp/dist/cp.js +++ b/src/web/assets/cp/dist/cp.js @@ -1,3 +1,3 @@ /*! For license information please see cp.js.LICENSE.txt */ -(function(){var __webpack_modules__={3839:function(){Craft.AddressesInput=Garnish.Base.extend({$container:null,$addBtn:null,$addBtnItem:null,$cards:null,init:function(t,e){var i=this;this.$container=$(t),this.setSettings(e,Craft.AddressesInput.defaults),this.$container.data("addresses")&&(console.warn("Double-instantiating an address input on an element"),this.$container.data("addresses").destroy()),this.$container.data("addresses",this),this.$addBtn=this.$container.find(".address-cards__add-btn"),this.$addBtnItem=this.$addBtn.closest("li"),this.$cards=this.$container.find("> .address-card");for(var s=0;s=this.settings.maxItems)){var e=$(t).appendTo(this.$tbody),i=e.find(".delete");this.settings.sortable&&this.sorter.addItems(e),this.$deleteBtns=this.$deleteBtns.add(i),this.addListener(i,"click","handleDeleteBtnClick"),this.totalItems++,this.updateUI()}},reorderItems:function(){var t=this;if(this.settings.sortable){for(var e=[],i=0;i=this.settings.maxItems?$(this.settings.newItemBtnSelector).addClass("hidden"):$(this.settings.newItemBtnSelector).removeClass("hidden"))}},{defaults:{tableSelector:null,noItemsSelector:null,newItemBtnSelector:null,idAttribute:"data-id",nameAttribute:"data-name",sortable:!1,allowDeleteAll:!0,minItems:0,maxItems:null,reorderAction:null,deleteAction:null,reorderSuccessMessage:Craft.t("app","New order saved."),reorderFailMessage:Craft.t("app","Couldn’t save new order."),confirmDeleteMessage:Craft.t("app","Are you sure you want to delete “{name}”?"),deleteSuccessMessage:Craft.t("app","“{name}” deleted."),deleteFailMessage:Craft.t("app","Couldn’t delete “{name}”."),onReorderItems:$.noop,onDeleteItem:$.noop}})},6872:function(){Craft.AssetImageEditor=Garnish.Modal.extend({$body:null,$footer:null,$imageTools:null,$buttons:null,$cancelBtn:null,$replaceBtn:null,$saveBtn:null,$focalPointBtn:null,$editorContainer:null,$straighten:null,$croppingCanvas:null,$spinner:null,$constraintContainer:null,$constraintRadioInputs:null,$customConstraints:null,canvas:null,image:null,viewport:null,focalPoint:null,grid:null,croppingCanvas:null,clipper:null,croppingRectangle:null,cropperHandles:null,cropperGrid:null,croppingShade:null,imageStraightenAngle:0,viewportRotation:0,originalWidth:0,originalHeight:0,imageVerticeCoords:null,zoomRatio:1,animationInProgress:!1,currentView:"",assetId:null,cacheBust:null,draggingCropper:!1,scalingCropper:!1,draggingFocal:!1,previousMouseX:0,previousMouseY:0,shiftKeyHeld:!1,editorHeight:0,editorWidth:0,cropperState:!1,scaleFactor:1,flipData:{},focalPointState:!1,maxImageSize:null,lastLoadedDimensions:null,imageIsLoading:!1,mouseMoveEvent:null,croppingConstraint:!1,constraintOrientation:"landscape",showingCustomConstraint:!1,saving:!1,renderImage:null,renderCropper:null,_queue:null,init:function(t,e){var i=this;this._queue=new Craft.Queue,this.cacheBust=Date.now(),this.setSettings(e,Craft.AssetImageEditor.defaults),null===this.settings.allowDegreeFractions&&(this.settings.allowDegreeFractions=Craft.isImagick),Garnish.prefersReducedMotion()&&(this.settings.animationDuration=1),this.assetId=t,this.flipData={x:0,y:0},this.$container=$('').appendTo(Garnish.$bod),this.$body=$('
').appendTo(this.$container),this.$footer=$('