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

Clicking on Settings Tab throws "500 Internal Server Error"(Zikula 2.0.14) #3983

Closed
prbt2016 opened this issue Nov 14, 2019 · 5 comments
Milestone

Comments

@prbt2016
Copy link

@prbt2016 prbt2016 commented Nov 14, 2019

Summary : After successful manual installation of Zikula 2.0.14. Clicking on Settings tab throws Oops! An Error Occurred
The server returned a "500 Internal Server Error".

Q A
Zikula Version 2.0.14
PHP Version 5.5.38

Expected Behavior

Settings tab should be loaded properly.

Current Behavior

Settings tab is not loaded properly . It is broken.

test

Error Log thrown in /var/logs/prod.log shows :
request.CRITICAL: Uncaught PHP Exception Symfony\Component\Form\Exception\TransformationFailedException: "Unable to transform value for property path "[UseCompression]": Expected a Boolean." at /home/soft/public_html/manual/zikula2014/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php line 1087 {"exception":"[object] (Symfony\Component\Form\Exception\TransformationFailedException(code: 0): Unable to transform value for property path "[UseCompression]": Expected a Boolean. at /home/soft/public_html/manual/zikula2014/vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:1087, Symfony\Component\Form\Exception\TransformationFailedException(code: 0): Expected a Boolean. at /home/soft/public_html/manual/zikula2014/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/BooleanToStringTransformer.php:51)"} []

Steps to Reproduce

1.Manually Install Zikula 2.0.14
2.Go to Administration panel -> Settings and '500 Internal Server Error' is thrown.

Context

This issue affects fresh installation of Zikula 2.014 and also it affects upgrade (Zikula 2.0.13 ->Zikula 2.0.14). In both cases 'Settings' tab is broken.

Note : I have zlib output compression(zlib.output_compression=On) enabled in php.ini file. This issue isn't present in fresh install of Zikula 2.0.13.

@prbt2016 prbt2016 added the Bug label Nov 14, 2019
@Guite Guite added this to the 2.0.15 milestone Nov 15, 2019
@Guite

This comment has been minimized.

Copy link
Member

@Guite Guite commented Nov 15, 2019

I wasn't able to reproduce this behaviour yet.
Can you please try the following patch?

Replace https://github.com/zikula/core/blob/2.0/src/system/SettingsModule/Controller/SettingsController.php#L52-L60 by:

        $variables = $this->getSystemVars();
        $variables['UseCompression'] = (bool)$variables['UseCompression'];
        $form = $this->createForm(MainSettingsType::class,
            $variables,
            [
                'translator' => $this->get('translator.default'),
                'languages' => $installedLanguageNames,
                'profileModules' => $this->formatModuleArrayForSelect($profileModules),
                'messageModules' => $this->formatModuleArrayForSelect($messageModules)
            ]
        );

I am pretty sure this fixes the problem, but it would be good to have it confirmed.

@Guite

This comment has been minimized.

Copy link
Member

@Guite Guite commented Nov 15, 2019

Sorry I used the wrong branch in my initial response. Please try the latest version I've posted above.

@prbt2016

This comment has been minimized.

Copy link
Author

@prbt2016 prbt2016 commented Nov 18, 2019

Hello @Guite ;

Sorry I used the wrong branch in my initial response. Please try the latest version I've posted above.

Code does work fine but it breaks the Settings->Security->Security Center->HTMLPurifier settings module. Clicking on the HTMLPurifier settings now throws an Internal server error.

test

This is the error log thrown in /var/logs/prod.log

[2019-11-18 12:52:51] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Undefined class constant 'STRING'" at /{{PATH}}/{{TO}}/{{ZIKULA}}/system/SecurityCenterModule/Controller/ConfigController.php line 453 {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Undefined class constant 'STRING' at /{{PATH}}/{{TO}}/{{ZIKULA}}/system/SecurityCenterModule/Controller/ConfigController.php:453)"} []

Could you please test that the above change doesn't break any other dependent module or setting?

@Guite

This comment has been minimized.

Copy link
Member

@Guite Guite commented Nov 18, 2019

This is not related, but caused by a vendor update.
Will fix both.

Thanks for reporting!

Guite added a commit that referenced this issue Nov 18, 2019
@Guite

This comment has been minimized.

Copy link
Member

@Guite Guite commented Nov 18, 2019

Both fixed in 14e4d19

@Guite Guite closed this Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.