Project

General

Profile

Actions

Bug #79407

closed

if <f:alias> contains too many variables in map, it triggers an error-page with a wrong message

Added by Dieter Porth over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-01-22
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If I try to use
<f:alias map="{ editSpeech: {
form: { markerSignStyle: '',
iconPath: '',
signFields: settings.controller.action.parent.speech.parts.all,
menuAction: settings.controller.menu.action.update,
menuDataType: settings.controller.menu.dataType.speech,
menuDataReaction: settings.controller.menu.dataReaction.speech,
menuModel: settings.controller.menu.model.speech,
menuParent: settings.controller.menu.parent.cartoon,
sizeClass: 'small',
mediaIn: mediaIn,
plugIn: plugIn,
speechFields: speechFields,
parent: cartoon
},
rid: { ridSpeech: ridSpeech,
ridSpeechMarkup: ridSpeechMarkup,
ridSpeechForm: ridSpeechForm,
ridSpeechTests: ridSpeechTests,
actionType: settings.controller.action.type.update,
actionParent: settings.controller.action.parent.speech.name.cartoon,
actionFields: settings.controller.action.parent.speech.parts.speech,
ridSpeechFieldText: '{ridSpeech}-{speechFields.text}',
ridSpeechFieldFormText: '{ridSpeechForm}-{speechFields.text}',
ridSpeechFieldJsText: ''
}
}
}"
>

I get the unexpected error-Message "#1238169398: Not all tags were closed! (More information)". The message dont describe the error.
Actually I use aktually the work-around and that works fine.

<f:alias map="{ editSpeechForm: { markerSignStyle: '',
iconPath: '',
signFields: settings.controller.action.parent.speech.parts.all,
menuAction: settings.controller.menu.action.update,
menuDataType: settings.controller.menu.dataType.speech,
menuDataReaction: settings.controller.menu.dataReaction.speech,
menuModel: settings.controller.menu.model.speech,
menuParent: settings.controller.menu.parent.cartoon,
sizeClass: 'small',
mediaIn: mediaIn,
plugIn: plugIn,
speechFields: speechFields,
parent: cartoon
}
}
}"
>
<f:alias map="{editSpeechRid: { ridSpeech: ridSpeech,
ridSpeechMarkup: ridSpeechMarkup,
ridSpeechForm: ridSpeechForm,
ridSpeechTests: ridSpeechTests,
actionType: settings.controller.action.type.update,
actionParent: settings.controller.action.parent.speech.name.cartoon,
actionFields: settings.controller.action.parent.speech.parts.speech,
ridSpeechFieldText: '{ridSpeech}-{speechFields.text}',
ridSpeechFieldFormText: '{ridSpeechForm}-{speechFields.text}',
ridSpeechFieldJsText: ''
}
}
}"
>

It seems to me, that the f:alias-Viewhelper has some undecumented capacity restrictions.

With best regards
Dieter

Actions #1

Updated by Claus Due over 7 years ago

There should be no limit either documented or otherwise - but maybe your formatting is causing the pattern to no longer recognize (parts of) your template? If possible please attempt the same with Fluid standalone (which is included in TYPO3 8.0 and above).

Generally speaking you should try to avoid whitespace including line breaks as part of your array expressions; if there are bugs in the pattern that detects this, it's most likely with unexpected whitespaces. Overall, your syntax itself looks fine.

Actions #2

Updated by Mona Muzaffar about 7 years ago

  • Status changed from New to Needs Feedback

I can't reproduce this error. I tested your code example in TYPO3 7.6 and the current TYPO3 master and it worked just fine.
Can you maybe give us more information about your system?

Actions #3

Updated by Mona Muzaffar about 7 years ago

  • Status changed from Needs Feedback to Closed

As we got no feedback and couldn't reproduce this error I am closing this ticket.

Actions #4

Updated by Dieter Porth about 7 years ago

  • TYPO3 Version changed from 7 to 8

@claus
I have a model, which respect database-normalisation and allow frontendediting.
My construction is not the best way of coding. But I need whitespace to get a little rest of structure in the code.
I value your recommendation to avoid the whitespaces as a ironic joke to the hacking-style.

@ Mona

I got the error with TPO3 7.6 - XAMPP 7.05 - activated xdebug. I closed that development.
It seems to be a parsing-problem.
I got the error although with TYPO 8.7.1 - XAMPP 7.05 - activated xdebug.

I tried it on TYPO3 8.7.1

                                        <f:alias map="{ editSpeechDummy:'',
                                                        editSpeechForm: {   markerSignStyle:        '',
                                                                            iconPath:               '',
                                                                            signFields:             settings.controller.action.parent.speech.parts.all,
                                                                            menuAction:             settings.controller.menu.action.update,
                                                                            menuDataType:           settings.controller.menu.dataType.speech,
                                                                            menuDataReaction:       settings.controller.menu.dataReaction.speech,
                                                                            menuModel:              settings.controller.menu.model.speech,
                                                                            menuParent:             settings.controller.menu.parent.cartoon,
                                                                            sizeClass:              'small',
                                                                            speechFields:           speechFields,
                                                                            parent:                 cartoon
                                                                        }
                                                    }" 
                                        >
                                            <f:alias map="{ editSpeechDummySecond: '',
                                                            editSpeechRid: { ridSpeech:              ridSpeech,
                                                                             ridSpeechMarkup:        ridSpeechMarkup,
                                                                             ridSpeechForm:          ridSpeechForm,
                                                                             ridSpeechTests:         ridSpeechTests,
                                                                             actionType:             settings.controller.action.type.update,
                                                                             actionParent:           settings.controller.action.parent.speech.name.cartoon,
                                                                             actionFields:           settings.controller.action.parent.speech.parts.speech,
                                                                             ridSpeechFieldText:     '{ridSpeech}-{speechFields.text}',
                                                                             ridSpeechFieldFormText: '{ridSpeechForm}-{speechFields.text}',
                                                                             ridSpeechFieldJsText:   ''
                                                                        }
                                                        }" 
                                            >


It works fine. The combinnation to the following will cause a parsing-error.
                                        <f:alias map="{ editSpeechDummy:'',
                                                        editSpeechForm: {   markerSignStyle:        '',
                                                                            iconPath:               '',
                                                                            signFields:             settings.controller.action.parent.speech.parts.all,
                                                                            menuAction:             settings.controller.menu.action.update,
                                                                            menuDataType:           settings.controller.menu.dataType.speech,
                                                                            menuDataReaction:       settings.controller.menu.dataReaction.speech,
                                                                            menuModel:              settings.controller.menu.model.speech,
                                                                            menuParent:             settings.controller.menu.parent.cartoon,
                                                                            sizeClass:              'small',
                                                                            speechFields:           speechFields,
                                                                            parent:                 cartoon
                                                                        },
                                                            editSpeechDummySecond: '',
                                                            editSpeechRid: { ridSpeech:              ridSpeech,
                                                                             ridSpeechMarkup:        ridSpeechMarkup,
                                                                             ridSpeechForm:          ridSpeechForm,
                                                                             ridSpeechTests:         ridSpeechTests,
                                                                             actionType:             settings.controller.action.type.update,
                                                                             actionParent:           settings.controller.action.parent.speech.name.cartoon,
                                                                             actionFields:           settings.controller.action.parent.speech.parts.speech,
                                                                             ridSpeechFieldText:     '{ridSpeech}-{speechFields.text}',
                                                                             ridSpeechFieldFormText: '{ridSpeechForm}-{speechFields.text}',
                                                                             ridSpeechFieldJsText:   ''
                                                                        }
                                                        }" 
                                            >


The error-message contain my partial, which contains parts of my frontend-editing-system.
@

1238169398: Fluid parse error in template partial_Cartoon/CartoonRotation_a2afc4a349d7ae6d9e6d59f7b3d78d236e5688e8, line 295 at character 40. Error: Not all tags were closed! (error code 1238169398). Template source chunk: <f:alias map="{ editSpeechDummy:'', editSpeechForm: { markerSignStyle: '', iconPath: '', signFields: settings.controller.action.parent.speech.parts.all, menuAction: settings.controller.menu.action.update, menuDataType: settings.controller.menu.dataType.speech, menuDataReaction: settings.controller.menu.dataReaction.speech, menuModel: settings.controller.menu.model.speech, menuParent: settings.controller.menu.parent.cartoon, sizeClass: 'small', speechFields: speechFields, parent: cartoon }, editSpeechDummySecond: '', editSpeechRid: { ridSpeech: ridSpeech, ridSpeechMarkup: ridSpeechMarkup, ridSpeechForm: ridSpeechForm, ridSpeechTests: ridSpeechTests, actionType: settings.controller.action.type.update, actionParent: settings.controller.action.parent.speech.name.cartoon, actionFields: settings.controller.action.parent.speech.parts.speech, ridSpeechFieldText: '{ridSpeech}-{speechFields.text}', ridSpeechFieldFormText: '{ridSpeechForm}-{speechFields.text}', ridSpeechFieldJsText: '' } }" > <f:render partial="Speech/Speech" section="main" arguments="{ rid: ridSpeech, speech: speech, parent: cartoon, mediaIn: mediaIn, plugIn: plugIn, editSpeechForm: editSpeechForm, editSpeechRid: editSpeechRid }" /> <porth:burka status="admin_be"> <f:render partial="Forms/Speech/Cartoon/Delete" section="main" arguments="{ rid: ridSpeech, speech: speech, speechFields: speechFields, sizeClass: speechSizeClass, parent: cartoon, mediaIn: mediaIn, plugIn: plugIn }" /> </porth:burka> </f:alias> </f:alias> </f:alias> </f:for> <porth:burka status="admin_be"> <f:render partial="Forms/Speech/Cartoon/Create" section="main" arguments="{ rid: '{ridRotation}_speech-new', speech: speech, speechFields: speechFields, sizeClass: sizeClass, parent: cartoon, mediaIn: mediaIn, plugIn: plugIn }" /> </porth:burka> </div> <f:comment></f:comment> <f:comment></f:comment> <porth:burka status="admin_be"> <f:if condition="{cartoon.rotation}"> <f:then> <f:render partial="Menu/MarkerSign" section="main" arguments="{ rid: ridRotation, ridMarkup: ridRotationMarkup, ridForm: ridRotationForm, pairs: '{ridRotationFormRotation},{ridRotationRotation},{ridRotationJsRotation}', menuAction: menuAction, menuModel: menuModel, menuParent: menuParent, menuDataType: menuDataType, menuDataReaction: menuDataReaction, sizeClass: sizeClassDim, markerSignStyle: '', sign: '{menuModel}-{signFields}{f:if(condition:\'{actionParent}\',then:\'#{actionParent}\',else:\'\')}', iconPath: '' menuTitle: '{f:translate(key:\'LLL:EXT:positioner/Resources/Private/Language/locallang_editing.xlf:frontend.menu.title.button.info.{menuAction}\')}' }" /> <f:render partial="Forms/Rotation" section="main" arguments="{ ridForm: ridRotationForm, rotation: cartoon.rotation, rotationFields: rotationFields, actionType: actionType, actionParent: actionParent, actionFields: actionFields, menuDataReaction: menuDataReaction, mediaIn: mediaIn, plugIn: plugIn, loadtype: settings.frontendEditing.ajaxLoadType, infoText: { error: '{menuModel}-{rotationFields.rotation}', success: '{menuModel}-{rotationFields.rotation}' }, parent: parent }" /> </f:then> </f:if> </porth:burka> </f:alias> </f:alias> </f:alias> </f:section> </body> </html> (More information)

TYPO3Fluid\Fluid\Core\Parser\Exception thrown in file
C:\xampp\htdocs\buergerstimmen\Source\vendor\typo3fluid\fluid\src\Core\Parser\TemplateParser.php in line 156.

@

Actions

Also available in: Atom PDF