[TASK] Wrap error UnknownElement with proper HTML 76/58176/2
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 4 Sep 2018 05:41:27 +0000 (07:41 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 4 Sep 2018 08:31:40 +0000 (10:31 +0200)
Show the error with a proper markup. Also hightlight type and
render type as code.

Resolves: #86133
Releases: master, 8.7
Change-Id: I79323aaff834c47e6ff875f8a584b2c88f42c51d
Reviewed-on: https://review.typo3.org/58176
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Form/Element/UnknownElement.php

index 3f53ff7..7d5e25a 100644 (file)
@@ -29,7 +29,7 @@ class UnknownElement extends AbstractFormElement
         $type = $this->data['parameterArray']['fieldConf']['config']['type'];
         $renderType = $this->data['renderType'];
         $resultArray = $this->initializeResultArray();
-        $resultArray['html'] = 'Unknown type: ' . $type . ($renderType ? ', render type: ' . $renderType : '') . '<br />';
+        $resultArray['html'] = '<div class="alert alert-warning">Unknown type: <code>' . $type . '</code>' . ($renderType ? ', render type: <code>' . $renderType . '</code>' : '') . '</div>';
         return $resultArray;
     }
 }