Skip to content

Commit

Permalink
Merge branch 'release/3.3.4'
Browse files Browse the repository at this point in the history
* release/3.3.4:
  Changelog for 3.3.4
  Fixed a missing changelog entry for 3.3.1
  Added fields refresh to BlockTypes service construct
  Docblock tidying
  • Loading branch information
joshangell committed Mar 1, 2019
2 parents e82f5bb + 5a2f361 commit 0f201ee
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
## Unreleased


## 3.3.4 - 2019-03-01

### Fixed
- Fixed an issue where sometimes the fields cache needs refreshing ([#46](https://github.com/angell-co/Spoon/pull/46))


## 3.3.3 - 2019-02-22

### Fixed
Expand All @@ -31,6 +37,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

### Fixed
- Reverted PR [#46](https://github.com/angell-co/Spoon/pull/46) due to large DB impact resulting in slow page loads
- Fixed an issue where Spoon was not loading on previous versions of an Entry ([#48](https://github.com/angell-co/Spoon/issues/48))


## 3.3.0 - 2019-02-14
Expand Down
13 changes: 11 additions & 2 deletions src/services/BlockTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,21 @@ class BlockTypes extends Component
// Public Methods
// =========================================================================

/**
* BlockTypes constructor.
*/
public function __construct() {
// Refresh fields cache in case something has gone awry
Craft::$app->fields->refreshFields();
}

/**
* Returns a Spoon block type model by its ID
*
* @param $id
*
* @return null
* @return BlockType|null
* @throws BlockTypeNotFoundException
*/
public function getById($id)
{
Expand Down Expand Up @@ -374,7 +383,7 @@ public function getFieldLayoutIds($context, $fieldId = false)
*
* @param BlockTypeRecord $blockTypeRecord
*
* @return null
* @return BlockType|null
*/
private function _populateBlockTypeFromRecord(BlockTypeRecord $blockTypeRecord)
{
Expand Down

0 comments on commit 0f201ee

Please sign in to comment.