Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1c1b701
[TASK] Remove newly introduced Docker, adjust workflows
DavidBruchmann Jul 13, 2026
f688e59
[TASK] fix vite parameter in workflow
DavidBruchmann Jul 13, 2026
856ded2
[TASK] raise version for node.js
DavidBruchmann Jul 13, 2026
a204be6
[TASK] update dependencies in package.json
DavidBruchmann Jul 13, 2026
a5aef42
[TASK] update .github/workflows/README.md
DavidBruchmann Jul 13, 2026
cab2574
[TASK] update github actions
DavidBruchmann Jul 13, 2026
20ccd64
[TASK] update github actions
DavidBruchmann Jul 13, 2026
4a9f8bb
[TASK] update github actions
DavidBruchmann Jul 13, 2026
d3ef8ef
Merge branch 'Kephson:v5-dev' into v5-dev
DavidBruchmann Jul 13, 2026
7e68563
[BUGFIX] remove outdated workflow from nighly-main.yml
DavidBruchmann Jul 13, 2026
0286542
[FEATURE] rename & update included EXT:test_sitepacke
DavidBruchmann Jul 16, 2026
97f98fe
rem sitepackage
DavidBruchmann Jul 18, 2026
86ea468
[TASK] re-add sitepackage as dir, not as sub-repo
DavidBruchmann Jul 18, 2026
dbe95bf
[TASK] improve included EXT:test_sitepackage
DavidBruchmann Jul 23, 2026
d4ae322
[TASK] fix CGL issues
DavidBruchmann Jul 23, 2026
19dc101
[TASK] fix CGL issues
DavidBruchmann Jul 23, 2026
c8ac0c8
[TASK] fix PHPstan issue
DavidBruchmann Jul 23, 2026
4e5c678
[TASK] fix PHPstan issue
DavidBruchmann Jul 23, 2026
50ae097
[TASK] fix PHPstan issue
DavidBruchmann Jul 23, 2026
4d31014
[TASK] fix PHPstan issue
DavidBruchmann Jul 23, 2026
6015ecd
[TASK] fix PHPstan issue
DavidBruchmann Jul 23, 2026
ccc04fc
[TASK] clean TypoScript of test extension
DavidBruchmann Jul 23, 2026
16913fe
[BUGFIX] refactor: Use resolved record hydration in ShortcutPreviewRe…
DavidBruchmann Aug 29, 2026
28eac78
[TASK] resolve Issues listed in InstallTool
DavidBruchmann Aug 29, 2026
fb26975
[TASK] add static variable for LocalizationRepository in TtContentRep…
DavidBruchmann Aug 29, 2026
3e8582c
[TASK] remove linebreak from TtContentRepository for php-cs-fixer
DavidBruchmann Aug 29, 2026
35376e5
[TASK] fix changed variable name in annotations of TtContentRepository
DavidBruchmann Aug 29, 2026
7898c65
[TASK] remove 'dead' code from TtContentRepository
DavidBruchmann Aug 29, 2026
858d73e
[TASK] update README concerning branches and releases
DavidBruchmann Aug 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/nightly-main.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,9 +20,3 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run ci.yml --ref main

- name: Execute multi-version tests on 'main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run typo3-multi-version-tests.yml --ref main -f force_full_test=true
2 changes: 1 addition & 1 deletion Classes/DataHandler/ProcessCmdmap.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -86,7 +86,7 @@ public function execute_processCmdmap(

$clipBoard = $queryParams['CB'] ??= null;
if (!empty($clipBoard)) {
$updateArray = $clipBoard['update'];
$updateArray = $clipBoard['update']; // false positive of #99586 / #100963 in Extension Scanner
if (!empty($updateArray)) {
$dataArray = array_merge($dataArray, $updateArray);
}
Expand Down
29 changes: 11 additions & 18 deletions Classes/Domain/Repository/TtContentRepository.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,6 +29,7 @@
use Doctrine\DBAL\Exception as DBALException;
use Doctrine\DBAL\Exception\DriverException as DBALDriverException;
use EHAERER\PasteReference\Helper\BackendHelper;
use TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Database\Connection;
Expand All@@ -52,13 +53,15 @@ class TtContentRepository implements SingletonInterface
protected bool $showHidden = true;
protected BackendHelper $backendHelper;
protected string $table = 'tt_content';
protected LocalizationRepository $localizationRepository;

public function __construct()
{
/** @var array<non-empty-string, string|int|float|bool|null> $emConf */
$emConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('paste_reference') ?? [];
$this->extensionConfiguration = $emConf;
$this->backendHelper = GeneralUtility::makeInstance(BackendHelper::class);
$this->localizationRepository = GeneralUtility::makeInstance(LocalizationRepository::class);
}

/**
Expand All@@ -69,15 +72,15 @@ public function __construct()
* @param string $shortcutItem The single page to be used as the tree root
* @param-out array $collectedItems The collected item data rows ordered by parent position, column position and sorting
* @param int $parentUid uid of the referencing tt_content record
* @param int $language sys_language_uid of the referencing tt_content record
* @param int $languageId sys_language_uid of the referencing tt_content record
* @param int $recursive The number of levels for the recursion
* @throws DBALException
*/
public function collectContentDataFromPages(
string $shortcutItem,
array &$collectedItems,
int $parentUid = 0,
int $language = 0,
int $languageId = 0,
int $recursive = 0 // TODO: $recursive never seems being used
): void {
$itemList = str_replace('pages_', '', $shortcutItem);
Expand DownExpand Up@@ -113,11 +116,8 @@ public function collectContentDataFromPages(

/** @ var array<string,mixed>|false $item */
while ($item = $result->fetchAssociative()) {
if (!empty($this->extensionConfiguration['overlayShortcutTranslation']) && $language > 0) {
$translatedItem = BackendUtility::getRecordLocalization('tt_content', (int)($item['uid'] ?? 0), $language) ?: [];
if (is_array($translatedItem) && $translatedItem !== []) {
$item = array_shift($translatedItem);
}
if (!empty($this->extensionConfiguration['overlayShortcutTranslation']) && (int)$languageId > 0) {
$translatedItem = $this->localizationRepository->getRecordTranslation($this->table, (int)($item['uid'] ?? 0), (int)$languageId);
}
if ($this->backendHelper->getBackendUser()->workspace > 0) {
unset($item['inSet']);
Expand All@@ -137,14 +137,14 @@ public function collectContentDataFromPages(
* @param string $shortcutItem The tt_content element to fetch the data fromom
* @param-out array $collectedItems The collected item data row
* @param int $parentUid uid of the referencing tt_content record
* @param int $language sys_language_uid of the referencing tt_content record
* @param int $languageId sys_language_uid of the referencing tt_content record
* @throws DBALException
*/
public function collectContentData(
string $shortcutItem,
array &$collectedItems,
int $parentUid,
int $language
int $languageId
): void {
$shortcutItem = str_replace('tt_content_', '', $shortcutItem);
if ((int)$shortcutItem !== $parentUid) {
Expand All@@ -167,11 +167,8 @@ public function collectContentData(
->setMaxResults(1)
->executeQuery()
->fetchAssociative();
if (!empty($this->extensionConfiguration['overlayShortcutTranslation']) && $language > 0) {
$translatedItem = BackendUtility::getRecordLocalization('tt_content', (int)($item['uid'] ?? 0), $language) ?: [];
if (is_array($translatedItem) && $translatedItem !== []) {
$item = array_shift($translatedItem);
}
if (!empty($this->extensionConfiguration['overlayShortcutTranslation']) && (int)$languageId > 0) {
$translatedItem = $this->localizationRepository->getRecordTranslation($this->table, (int)($item['uid'] ?? 0), (int)$languageId);
}

if ($this->backendHelper->getBackendUser()->workspace > 0) {
Expand DownExpand Up@@ -235,10 +232,6 @@ public function cleanupWorkspacesAfterFinalizing(): void
->executeStatement();
}

/**
* @param string $table
* @return QueryBuilder
*/
public function getQueryBuilder(string $table = 'tt_content'): QueryBuilder
{
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
Expand Down
11 changes: 5 additions & 6 deletions Classes/PageLayoutView/ShortcutPreviewRenderer.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -103,7 +103,7 @@ public function renderPageModulePreviewContent(GridColumnItem $gridColumnItem):
foreach ($shortCutRenderItems as $shortcutRecord) {
$shortcutItem = GeneralUtility::makeInstance(
GridColumnItem::class,
$gridColumnItem->getContext(),
$gridColumnItem->getContext(), // false positive of #102621 in Extension Scanner
$gridColumnItem->getColumn(),
$shortcutRecord
);
Expand DownExpand Up@@ -172,8 +172,8 @@ protected function addShortcutRenderItems(GridColumnItem $gridColumnItem): array
$dataRow['shortcutItems'] = [];
foreach ($collectedItems as $item) {
if ($item) {
$itemObj = $this->recordFactory->createFromDatabaseRow('tt_content', $item);
$renderItems[] = $itemObj; // $this->prepareRecord($itemObj);
$itemObj = $this->recordFactory->createResolvedRecordFromDatabaseRow('tt_content', $item);
$renderItems[] = $itemObj;
}
}
}
Expand DownExpand Up@@ -251,9 +251,8 @@ protected function getFakeItemForPreview(GridColumnItem $gridColumnItem): GridCo
$rawRecord->getComputedProperties(),
$rawRecord->getFullType()
);
$fakeRecord = GeneralUtility::makeInstance(
Record::class,
$rawFakeRecord,
$fakeRecord = $this->recordFactory->createResolvedRecordFromDatabaseRow(
'tt_content',
$fakeRecordDataRow
);
$gridColumnItem->setRecord($fakeRecord);
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -68,29 +68,32 @@ Paste reference uses [**semantic versioning**][5], which means, that

#### 4.3.1 Releases

* for TYPO3 v13: [4.0.3](https://github.com/Kephson/paste_reference/releases/tag/4.0.3)
* for TYPO3 v14: [5.0.0](https://github.com/Kephson/paste_reference/releases/tag/5.0.0)
* for TYPO3 v13: [4.0.5](https://github.com/Kephson/paste_reference/releases/tag/4.0.5)
* for TYPO3 v12: [3.0.5](https://github.com/Kephson/paste_reference/releases/tag/3.0.5)
* for TYPO3 v11: [2.0.5](https://github.com/Kephson/paste_reference/releases/tag/2.0.5)
* for TYPO3 v10: [1.0.3](https://github.com/Kephson/paste_reference/releases/tag/1.0.3)

To get the most recent development for the branch 4, consider installing the
branch instead of the release. The branch
[v4-dev](https://github.com/Kephson/paste_reference/tree/v4-dev) supports also
TYPO3 v14 up to v14.1 and includes unreleased bug-fixes.
TYPO3 v14 up to v14.1 and includes unreleased bug-fixes.
The sub-versions above might not be always the newest, so please check the
[RELEASES](https://github.com/Kephson/paste_reference/releases) instead of relying on the list above.

#### 4.3.2 Branches

The following branches are of interest:

* for TYPO3 v13 and v14: [v4-dev](https://github.com/Kephson/paste_reference/tree/v4-dev)
* for TYPO3 v14: [v5-dev](https://github.com/Kephson/paste_reference/tree/v5-dev)
* for TYPO3 v13: [v4-dev](https://github.com/Kephson/paste_reference/tree/v4-dev)
+ for TYPO3 v12: [TYPO3_12](https://github.com/Kephson/paste_reference/tree/TYPO3_12)
* for TYPO3 v11: [TYPO3_11-5](https://github.com/Kephson/paste_reference/tree/TYPO3_11-5)
* for TYPO3 v10: [TYPO3_10-4](https://github.com/Kephson/paste_reference/tree/TYPO3_10-4)

Note, that releases are usually to prefer, if possible.
The branch [v4-dev](https://github.com/Kephson/paste_reference/tree/v4-dev) is
ahead of the releases currently, so in this case using the branch is better and
gives you most recent development changes.
If it's advisable to install a branch instead of a release, according info can be found in
the issues of the repository.

### 4.4 Contribution

Expand Down
Binary file addedTests/Extensions/test_container.zip
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions Tests/Extensions/test_container/ext_emconf.php

This file was deleted.

8 changes: 0 additions & 8 deletions Tests/Extensions/test_container/ext_localconf.php

This file was deleted.

Empty file.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
<?php

declare(strict_types=1);

/*
* This file is part of the package test/sitepackage.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/

namespace Test\Sitepackage\Controller;

use Psr\Http\Message\ResponseInterface;
use Test\Sitepackage\Domain\Repository\IrreRepository;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;

class IrreController extends ActionController
{
public function __construct(
private readonly IrreRepository $irreRepository
) {}

public function indexAction(): ResponseInterface
{
// $pageId = $this->request->getAttributes()['routing']->getPageId();
$cObj = $this->request->getAttribute('currentContentObject');
$data = $cObj->data; // false positive of #101995 in Extension Scanner
$currentRecord = $this->irreRepository->findByUid((int)$data['uid']);
$childRecords = $this->irreRepository->getChildRecords((int)$data['uid']);
$this->view->assign('data', $data);
$this->view->assign('childRecords', $childRecords);
return $this->htmlResponse();
}

public function showAction(): ResponseInterface
{
// $pageId = $this->request->getAttributes()['routing']->getPageId();
$cObj = $this->request->getAttribute('currentContentObject');
$data = $cObj->data; // false positive of #101995 in Extension Scanner
$currentRecord = $this->irreRepository->findByUid((int)$data['uid']);
$childRecords = $this->irreRepository->getChildRecords((int)$data['uid']);
$this->view->assign('data', $data);
$this->view->assign('childRecords', $childRecords);
return $this->htmlResponse();
}

public function listAction(): ResponseInterface
{
// $pageId = $this->request->getAttributes()['routing']->getPageId();
$cObj = $this->request->getAttribute('currentContentObject');
$data = $cObj->data; // false positive of #101995 in Extension Scanner
$currentRecord = $this->irreRepository->findByUid((int)$data['uid']);
$childRecords = $this->irreRepository->getChildRecords((int)$data['uid']);
$this->view->assign('data', $data);
$this->view->assign('childRecords', $childRecords);
return $this->htmlResponse();
}
}
Loading