Skip to content

Commit 50fff99

Browse files
committed
[RELEASE] Version 13.1.1
Related: https://projekte.in2code.de/issues/74788
2 parents 206f23b + 1f3882f commit 50fff99

File tree

14 files changed

+114
-29
lines changed

14 files changed

+114
-29
lines changed

.project/docker/foreign-php/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN chmod 600 /home/app/.ssh/authorized_keys \
1515
&& apt-get update \
1616
&& apt-get install -y --no-install-recommends openssh-server \
1717
&& docker-php-ext-install exif \
18-
&& mkdir /run/sshd/ \
18+
&& mkdir -p /run/sshd/ \
1919
&& ssh-keygen -A \
2020
&& for key in $(ls /etc/ssh/ssh_host_* | grep -v pub); do echo "HostKey $key" >> /etc/ssh/sshd_config; done \
2121
&& apt-get autoremove -y \

CHANGELOG.md

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

3+
13.1.1
4+
5+
- [META] Set the EM conf version number to 13.1.1
6+
- [DOCS] Update Changelog.md
7+
- [TASK] Replace requirement REQ_EXISTENCE with new requirement REQ_CONSISTENT_EXISTENCE for translated records
8+
- [TASK] Always publish translations if language parent is deleted
9+
- [BUGFIX] Show line breaks in information modal
10+
- [DEV] create /run/sshd/ only if not already exist
11+
- [BUGFIX] Fix spacing/sizing of publish overview page rows
12+
- [BUGFIX] Fix select input styling in filters
13+
314
13.1.0
415

516
- [META] Set the EM conf version number to 13.1.0

Classes/Component/Core/Publisher/PublisherService.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,19 @@ private function shouldRecordBePublished(Record $record, bool $isTopLevelCall):
197197

198198
private function processTranslations(Record $record, bool $includeChildPages, bool $parentWasPublished = false): void
199199
{
200-
$translationEvent = new BeforePublishingTranslationsEvent($record, $includeChildPages);
201-
$this->eventDispatcher->dispatch($translationEvent);
202-
203-
if (!$translationEvent->shouldProcessTranslations()) {
204-
return;
200+
$state = $record->getState();
201+
if (
202+
!($state === Record::S_SOFT_DELETED)
203+
&& !($state === Record::S_DELETED)
204+
) {
205+
$translationEvent = new BeforePublishingTranslationsEvent($record, $includeChildPages);
206+
$this->eventDispatcher->dispatch($translationEvent);
207+
208+
if (
209+
!$translationEvent->shouldProcessTranslations()
210+
) {
211+
return;
212+
}
205213
}
206214

207215
foreach ($record->getTranslations() as $translatedRecords) {

Classes/Component/Core/Record/Model/AbstractDatabaseRecord.php

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ protected function calculateLanguageDependencies(array &$dependencies): void
8080
$language = $this->getCtrlProp(self::CTRL_PROP_LANGUAGE_FIELD);
8181
$transOrigPointer = $this->getCtrlProp(self::CTRL_PROP_TRANS_ORIG_POINTER_FIELD);
8282
if ($language > 0 && $transOrigPointer > 0) {
83-
$dependencies[] = $transOrigExisting = new Dependency(
83+
$dependencies[] = $transOrigConsistentExistence = new Dependency(
8484
$this,
8585
$this->getClassification(),
8686
['uid' => $transOrigPointer],
87-
Dependency::REQ_EXISTING,
88-
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang.xlf:record.reason.requires_translation_parent.existing',
87+
Dependency::REQ_CONSISTENT_EXISTENCE,
88+
'LLL:EXT:in2publish_core/Resources/Private/Language/locallang.xlf:record.reason.requires_translation_parent.consistent_existence',
8989
fn (Record $record): array => [
9090
$this->__toString() ?: "({$this->getClassification()} [{$this->getId()}])",
9191
$record->__toString() ?: "({$record->getClassification()} [{$record->getId()}])",
@@ -106,7 +106,7 @@ protected function calculateLanguageDependencies(array &$dependencies): void
106106
$record->__toString() ?: "({$record->getClassification()} [{$record->getId()}])",
107107
],
108108
);
109-
$transOrigEnableColumns->addSupersedingDependency($transOrigExisting);
109+
$transOrigEnableColumns->addSupersedingDependency($transOrigConsistentExistence);
110110
}
111111
}
112112
}
@@ -221,4 +221,27 @@ public function isRemovedFromForeignDatabase(): bool
221221
$deleteField = $GLOBALS['TCA'][$this->getClassification()]['ctrl']['delete'] ?? null;
222222
return (null !== $deleteField && array_key_exists($deleteField, $this->getLocalProps()) && (bool)$this->getLocalProps()[$deleteField]) && empty($this->getForeignProps());
223223
}
224+
225+
public function isDeletedInLocalDatabase(): bool
226+
{
227+
return $this->hasDeleteFlag($this->getLocalProps()) || empty($this->getLocalProps());
228+
}
229+
230+
public function isDeletedInForeignDatabase(): bool
231+
{
232+
return $this->hasDeleteFlag($this->getForeignProps()) || empty($this->getForeignProps());
233+
}
234+
235+
private function hasDeleteFlag(array $props): bool
236+
{
237+
$deleteField = $GLOBALS['TCA'][$this->getClassification()]['ctrl']['delete'] ?? null;
238+
return $deleteField !== null
239+
&& array_key_exists($deleteField, $props)
240+
&& (bool)$props[$deleteField];
241+
}
242+
243+
public function hasConsistentExistence(): bool
244+
{
245+
return $this->isDeletedInLocalDatabase() === $this->isDeletedInForeignDatabase();
246+
}
224247
}

Classes/Component/Core/Record/Model/Dependency.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121
class Dependency
2222
{
23+
public const REQ_CONSISTENT_EXISTENCE = 'consistent_existence';
2324
public const REQ_EXISTING = 'existing';
2425
public const REQ_ENABLECOLUMNS = 'enablecolumns';
2526
public const REQ_FULL_PUBLISHED = 'fully_published';
@@ -127,6 +128,9 @@ protected function recordMatchesRequirements(Record $record): bool
127128
if (self::REQ_EXISTING === $this->requirement) {
128129
return $record->getState() !== Record::S_ADDED;
129130
}
131+
if (($record instanceof AbstractDatabaseRecord) && (self::REQ_CONSISTENT_EXISTENCE === $this->requirement)) {
132+
return $record->hasConsistentExistence();
133+
}
130134
if (self::REQ_ENABLECOLUMNS === $this->requirement) {
131135
$state = $record->getState();
132136
if ($state === Record::S_UNCHANGED) {

Resources/Private/Build/Assets/Sass/_ModulesGeneral.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,6 @@ div#typo3-docbody.stopScrolling {
761761
}
762762

763763
.in2publish-page-group__children {
764-
padding-inline-start: 0.5rem;
765764
padding-inline-end: 0;
766765
padding-block-end: 0;
767766

@@ -852,6 +851,6 @@ div#typo3-docbody.stopScrolling {
852851
.in2publish-page__col--publish,
853852
.in2publish-page__col--status,
854853
.in2publish-page__col--compare {
855-
max-width: 75px;
856-
width: 75px;
854+
max-width: 150px;
855+
width: 150px;
857856
}

Resources/Private/Language/de.locallang.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,10 @@
468468
<source>&quot;%s&quot; requires that the record &quot;%s&quot; (which is the default language version) is published first.</source>
469469
<target>&quot;%s&quot; erfordert, dass der Datensatz &quot;%s&quot; (das ist die Standardsprachversion) zuerst veröffentlicht wird.</target>
470470
</trans-unit>
471+
<trans-unit id="record.reason.requires_translation_parent.consistent_existence" resname="record.reason.requires_translation_parent.consistent_existencerequires_translation_parent.consistent_existence">
472+
<source>"%s" requires that the default language record "%s" has consistent existence status across local and foreign databases (present OR absent).</source>
473+
<target>"%s" erfordert, dass der Datensatz der Standardsprache "%s" einen konsistenten Status in der lokalen und der entfernten Datenbank hat (entweder beide vorhanden oder beide gelöscht).</target>
474+
</trans-unit>
471475
<trans-unit id="record.reason.requires_translation_parent.enablecolumns" resname="record.reason.requires_translation_parent.enablecolumns">
472476
<source>The record &quot;%s&quot; cannot be published until all visibility settings (%s) of the default language &quot;%s&quot; have been published.</source>
473477
<target>Der Datensatz &quot;%s&quot; kann nicht veröffentlicht werden, bevor nicht alle Sichtbarkeitseinstellung (%s) der Standardsprache &quot;%s&quot; veröffentlicht wurden.</target>

Resources/Private/Language/locallang.xlf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@
352352
<trans-unit id="record.reason.requires_translation_parent.existing" resname="record.reason.requires_translation_parent.existing">
353353
<source>&quot;%s&quot; requires that the record &quot;%s&quot; (which is the default language version) is published first.</source>
354354
</trans-unit>
355+
<trans-unit id="record.reason.requires_translation_parent.consistent_existence" resname="record.reason.requires_translation_parent.consistent_existencerequires_translation_parent.consistent_existence">
356+
<source>"%s" requires that the default language record "%s" has consistent existence status across local and foreign databases (present OR absent).</source>
357+
</trans-unit>
355358
<trans-unit id="record.reason.requires_translation_parent.enablecolumns" resname="record.reason.requires_translation_parent.enablecolumns">
356359
<source>The record &quot;%s&quot; cannot be published until all visibility settings (%s) of the default language &quot;%s&quot; have been published.</source>
357360
</trans-unit>

Resources/Private/Partials/Record/Publishing/PublishingNotPossible.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" data-namespace-typo3-fluid="true">
22
<f:variable name="easy-modal-title" value="{f:translate(key: 'tx_in2publishcore.modal.publish_disabled.title')}" />
33
<f:variable name="easy-modal-content">
4-
<f:for each="{record.unfulfilledDependenciesHumanReadableRecursively}" as="unfulfilledDependency"> • {unfulfilledDependency}
5-
</f:for><f:for each="{record.reasonsWhyTheRecordIsNotPublishableHumanReadable}" as="reasonWhyTheRecordIsNotPublishable"> • {reasonWhyTheRecordIsNotPublishable}
6-
</f:for>
4+
<f:format.raw>
5+
<f:for each="{record.unfulfilledDependenciesHumanReadableRecursively}" as="unfulfilledDependency">
6+
• {unfulfilledDependency}
7+
</f:for>
8+
<f:for each="{record.reasonsWhyTheRecordIsNotPublishableHumanReadable}" as="reasonWhyTheRecordIsNotPublishable">
9+
• {reasonWhyTheRecordIsNotPublishable}
10+
</f:for>
11+
</f:format.raw>
712
</f:variable>
813
<f:variable name="easy-modal-severity" value="1" />
914
<a class="btn btn-default btn-sm js-in2publish-information-modal"

Resources/Private/Partials/Record/RecordFilter.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<div class="col-sm-4">
2626
<div class="form-group">
2727
<label for="in2publish__publishfilter_state"><f:translate key="module_m1_filter_state">Filter by change state</f:translate></label>
28-
<select id="in2publish__publishfilter_state" class="form-control js-in2publish-statefilter" data-workflow-filter-field="true">
28+
<select id="in2publish__publishfilter_state" class="form-select js-in2publish-statefilter" data-workflow-filter-field="true">
2929
<option value=""><f:translate key="module_m1_filter_state.all">All</f:translate></option>
3030
<option value="changed"><f:translate key="record.state.changed.short">changed</f:translate></option>
3131
<option value="added"><f:translate key="record.state.added.short">added</f:translate></option>
@@ -42,7 +42,7 @@
4242
<div class="col-sm-4">
4343
<div class="form-group">
4444
<label for="in2publish__publishfilter_level"><f:translate key="module_m1_filter_field_level">level</f:translate></label>
45-
<select id="in2publish__publishfilter_level" class="form-control js-in2publish-levelfilter" data-workflow-filter-field="true" name="relative-level">
45+
<select id="in2publish__publishfilter_level" class="form-select js-in2publish-levelfilter" data-workflow-filter-field="true" name="relative-level">
4646
<option value="{f:uri.action(action: 'index', arguments: { pageRecursionLimit: 0 })}" {f:if(condition: '{pageRecursionLimit} == 0', then: 'selected')}><f:translate key="m1.page_recursion.depths" arguments="{0: 0 }">0 levels</f:translate></option>
4747
<option value="{f:uri.action(action: 'index', arguments: { pageRecursionLimit: 1 })}" {f:if(condition: '{pageRecursionLimit} == 1', then: 'selected')}><f:translate key="m1.page_recursion.depth" arguments="{0: 1 }">1 level</f:translate></option>
4848
<option value="{f:uri.action(action: 'index', arguments: { pageRecursionLimit: 2 })}" {f:if(condition: '{pageRecursionLimit} == 2', then: 'selected')}><f:translate key="m1.page_recursion.depths" arguments="{0: 2 }">2 levels</f:translate></option>
@@ -65,7 +65,7 @@
6565
<div class="col-sm-4">
6666
<div class="form-group">
6767
<label for="in2publish__publishfilter_language"><f:translate key="module_m1_filter_language">Filter by language</f:translate></label>
68-
<select id="in2publish__publishfilter_language" class="form-control js-in2publish-languagefilter" data-workflow-filter-field="true">
68+
<select id="in2publish__publishfilter_language" class="form-select js-in2publish-languagefilter" data-workflow-filter-field="true">
6969
<option value="">
7070
<f:translate key="module_m1_filter_language.all">Filter by language</f:translate>
7171
</option>

0 commit comments

Comments
 (0)