Hello.

Thank you for the Corporate Clean theme. I'm using Drupal 11, as well as Corporate Clean 1.0.5, and I want to create a subtheme based on the Corporate Clean theme.
 
The Corporate Clean theme is saved under /themes/contrib, and I've tried to save my subtheme under /themes/custom. When I select the Corporate Clean Subtheme as the default, the site is crashing, and I get the message "The website encountered an unexpected error. Try again later."

Please, note that when I create a subtheme for other themes, for example, the Olivero, it works perfectly fine, it doesn't crash. However, if I create a subtheme for BaseCore 1.0.4 theme, it crashes as well.
 
I need to create the subtheme in order to style the regions and blocks, either by overriding the already existing template by adding my custom twig files, or either by adding my custom CSS classes to the corresponding CSS files. But I realize, I need a subtheme for this, unless I'm wrong.
 
Please, could you inform me whether there is any known issue between Corporate Clean 1.0.5 and Drupal 11 when it comes to creating a subtheme? Please, feel free to correct me if I haven't realized something obvious. Your reply would be so much appreciated.

Thank you very much in advance.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    rossescob created an issue. See original summary.

    rossescob’s picture

    Issue summary: View changes
    rossescob’s picture

    Issue summary: View changes
    ravi kant’s picture

    Message "The website encountered an unexpected error. Try again later." is not actual error message.
    Add $config['system.logging']['error_level'] = 'verbose'; in settings.php and clear cache.
    Now refresh the page and check the error message.
    Also share full message here.

    rossescob’s picture

    Thank you for your message. I added what you said, and now the whole message is the following:

    The website encountered an unexpected error. Try again later.

    TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /home/********/*******.**/themes/contrib/basecore/basecore.theme on line 1510 in Drupal\Component\Utility\Html::escape() (line 433 of core/lib/Drupal/Component/Utility/Html.php).
    basecore_page_attachments_alter() (Line: 491)
    Drupal\Core\Theme\ThemeManager->alterForTheme() (Line: 500)
    Drupal\Core\Theme\ThemeManager->alter() (Line: 324)
    Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks() (Line: 289)
    Drupal\Core\Render\MainContent\HtmlRenderer->{closure:Drupal\Core\Render\MainContent\HtmlRenderer::prepare():288}() (Line: 622)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 288)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 131)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() (Line: 246)
    Symfony\Component\EventDispatcher\EventDispatcher::{closure:Symfony\Component\EventDispatcher\EventDispatcher::optimizeListeners():241}() (Line: 206)
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 188)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
    Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
    Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715)
    Drupal\Core\DrupalKernel->handle() (Line: 19)

    So, taking into account the above, is it the BaseCore theme (where the Corporate Clean is based on) that is actually crashing?

    svetlio’s picture

    You might be interested to use corporateclean as starterkit theme.
    This way you will be able to create a "duplicate" of corporateclen but under your_themename. So in result your theme will be identical to corporateclen, at least in the beginning, unless you start to change stiles, templates, etc. in your_themename directories. Fallow https://www.drupal.org/docs/core-modules-and-themes/core-themes/starterk... to learn how.

    cindyr’s picture

    I too am using Drupal 11, and just tried to install Corporate Clean 1.0.5 via Composer. I received two errors. During the composer process it returned this error:

    In Filesystem.php line 305:
                                                                                   
      Could not delete /home/user.../public_html/mysite/sites/default/default.settings.php: 

    When I go to Appearance and try to enable the theme, it displays:

    Requires: basecore (missing)
    This theme requires the base theme basecore to operate correctly.

    I then installed BaseCore via Composer and received the same process error as above (not able to delete the file). However, the installation did allow me to then use Corporate Clean as a theme. The dependency just hasn't been included.