I'm getting this error while changing stylesheet. This is the only thing that shows up on the screen. How do I begin to debug this? Reverting doesn't do anything. I've tried cache flush and setup upgrade also deleted var/cache/* var/generation/* var/page_cache/* var/view_preprocessed/* generated/* pub/static and rebuilt. Same error

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\View\Page\Config\Renderer::canTypeBeFont() must be of the type string, null given, called in /chroot/home/a59125d9/domain.com/pub/vendor/magento/framework/View/Page/Config/Renderer.php on line 360 and defined in /chroot/home/a59125d9/domain.com/pub/vendor/magento/framework/View/Page/Config/Renderer.php:439 Stack trace: #0 /chroot/home/a59125d9/domain.com/pub/vendor/magento/framework/View/Page/Config/Renderer.php(360): Magento\Framework\View\Page\Config\Renderer->canTypeBeFont(NULL) #1 /chroot/home/a59125d9/domain.com/pub/vendor/magento/module-developer/Model/View/Page/Config/ClientSideLessCompilation/Renderer.php(75): Magento\Framework\View\Page\Config\Renderer->addDefaultAttributes(NULL, ' media="print"') #2 /chroot/home/a59125d9/domain.com/pub/vendor/magento/framework/View/Page/Config/Renderer.php(422): Magento\Developer\Model\View\Page\Config\ClientSideLessCompilation\Renderer->addDefaultA in /chroot/home/a59125d9/domain.com/pub/vendor/magento/framework/View/Page/Config/Renderer.php on line 439

2 Answers 2


One solution is to put Frontend Development Workflow back to server side less compilation

System > Configuration > Advanced > Developer > Frontend Development Workflow = Server Side Less Compilation

or via ssh

bin/magento config:set dev/front_end_development_workflow/type server_side_compilation

can comment the lines around 360 vendor/magento/framework/View/Page/Config/Renderer.php

    //if ($this->canTypeBeFont($contentType)) {
    //    return 'rel="preload" as="font" crossorigin="anonymous"';

only at the time of frontend work, then uncomment it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.