Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to add XML Feed #476

Open
the-robman opened this issue Jun 24, 2024 · 0 comments
Open

Try to add XML Feed #476

the-robman opened this issue Jun 24, 2024 · 0 comments

Comments

@the-robman
Copy link

Hi. If I try to add an XML Feed this way:

eventsFeed = PAGE
eventsFeed {
    typeNum = 123
    config {
        disableAllHeaderCode = 1
        additionalHeaders.10.header = Content-Type:application/xml;charset=utf-8
        ...
    }
    10 = USER
    10 {
        userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
        extensionName = Events2
        pluginName = List
        vendorName = JWeiland

        settings < plugin.tx_events2.settings
        settings {
            pidOfDetailPage = 469
            pidOfListPage = 465
            ...

This is shown:

(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: Undefined array key "pages" in /var/www/html/vendor/jweiland/events2/Classes/Controller/DayController.php line 41

When I change the line 41 from:

$data = $this->request->getAttribute('currentContentObject')->data;
if ($data['pages'] === '0') {
# into
if (array_key_exists('pages', $data) && $data['pages'] === '0') {
# works the feed

System: T3 12.4.16 | events2 9.0.7 | PHP 8.2

A "currentContentObject" not exists this way or is it possible to set the "pages" key in the userFunc config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant