Skip to content

Commit

Permalink
[BUGFIX] Add missing fields in getRecordWSOL calls
Browse files Browse the repository at this point in the history
Minor cleanup
  • Loading branch information
wazum committed Sep 14, 2022
1 parent e9c7222 commit 48fe6bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Classes/Backend/Hook/CommandMapHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CommandMapHook
/**
* @param int|string $id
* @param bool|array $pasteUpdate
* @param string $value
* @param string|int $value
*/
public function processCmdmap_postProcess(
string $command,
Expand All @@ -38,7 +38,8 @@ public function processCmdmap_postProcess(
}
$value = (int) $value;

$currentPage = BackendUtility::getRecord('pages', $id, 'uid,slug,sys_language_uid');
// Important: No spaces in the fields list!!
$currentPage = BackendUtility::getRecord('pages', $id, 'uid,slug,sys_language_uid,tx_sluggi_lock,tx_sluggi_sync');
if (!empty($currentPage)) {
$languageId = $currentPage['sys_language_uid'];
$currentSlugSegment = SlugHelper::getLastSlugSegment($currentPage['slug']);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Backend/Hook/DatamapHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function moveRecord_afterAnotherElementPostProcess(
protected function updateSlugForMovedPage(int $id, int $targetId, DataHandler $dataHandler): void
{
// Important: No spaces in the fields list!!
$currentPage = BackendUtility::getRecordWSOL('pages', $id, 'uid,slug,sys_language_uid');
$currentPage = BackendUtility::getRecordWSOL('pages', $id, 'uid,slug,sys_language_uid,tx_sluggi_lock,tx_sluggi_sync');
if (!empty($currentPage) && !PermissionHelper::isLocked($currentPage)) {
$allowOnlyLastSegment = (bool) Configuration::get('last_segment_only');

Expand Down
2 changes: 1 addition & 1 deletion Classes/Backend/Hook/DispatchNotificationHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class DispatchNotificationHook
* Called as a hook in \TYPO3\CMS\Backend\Utility\BackendUtility::getUpdateSignalCode
* calls a JS function to send the slug change notification
*/
public function dispatchNotification(array $params)
public function dispatchNotification(array $params): void
{
$javaScriptRenderer = GeneralUtility::makeInstance(PageRenderer::class)->getJavaScriptRenderer();
$javaScriptRenderer->addJavaScriptModuleInstruction(
Expand Down

0 comments on commit 48fe6bd

Please sign in to comment.