Skip to content

Commit

Permalink
Merge pull request #105 from lilt/3.x-development
Browse files Browse the repository at this point in the history
Release 3.5.3
  • Loading branch information
hadomskyi authored May 22, 2023
2 parents 1fea47a + b9cac05 commit 024def8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 3.5.3 - 2023-05-18
### Fixed
- Added fallback for block elements without a created structure to fix content provider

## 3.5.2 - 2023-05-17
### Changed
- Updated error message for failed jobs after retries
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lilt/craft-lilt-plugin",
"description": "The Lilt plugin makes it easy for you to send content to Lilt for translation right from within Craft CMS.",
"type": "craft-plugin",
"version": "3.5.2",
"version": "3.5.3",
"keywords": [
"craft",
"cms",
Expand Down
10 changes: 10 additions & 0 deletions src/services/providers/field/ElementQueryContentProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ public function provide(ProvideContentCommand $provideContentCommand): array
*/
$blockElements = $matrixBlockQuery->all();

//Fallback for neo block elements without a created structure
if (count($blockElements) === 0 && get_class($field) === CraftliltpluginParameters::BENF_NEO_FIELD) {
/** @var \benf\neo\elements\db\BlockQuery $matrixBlockQuery */
$matrixBlockQuery->withStructure = false;
$matrixBlockQuery->orderBy = '';

$blockElements = $matrixBlockQuery->orderBy([])->all();
}


foreach ($blockElements as $blockElement) {
$blockId = $blockElement->getId();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ public function _fixtures(): array
*/
public function testRetrySuccess(IntegrationTester $I, $scenario): void
{
$scenario->skip('Neo field is not getting updated and missing in source content');

$I->amLoggedInAs(
Craft::$app->getUsers()->getUserById(1)
);
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/modules/SendJobToConnectorCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ private function getController(): PostCreateJobController
*/
public function testCreateJob(IntegrationTester $I, $scenario): void
{
$scenario->skip('Neo field is not getting updated and missing in source content');

$user = Craft::$app->getUsers()->getUserById(1);
$I->amLoggedInAs($user);

Expand Down Expand Up @@ -182,8 +180,6 @@ public function testCreateJob(IntegrationTester $I, $scenario): void

public function testSendCopySourceFlow(IntegrationTester $I, $scenario): void
{
$scenario->skip('Neo field is not getting updated and missing in source content');

$user = Craft::$app->getUsers()->getUserById(1);
$I->amLoggedInAs($user);

Expand Down Expand Up @@ -300,8 +296,6 @@ public function testSendCopySourceFlow(IntegrationTester $I, $scenario): void
*/
public function testCreateJobWithUnexpectedStatusFromConnector(IntegrationTester $I, $scenario): void
{
$scenario->skip('Neo field is not getting updated and missing in source content');

$element = Entry::find()
->where(['authorId' => 1])
->orderBy(['id' => SORT_DESC])
Expand Down

0 comments on commit 024def8

Please sign in to comment.