benjaminkott / benjaminkott/bootstrap_package

Controller action via typeNum not executed (depending on TS order)

Open
#1,103 4 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
PHP
Stars
355
Forks
212
Avg merge
1h 4m
Merged PRs (30d)
31

Description

# Support

TYPO3 Version: 10.4.21
Bootstrap Package Version: 11.0.3

## Description

The extension provides static TS included via Template -> Includes and a custom page via typeNum for handling AJAX requests. The TS config is as follows:

```
plugin.tx_mobilityprojects_ajaxapi {
persistence {
storagePid = 3
}
settings {
ajaxPageTypes {
projectUserActions = 1964651634
}
}
}

mobilityprojects_projectuseractions = PAGE
mobilityprojects_projectuseractions {
typeNum < plugin.tx_mobilityprojects_ajaxapi.settings.ajaxPageTypes.projectUserActions
10 < tt_content.list.20.mobilityprojects_ajaxapi

config {
disableAllHeaderCode = 1
additionalHeaders.10.header = Content-Type: application/json
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
}
```

The plugin provides a Controller class which has an action to render JSON (via `\TYPO3\CMS\Extbase\Mvc\View\JsonView`).

When the extension TS is included **before** Bootstrap Package TS, the Controller action is not executed (thus no JSON response).
When the extension TS is included **after** Bootstrap Package TS, the action is executed and the JSON data is returned.

Any idea, why this happens? Or am I missing something very elementary in TS configuration, inheritance or similar?

## Screenshots

Working:
![image](https://user-images.githubusercontent.com/2939625/140172231-2e851094-459b-4564-9874-181305a906a2.png)

Not working:
![image](https://user-images.githubusercontent.com/2939625/140172291-7c30ac6d-95e7-476e-8066-bfd760fba01c.png)

Thanks for getting back. If you need further information, please feel free to ask.

Cheers

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the two static TypoScript inclusion orders and the PAGE/typeNum configuration shown in the report. Determine why the controller action is skipped in one order, then document the cause and a reproducible configuration-level fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.