Skip to content

Commit 134e383

Browse files
committed
[RELEASE] Version 9.3.1 with fixes for TCA pre proc., empty pointer values and deleted records
2 parents d0b7ace + 002de12 commit 134e383

File tree

5 files changed

+30
-16
lines changed

5 files changed

+30
-16
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# In2publish Core Change Log
22

3+
9.3.1:
4+
5+
- [META] Set the EM conf version number to 9.3.1
6+
- [BUGFIX] Define TCA user fields as unfit for relation resolving
7+
- [BUGFIX] Limit "treatRemovedAndDeletedAsDifference" to actual removed and deleted records
8+
- [BUGFIX] Fallback to foreign's sys_file_processedfile sys_file pointer value
9+
- [RELEASE] Version 9.3.0 with publish page context menu entry, file edge cache invalidation, and much more-
10+
311
9.3.0:
412

513
- [META] Set the branch alias version number to 9.3.x-dev

Classes/Domain/Factory/RecordFactory.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,17 @@ public function makeInstance(
274274
if (empty($tableConfiguration)) {
275275
switch ($tableName) {
276276
case 'sys_file_processedfile':
277-
$identifier = $instance->getLocalProperty('original');
278-
$record = $commonRepository->findByIdentifier($identifier, 'sys_file');
279-
$instance->addRelatedRecord($record);
277+
$identifier = null;
278+
if ($instance->localRecordExists()) {
279+
$identifier = $instance->getLocalProperty('original');
280+
}
281+
if (empty($identifier) && $instance->foreignRecordExists()) {
282+
$identifier = $instance->getForeignProperty('original');
283+
}
284+
if (!empty($identifier)) {
285+
$record = $commonRepository->findByIdentifier($identifier, 'sys_file');
286+
$instance->addRelatedRecord($record);
287+
}
280288
break;
281289
default:
282290
}

Classes/Domain/Repository/CommonRepository.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,14 @@ protected function isIgnoredRecord(array $localProperties, array $foreignPropert
19081908
protected function isRemovedAndDeletedRecord(array $localProps, array $foreignProps): bool
19091909
{
19101910
if ($this->configContainer->get('factory.treatRemovedAndDeletedAsDifference')) {
1911-
return false;
1911+
// "Removed and deleted" only refers to the local side.
1912+
// If the record is not exactly 1. deleted on foreign and 2. removed on local this feature does not apply.
1913+
if (empty($localProps)
1914+
&& array_key_exists('deleted', $foreignProps)
1915+
&& 1 === (int)$foreignProps['deleted']
1916+
) {
1917+
return false;
1918+
}
19121919
}
19131920
return (empty($localProps) && isset($foreignProps['deleted']) && 1 === (int)$foreignProps['deleted'])
19141921
|| (empty($foreignProps) && isset($localProps['deleted']) && 1 === (int)$localProps['deleted']);
@@ -1938,7 +1945,7 @@ protected function isDeletedAndUnchangedRecord(array $localProperties, array $fo
19381945
* @return void
19391946
* @throws Throwable
19401947
*/
1941-
public function publishRecordRecursive(RecordInterface $record, array $excludedTables = ['pages'])
1948+
public function publishRecordRecursive(RecordInterface $record, array $excludedTables = ['p ages'])
19421949
{
19431950
try {
19441951
// Dispatch Anomaly

Classes/Domain/Service/Processor/UserProcessor.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,7 @@
3535
class UserProcessor extends AbstractProcessor
3636
{
3737
/**
38-
* Overwrite and set TRUE for types like "select" or "inline"
39-
*
4038
* @var bool
4139
*/
42-
protected $canHoldRelations = true;
43-
44-
/**
45-
* @var array
46-
*/
47-
protected $forbidden = [
48-
'itemsProcFunc is not supported' => self::ITEMS_PROC_FUNC,
49-
];
40+
protected $canHoldRelations = false;
5041
}

ext_emconf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'title' => 'in2publish Core',
55
'description' => 'Content publishing extension to connect stage and production server',
66
'category' => 'plugin',
7-
'version' => '9.3.0',
7+
'version' => '9.3.1',
88
'state' => 'stable',
99
'uploadfolder' => 0,
1010
'createDirs' => '',

0 commit comments

Comments
 (0)