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

Flux 9.3.2 > 9.4.0 Error in Frontend #1791

Closed
the-hotmann opened this issue Jun 2, 2020 · 8 comments
Closed

Flux 9.3.2 > 9.4.0 Error in Frontend #1791

the-hotmann opened this issue Jun 2, 2020 · 8 comments

Comments

@the-hotmann
Copy link

Ater updating to FLUX 9.4.0 I get the error
"Please select a page template in page properties."

I think it must be a simple error as this never ever happend before.
I had to restore a Backup to make it go away.
If additional Infos (like trace) is needed just tell me

@MatthiasPeltzer
Copy link

Hi... same behaviour here. It´s in:
flux\Resources\Private\Templates\Page\Default.html

{namespace flux=FluidTYPO3\Flux\ViewHelpers}
Please select a page template in page properties. <-- That´s the problem
<f:section name="Configuration">
<flux:form id="default" />
</f:section>

@fnagel
Copy link
Contributor

fnagel commented Jun 2, 2020

See here how to workaround: #1733

@the-hotmann
Copy link
Author

@NamelessCoder do you think you can fiy that permanently so this does not come again?
As with teh next update this automatically will again show up.

page.5 >

This did the trick but I think as soon as someone installs the extension there should not be any notice like this.

@NamelessCoder
Copy link
Member

@Martinh0 Sounds like you need to implement that line of TS in a TS file/record that's not part of Flux. The line unsets the object added by Flux so you can add it literally anywhere that loads after Flux is loaded - in another extension's ext_localconf.php or in a TS record, for example in the place where you define your own PAGE object. You're not supposed to put that line in the TS templates delivered by Flux.

Alternatively you can disable the "autload" Flux option in EM or "Settings" admin module, depending on version. Disabling the option converts the automatically loaded TS to a static include that you would have to manually include to add the page.5 object.

To be clear: page.5 is defined by Flux to allow page templating to work without the need to write any TS - if you don't wish to use Flux page templates, you can unset that object and define your own. And since you don't wish to use Flux's page template system you almost certainly have a TS template that already contains a page = PAGE definition which would be the perfect place to add that line.

@the-hotmann
Copy link
Author

Yes I just thought it would make more sense to just activate this in "Debug-Mode" as this is just a Debug thing as far as I understand it. Like you wanna know if your Template gets rendered. But just having the optinon to disable it via TS is kinds strange fore me. Normally nothing should ever get rendered unles you activate it.

Also I tried to deactivate the autload Flux option but this did not work... seems like its hardcoded

@NamelessCoder
Copy link
Member

The TS inclusion is not a debug-only thing, not just for determining if your template is rendered - but to automatically create the necessary PAGE TS object that is capable of rendering Flux page templates.

Normally nothing should ever get rendered unles you activate it.

Part of the purpose of Flux is to prevent the need for extensive manual configuration and deep knowledge of TYPO3 configuration before you can get started. So in this case it actually should be rendered without you activating it. That said, the option to disable it is included, either through TS or disabling autoload.

Also I tried to deactivate the autload Flux option but this did not work... seems like its hardcoded

I found a bug in that regard, see linked commit. Will be fixed in 9.4.1.

@the-hotmann
Copy link
Author

I found a bug in that regard, see linked commit. Will be fixed in 9.4.1.

Aaaah thank you! Thats the only thing I wanted. A simple method to deactivate this via options/setting and not having to do it via TS.

Thank you!

@fabarea
Copy link
Member

fabarea commented Jun 7, 2020

I think there is still an issue with the plug-and-play feature which will soon pop up.
Using the built-in PHP function realpath does not work on non existing files and can not be used to "resolve a path" as in:

https://github.com/FluidTYPO3/flux/blob/development/Classes/Content/TypeDefinition/FluidFileBased/DropInContentTypeDefinition.php#L78

Some people have written custom functions for that:

https://stackoverflow.com/questions/20522605/what-is-the-best-way-to-resolve-a-relative-path-like-realpath-for-non-existing

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

5 participants