Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
563 changes: 563 additions & 0 deletions .ddev/.setup/scripts/utils.sh

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions .ddev/.setup/templates/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?php
declare(strict_types=1);

$extensionKey = getenv('EXTENSION_NAME');
$typo3AdminUser = getenv('TYPO3_SETUP_ADMIN_USERNAME');
$typo3AdminPassword = getenv('TYPO3_SETUP_ADMIN_PASSWORD');
$supportedVersions = explode(' ', getenv('TYPO3_VERSIONS'));

// Check if composer.json exists
$composerJsonPath = __DIR__.'/../composer.json';
if (file_exists($composerJsonPath)) {
$composerJsonContent = file_get_contents($composerJsonPath);
$composerData = json_decode($composerJsonContent, true);
$description = $composerData['description'];
} else {
$description = 'composer.json file not found. =(';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $extensionKey; ?></title>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Escape dynamic values before rendering HTML.

Environment values, Composer metadata, versions, and command descriptions are rendered raw. A quote or markup character can break the page or inject HTML into the DDEV landing page.

Proposed pattern
 $supportedVersions = explode(' ', getenv('TYPO3_VERSIONS'));
+
+function h(mixed $value): string
+{
+    return htmlspecialchars((string)$value, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
+}
-    <title><?php echo $extensionKey; ?></title>
+    <title><?php echo h($extensionKey); ?></title>

Apply the same h() wrapper to $description, $version, $usage, $example, $typo3AdminUser, and $typo3AdminPassword; use rawurlencode() for URL path/query components.

Also applies to: 42-42, 49-51, 89-89, 97-98

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.ddev/.setup/templates/index.php at line 23, The DDEV landing page is
rendering dynamic values raw, so escape all HTML-facing variables in the
template before output. Update the rendering in the template that uses
$extensionKey and also the other dynamic fields mentioned in the review
($description, $version, $usage, $example, $typo3AdminUser, and
$typo3AdminPassword) by wrapping them with the existing h() helper, and use
rawurlencode() anywhere values are inserted into URL path or query parts.

<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
>
<style>
.flex {
display: flex;
gap: 10px;
}
</style>
</head>
<body>
<header class="container">
<h1>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="-0.5 -0.5 24 24" id="Typo3-Icon--Streamline-Svg-Logos.svg" height="40" width="40"><path fill="#F49700" d="M9.895582291666667 0.5915863541666667c-0.4094479166666667 0.35015104166666666 -0.7003020833333333 0.7595869791666667 -0.7003020833333333 1.9823292708333333 0 3.32738125 4.19994375 13.322414583333334 7.060448958333334 13.322414583333334 0.32128125 0.004360416666666667 0.6412927083333333 -0.04125625 0.9485583333333334 -0.13522083333333335l-0.0060375 0.0016770833333333334 -0.07309687499999999 0.11725208333333334C14.656414583333333 19.815003125000004 11.685221875 22.70162291666667 9.887244791666667 22.759530208333334L9.832571875000001 22.760416666666668C5.927195833333333 22.760416666666668 0.38405927083333335 10.970137500000002 0.38405927083333335 5.7827270833333335c0 -0.8170270833333334 0.185265 -1.45805625 0.46686645833333335 -1.8563635416666668C2.194099375 2.2849110416666667 6.394071875000001 0.9991703125 9.895582291666667 0.5915863541666667ZM15.379429166666668 0.23958333333333334c3.616366666666667 0 7.236446875 0.5835842708333334 7.236446875 2.6252104166666665 0 4.142515625000001 -2.627055208333333 9.1632 -3.9683864583333337 9.1632 -2.391760416666667 0 -5.372680208333334 -6.652869791666666 -5.372680208333334 -9.980222291666667C13.274809375 0.5304494791666666 13.856541666666667 0.23958333333333334 15.373870833333335 0.23958333333333334h0.0055583333333333335Z" stroke-width="1"></path></svg>
<?php echo $extensionKey; ?></h1>
</header>
<main class="container">
<blockquote><?php echo $description; ?></blockquote>
<hr/>
<p>Run <code>ddev install all</code> to install all TYPO3 instances below:</p>
<?php
foreach ($supportedVersions as $version) {
$directoryPath = '/var/www/html/.Build/'.$version;
if (is_dir($directoryPath)) {
echo "<article class='flex'><kbd>{$version}</kbd><div><strong>Frontend</strong><br/><strong>Backend</strong></div><div><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site'>https://{$version}.{$extensionKey}.ddev.site</a><br/><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site/typo3/?u={$typo3AdminUser}&p={$typo3AdminPassword}'>https://{$version}.{$extensionKey}.ddev.site/typo3</a></div></article>";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Don’t put the backend password in the URL.

Line 49 sends p={$typo3AdminPassword} as a query parameter, which leaks the admin password into browser history, request logs, and referrers. Link to /typo3/ and keep credentials only in the credentials section.

Proposed fix
-            echo "<article class='flex'><kbd>{$version}</kbd><div><strong>Frontend</strong><br/><strong>Backend</strong></div><div><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site'>https://{$version}.{$extensionKey}.ddev.site</a><br/><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site/typo3/?u={$typo3AdminUser}&p={$typo3AdminPassword}'>https://{$version}.{$extensionKey}.ddev.site/typo3</a></div></article>";
+            echo "<article class='flex'><kbd>{$version}</kbd><div><strong>Frontend</strong><br/><strong>Backend</strong></div><div><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site'>https://{$version}.{$extensionKey}.ddev.site</a><br/><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site/typo3/'>https://{$version}.{$extensionKey}.ddev.site/typo3</a></div></article>";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
echo "<article class='flex'><kbd>{$version}</kbd><div><strong>Frontend</strong><br/><strong>Backend</strong></div><div><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site'>https://{$version}.{$extensionKey}.ddev.site</a><br/><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site/typo3/?u={$typo3AdminUser}&p={$typo3AdminPassword}'>https://{$version}.{$extensionKey}.ddev.site/typo3</a></div></article>";
echo "<article class='flex'><kbd>{$version}</kbd><div><strong>Frontend</strong><br/><strong>Backend</strong></div><div><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site'>https://{$version}.{$extensionKey}.ddev.site</a><br/><a target='_blank' href='https://{$version}.{$extensionKey}.ddev.site/typo3/'>https://{$version}.{$extensionKey}.ddev.site/typo3</a></div></article>";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.ddev/.setup/templates/index.php at line 49, The URL generated in the
template output is exposing the backend admin password as a query parameter.
Update the link generation in the index.php template so the Backend link points
only to the TYPO3 login path and remove the p=... parameter from the anchor
href; keep the TYPO3 username/password only in the credentials section or other
non-URL display, and use the existing version, extensionKey, typo3AdminUser, and
typo3AdminPassword symbols to locate the affected echo statement.

} else {
echo "<article>Version {$version} is not installed. Run <code>ddev install {$version}</code> to install.</article>";
}
}
?>
<h2>Additional information</h2>
<h4>DDEV commands</h4>
<?php
// Directories to scan for DDEV commands
$directories = [
'/var/www/html/.ddev/commands/web',
'/var/www/html/.ddev/commands/host',
];

foreach ($directories as $directory) {
foreach (new DirectoryIterator($directory) as $fileInfo) {
Comment on lines +59 to +65

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Skip missing command directories before iterating.

new DirectoryIterator($directory) will fail the landing page if .ddev/commands/host is not present. Guard each directory so projects with only web commands still render.

Proposed fix
 foreach ($directories as $directory) {
+    if (!is_dir($directory)) {
+        continue;
+    }
+
     foreach (new DirectoryIterator($directory) as $fileInfo) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$directories = [
'/var/www/html/.ddev/commands/web',
'/var/www/html/.ddev/commands/host',
];
foreach ($directories as $directory) {
foreach (new DirectoryIterator($directory) as $fileInfo) {
$directories = [
'/var/www/html/.ddev/commands/web',
'/var/www/html/.ddev/commands/host',
];
foreach ($directories as $directory) {
if (!is_dir($directory)) {
continue;
}
foreach (new DirectoryIterator($directory) as $fileInfo) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.ddev/.setup/templates/index.php around lines 59 - 65, The DirectoryIterator
setup in the template should not assume every command directory exists, because
missing `.ddev/commands/host` will break the landing page. Update the loop
around `$directories` and `new DirectoryIterator($directory)` to check that each
directory exists before iterating, so the template still renders when only the
web commands directory is present.

$filePath = $fileInfo->getPathname();
$fileName = $fileInfo->getFilename();

if ('.' === $fileName[0] || $fileInfo->isDir()) {
continue;
}

$fileContent = file($filePath);
if (str_starts_with($fileContent[0], '#!/bin/bash')) {
$description = '';
$usage = '';
$example = '';

foreach ($fileContent as $line) {
if (str_starts_with($line, '## Description:')) {
$description = trim(str_replace('## Description:', '', $line));
} elseif (str_starts_with($line, '## Usage:')) {
$usage = trim(str_replace('## Usage:', '', $line));
} elseif (str_starts_with($line, '## Example:')) {
$example = trim(str_replace('## Example:', '', $line));
}
}

echo "<article><code>ddev $usage</code><br/>$description<br/> <em>Example: $example</em></article>";
}
}
}
?>
<details open>
<summary><h4>TYPO3 Backend Credentials</h4></summary>
<ul>
<li>Username: <code><?php echo $typo3AdminUser; ?></code></li>
<li>Password: <code><?php echo $typo3AdminPassword; ?></code></li>
</ul>
</details>
</main>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
name: typo3-multi-version-extension
repository: konradmichalik/ddev-typo3-multi-version-extension
version: 0.1.0
install_date: "2025-07-31T12:02:23+02:00"
version: 0.3.3
install_date: "2026-06-25T15:55:59+02:00"
project_files:
- .typo3-setup/scripts/utils.sh
- .typo3-setup/templates/index.php
- .typo3-setup/Tests/.typo3-setup/
- .setup/scripts/utils.sh
- .setup/templates/index.php
- .setup/Tests/Acceptance/Fixtures/
- apache/10.conf
- apache/20.conf
- commands/host/launch
- commands/web/.install-11
- commands/web/.install-12
- commands/web/.install-13
- commands/web/.install-14
- commands/web/11
- commands/web/12
- commands/web/13
- commands/web/14
- commands/web/all
- commands/web/install
- docker-compose.typo3-setup.yaml
global_files: []
removal_actions:
- rm ${DDEV_APPROOT}/.ddev/config.typo3-setup.yaml
- rm -f ${DDEV_APPROOT}/.ddev/.typo3-setup/
- rm -rf ${DDEV_APPROOT}/Tests/.typo3-setup/
- rm -f ${DDEV_APPROOT}/.ddev/config.typo3-setup.yaml
- rm -rf ${DDEV_APPROOT}/.ddev/.setup/
17 changes: 7 additions & 10 deletions .ddev/commands/web/.install-11
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

## #ddev-generated
. .ddev/.typo3-setup/scripts/utils.sh
. .ddev/.setup/scripts/utils.sh

# Pre-setup function for TYPO3 version 11.
# This function is part of the installation script and is responsible for performing
# initial setup tasks before the main installation process begins.
pre_setup 11

# Install TYPO3 and related packages using Composer.
# This command installs the TYPO3 base distribution, TYPO3 console, and additional packages.
# Add any additional packages you want to install to the command below.
composer req typo3/cms-base-distribution:'^11.5' \
helhum/typo3-console:'^7.1' \
$PACKAGE_NAME:'*@dev' \
test/sitepackage:'*@dev' \
--no-progress -n -d $BASE_PATH
#_progress " ├─ Install additional composer packages"
# composer req x/y:'^1.0' \
# --no-progress -n -d $BASE_PATH
#_done

# Function to perform post-setup tasks.
# This function is called after the main installation process to finalize the setup.
Expand Down
16 changes: 6 additions & 10 deletions .ddev/commands/web/.install-12
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
#!/bin/bash
set -eo pipefail

## #ddev-generated
. .ddev/.typo3-setup/scripts/utils.sh
. .ddev/.setup/scripts/utils.sh

# Pre-setup function for TYPO3 version 12.
# This function is part of the installation script and is responsible for performing
# initial setup tasks before the main installation process begins.
pre_setup 12

# Install TYPO3 and related packages using Composer.
# This command installs the TYPO3 base distribution, TYPO3 console, and additional packages.
# Add any additional packages you want to install to the command below.
composer req typo3/cms-base-distribution:'^12.4' \
helhum/typo3-console:'^8.1' \
$PACKAGE_NAME:'*@dev' \
test/sitepackage:'*@dev' \
--no-progress -n -d $BASE_PATH
#_progress " ├─ Install additional composer packages"
# composer req x/y:'^1.0' \
# --no-progress -n -d $BASE_PATH
#_done

# Function to perform post-setup tasks.
# This function is called after the main installation process to finalize the setup.
Expand Down
16 changes: 6 additions & 10 deletions .ddev/commands/web/.install-13
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
#!/bin/bash
set -eo pipefail

## #ddev-generated
. .ddev/.typo3-setup/scripts/utils.sh
. .ddev/.setup/scripts/utils.sh

# Pre-setup function for TYPO3 version 13.
# This function is part of the installation script and is responsible for performing
# initial setup tasks before the main installation process begins.
pre_setup 13

# Install TYPO3 and related packages using Composer.
# This command installs the TYPO3 base distribution, TYPO3 console, and additional packages.
# Add any additional packages you want to install to the command below.
composer req typo3/cms-base-distribution:'^13.4' \
helhum/typo3-console:'^8.2.1' \
$PACKAGE_NAME:'*@dev' \
test/sitepackage:'*@dev' \
--no-progress -n -d $BASE_PATH
#_progress " ├─ Install additional composer packages"
# composer req x/y:'^1.0' \
# --no-progress -n -d $BASE_PATH
#_done

# Function to perform post-setup tasks.
# This function is called after the main installation process to finalize the setup.
Expand Down
19 changes: 19 additions & 0 deletions .ddev/commands/web/.install-14
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -eo pipefail

. .ddev/.setup/scripts/utils.sh

# Pre-setup function for TYPO3 version 14
# This function is part of the installation script and is responsible for performing
# initial setup tasks before the main installation process begins.
pre_setup 14

#_progress " ├─ Install additional composer packages"
# composer req x/y:'^1.0' \
# --no-progress -n -d $BASE_PATH
#_done

# Function to perform post-setup tasks.
# This function is called after the main installation process to finalize the setup.
# It typically includes tasks such as configuring settings, modifying files, and other necessary adjustments.
post_setup
2 changes: 1 addition & 1 deletion .ddev/commands/web/11
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Usage: 11
## Example: "ddev 11 composer du -o" or "ddev 11 typo3 cache:flush"

. .ddev/.typo3-setup/scripts/utils.sh
. .ddev/.setup/scripts/utils.sh

command=$@
version=11
Expand Down
3 changes: 1 addition & 2 deletions .ddev/commands/web/12
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/bin/bash

## #ddev-generated
## Description: Exec command for TYPO3 instance 12.
## Usage: 12
## Example: "ddev 12 composer du -o" or "ddev 12 typo3 cache:flush"

. .ddev/.typo3-setup/scripts/utils.sh
. .ddev/.setup/scripts/utils.sh

command=$@
version=12
Expand Down
3 changes: 1 addition & 2 deletions .ddev/commands/web/13
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/bin/bash

## #ddev-generated
## Description: Exec command for TYPO3 instance 13.
## Usage: 13
## Example: "ddev 13 composer du -o" or "ddev 13 typo3 cache:flush"

. .ddev/.typo3-setup/scripts/utils.sh
. .ddev/.setup/scripts/utils.sh

command=$@
version=13
Expand Down
23 changes: 23 additions & 0 deletions .ddev/commands/web/14
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

## Description: Exec command for TYPO3 instance 14.
## Usage: 14
## Example: "ddev 14 composer du -o" or "ddev 14 typo3 cache:flush"

. .ddev/.setup/scripts/utils.sh

command=$@
version=14

if [[ $command == typo3* ]]; then
command="/usr/bin/php vendor/bin/${command}"
fi

TYPO3_PATH=".Build/${version}"
if [ -d "$TYPO3_PATH" ]; then
message magenta "[TYPO3 v${version}] ${command}"
cd $TYPO3_PATH
$command
else
message red "TYPO3 binary not found for version ${version}"
fi
3 changes: 1 addition & 2 deletions .ddev/commands/web/all
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/bin/bash

## #ddev-generated
## Description: Exec command for all TYPO3 instances.
## Usage: all
## Example: "ddev all composer du -o" or "ddev all typo3 cache:flush"

. .ddev/.typo3-setup/scripts/utils.sh
. .ddev/.setup/scripts/utils.sh

command=$@
mapfile -t versions < <(get_supported_typo3_versions)
Expand Down
19 changes: 13 additions & 6 deletions .ddev/commands/web/install
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
#!/bin/bash
#!/usr/bin/env bash

## #ddev-generated
## Description: Install TYPO3 instances.
## Usage: install
## Example: "ddev install" or "ddev install 12" or "ddev install all"
## Description: Install TYPO3 instances. Pass -v/--verbose to stream all command output.
## Usage: install [version|all] [-v|--verbose]
## Example: "ddev install" or "ddev install 12" or "ddev install all" or "ddev install 14 -v"
## MutagenSync: true

TYPO3=${1}
TYPO3=""
for arg in "$@"; do
case "$arg" in
-v|--verbose) export VERBOSE=1 ;;
*) [ -z "$TYPO3" ] && TYPO3="$arg" ;;
esac
Comment on lines +10 to +14

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unknown flags and extra positional args.

This loop keeps only the first non-verbose token. ddev install 14 foo silently drops foo, and a typo like ddev install --verbsoe 14 gets reported as an unsupported TYPO3 version instead of an unknown option.

Suggested guard
 TYPO3=""
 for arg in "$@"; do
     case "$arg" in
         -v|--verbose) export VERBOSE=1 ;;
-        *) [ -z "$TYPO3" ] && TYPO3="$arg" ;;
+        -*)
+            message red "Unknown option: $arg"
+            exit 1
+            ;;
+        *)
+            if [ -z "$TYPO3" ]; then
+                TYPO3="$arg"
+            else
+                message red "Unexpected extra argument: $arg"
+                exit 1
+            fi
+            ;;
     esac
 done
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
for arg in "$@"; do
case "$arg" in
-v|--verbose) export VERBOSE=1 ;;
*) [ -z "$TYPO3" ] && TYPO3="$arg" ;;
esac
TYPO3=""
for arg in "$@"; do
case "$arg" in
-v|--verbose) export VERBOSE=1 ;;
-*)
message red "Unknown option: $arg"
exit 1
;;
*)
if [ -z "$TYPO3" ]; then
TYPO3="$arg"
else
message red "Unexpected extra argument: $arg"
exit 1
fi
;;
esac
done
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.ddev/commands/web/install around lines 10 - 14, The argument parsing in the
install command currently accepts any unknown token and silently ignores extra
positional arguments after the first version value. Update the loop in the
command script to explicitly recognize only the supported flags and a single
TYPO3 version argument, and reject any unknown option or second positional value
with an error. Keep the logic centered around the existing VERBOSE handling and
TYPO3 assignment so typos like unsupported flags are reported correctly.

done

. .ddev/.typo3-setup/scripts/utils.sh
. .ddev/.setup/scripts/utils.sh

if [ "$TYPO3" == "all" ]; then
mapfile -t versions < <(get_supported_typo3_versions)
Expand Down
6 changes: 3 additions & 3 deletions .ddev/config.typo3-setup.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
type: php
docroot: .Build
webserver_type: apache-fpm
additional_hostnames:
- 11.xima-typo3-internal-news
- 12.xima-typo3-internal-news
- 13.xima-typo3-internal-news
- 14.xima-typo3-internal-news
hooks:
post-start:
- exec: mkdir -p /var/www/html/.Build/ && cp /var/www/html/.ddev/.typo3-setup/templates/* /var/www/html/.Build/
- exec: mkdir -p /var/www/html/.Build/ && cp /var/www/html/.ddev/.setup/templates/* /var/www/html/.Build/
4 changes: 2 additions & 2 deletions .ddev/docker-compose.typo3-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
- EXTENSION_KEY=xima_typo3_internal_news
- EXTENSION_NAME=xima-typo3-internal-news
- PACKAGE_NAME=xima/xima-typo3-internal-news
- TYPO3_VERSIONS=12 13
- TYPO3_VERSIONS=13 14
- SYMLINK_EXCLUSIONS=.* Documentation Documentation-GENERATED-temp var vendor public

# TYPO3 v11 and v12 config
Expand All @@ -21,7 +21,7 @@ services:
- TYPO3_INSTALL_SITE_SETUP_TYPE=site
- TYPO3_INSTALL_WEB_SERVER_CONFIG=apache

# TYPO3 v13 config
# TYPO3 v13 and v14 config
- TYPO3_DB_DRIVER=mysqli
- TYPO3_DB_USERNAME=root
- TYPO3_DB_PASSWORD=root
Expand Down
9 changes: 9 additions & 0 deletions Configuration/page.tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mod {
web_layout {
backendLayouts {
default {
jsFile = EXT:xima_typo3_internal_news/Resources/Public/JavaScript/backend.js
}
}
}
}
Comment on lines +1 to +9

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify how TYPO3 13/14 parses page.tsconfig backendLayouts key casing
# and whether the generated backend layout is registered.

# Check for custom BackendLayoutDataProvider or jsFile usage
rg -n "jsFile" --type-add 'typo3:*.{php,tsconfig}' -t typo3

# Check for extension code that might read this PageTSConfig path
rg -n "BackendLayouts|backendLayouts" --type-add 'typo3:*.{php,tsconfig}' -t typo3

# Check if there's a custom data provider
rg -n "PageTsBackendLayoutDataProvider|BackendLayoutDataProvider" --type-add 'typo3:*.php' -t typo3

Repository: xima-media/xima-typo3-internal-news

Length of output: 173


Fix missing backend layout grid definition and correct TSconfig key casing

The current Configuration/page.tsconfig snippet will not register a functional backend layout in TYPO3 13/14 because it lacks the required config.backend_layout grid definition and uses incorrect key casing. The core PageTsBackendLayoutDataProvider expects mod.web_layout.BackendLayouts (capital B and L) and requires each entry to contain a config.backend_layout block with colCount, rowCount, and rows definitions. Additionally, jsFile is not a valid property for backend layout definitions at this level and is ignored.

Update the file to match the standard structure:

  1. Change backendLayouts to BackendLayouts.
  2. Add a config.backend_layout block with the grid definition.
  3. Remove jsFile (load custom JavaScript via mod.SHARED.javascriptFile or service registration instead).
Corrected structure example
mod {
    web_layout {
        BackendLayouts {
            default {
                title = Default Layout
                config {
                    backend_layout {
                        colCount = 2
                        rowCount = 1
                        rows {
                            1 {
                                columns {
                                    1 {
                                        name = Main
                                        colPos = 0
                                    }
                                    2 {
                                        name = Sidebar
                                        colPos = 1
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Configuration/page.tsconfig` around lines 1 - 9, The backend layout
definition is using the wrong TSconfig key casing and is missing the required
grid config, so update the PageTsBackendLayoutDataProvider-compatible structure
in Configuration/page.tsconfig by renaming backendLayouts to BackendLayouts and
adding a config.backend_layout block with colCount, rowCount, and rows for the
default entry. Remove the jsFile property from this backend layout definition,
since it is ignored here, and if JavaScript must be loaded, do it via
mod.SHARED.javascriptFile or another supported registration path.

1 change: 1 addition & 0 deletions Resources/Public/Stylesheets/Backend.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ small {

.internal-news--top {
margin-bottom: 1em;
align-self: flex-start;
}

.internal-news--next-dates {
Expand Down
Loading