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

Exception inside md5() call when there is no backend layout #84

Open
dmitryd opened this issue Jul 14, 2021 · 0 comments
Open

Exception inside md5() call when there is no backend layout #84

dmitryd opened this issue Jul 14, 2021 · 0 comments

Comments

@dmitryd
Copy link

dmitryd commented Jul 14, 2021

We have content elements that use EXT:flux and EXT:fluidcontent. They are in the folder that does not have backend layout assigned. Now, when searching for content element by uid in the Backend and opening them in the List view, I see the exception:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: md5() expects parameter 1 to be string, null given | TypeError thrown in file /var/www/vhosts/xxx/typo3conf/ext/content_defender/Classes/BackendLayout/BackendLayoutConfiguration.php in line 61. Requested URL: https://xxx/typo3/index.php?route=%2Frecord%2Fedit&token=--AnonymizedToken--&edit%5Btt_content%5D%5B9338%5D=edit&returnUrl=%2Fcms%2Ftypo3%2Findex.php%3FM%3Dweb_list%26moduleToken%3D0912ea2b47ce5a3eb74993debaa31333c2d0ca74%26id%3D347

The problem is in EXT:content_defender/Classes/BackendLayout/BackendLayoutConfiguration.php:

    public function getConfigurationByColPos($colPos)
    {
        $configurationIdentifier = md5($this->backendLayout['config']);

Basically it uses non-existing backend layout config. There should be a check. I hotfixed it with

    public function getConfigurationByColPos($colPos)
    {
        $configurationIdentifier = md5((string)$this->backendLayout['config']);

and it works fine for me. I will make a PR but you may want to look for better solution :)

dmitryd added a commit to dmitryd/content_defender that referenced this issue Jul 14, 2021
@dmitryd dmitryd changed the title Exception inside md5() call Exception inside md5() call when there is no backend layout Jul 14, 2021
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