Some assets look empty on Edit Page but are still functionning

Created on 14 June 2024, 6 months ago
Updated 18 August 2024, 4 months ago

Hello, since a few days (from last update?), Asset Injector behaves strangely: some of my CSS assets appears empty when watching their edit page, while some others still displays as usual. Same behavior on Firefox and Opera.

  • In sites/default/files/asset_injector/css, the corresponding css files are still there and aren't empty.
  • I have tried to save again one of these assets, but without effect.
  • The front-end is still displaying as it should, using the right CSS commands (uncompressed CSS).
  • On the asset edit page of the empty assets, .resizable .ace-editor contains nothing.
  • A newly created asset doesn't show this problem. Whereas certain old assets does, and others don't.
  • I have tried to use a different administrative theme, but without effect.

Does someone have an idea about what is going on here?
For now, I am stuck with these assets, as I can't edit them.

Thank you by advance,

🐛 Bug report
Status

Postponed: needs info

Version

2.20

Component

User interface

Created by

🇫🇷France thelmnt

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @thelmnt
  • Status changed to Postponed: needs info 5 months ago
  • 🇩🇪Germany Anybody Porta Westfalica

    Can someone confirm this? We didn't run into this issue yet. Maybe a specific issue / conflict with other modules or ACE on your side? Any further ideas?

    Can you please try to reproduce this on vanilla Drupal or simplytest.me?

  • 🇫🇷France thelmnt

    Hello,
    Thank you for your reply.

    I am not familiar with simplytest.me
    On my website, I have tried to launch a "composer update && drush updb -y" command... which threwed this error (which seems to reffer to Asset Injector at the beginning:

    In ExceptionHandler.php line 56:
    
      SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS "expression"
      FROM
      "key_value" "key_value"
      WHERE ("name" = :db_condition_placeholder_0) AND ("collection" = :db_condition_placeholder_1); Array
      (
          [:db_condition_placeholder_0] => asset.css_js_query_string
          [:db_condition_placeholder_1] => state
      )
    
    
    In StatementWrapperIterator.php line 113:
    
      SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
    
    PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Database/StatementWrapperIterator.php:113
    Stack trace:
    #0 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Database/StatementWrapperIterator.php(113): PDOStatement->execute()
    #1 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Database/Connection.php(851): Drupal\Core\Database\StatementWrapperIterator->execute()
    #2 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Database/Schema.php(178): Drupal\Core\Database\Connection->query()
    #3 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/DatabaseStorage.php(117): Drupal\Core\Database\Schema->tableExists()
    #4 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/CachedStorage.php(95): Drupal\Core\Config\DatabaseStorage->readMultiple()
    #5 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(165): Drupal\Core\Config\CachedStorage->readMultiple()
    #6 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(104): Drupal\Core\Config\ConfigFactory->doLoadMultiple()
    #7 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(89): Drupal\Core\Config\ConfigFactory->doGet()
    #8 /home/[my_user_id]/public_html/web/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(50): Drupal\Core\Config\ConfigFactory->get()
    #9 [internal function]: Drupal\automated_cron\EventSubscriber\AutomatedCron->__construct()
    #10 /home/[my_user_id]/public_html/vendor/symfony/dependency-injection/ContainerBuilder.php(1140): ReflectionClass->newInstanceArgs()
    #11 /home/[my_user_id]/public_html/vendor/symfony/dependency-injection/ContainerBuilder.php(586): Symfony\Component\DependencyInjection\ContainerBuilder->createService()
    #12 /home/[my_user_id]/public_html/vendor/symfony/dependency-injection/ContainerBuilder.php(531): Symfony\Component\DependencyInjection\ContainerBuilder->doGet()
    #13 /home/[my_user_id]/public_html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(105): Symfony\Component\DependencyInjection\ContainerBuilder->get()
    #14 /home/[my_user_id]/public_html/vendor/symfony/http-kernel/HttpKernel.php(115): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
    #15 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(66): Symfony\Component\HttpKernel\HttpKernel->terminate()
    #16 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/DrupalKernel.php(715): Drupal\Core\StackMiddleware\StackedHttpKernel->terminate()
    #17 /home/[my_user_id]/public_html/vendor/drush/drush/src/Boot/DrupalBoot8.php(326): Drupal\Core\DrupalKernel->terminate()
    #18 [internal function]: Drush\Boot\DrupalBoot8->terminate()
    #19 {main}
    
    Next Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 FROM information_schema.tables WHERE ("table_schema" = :db_condition_placeholder_40) AND ("table_name" = :db_condition_placeholder_41); Array
    (
        [:db_condition_placeholder_40] => [my_user_id]
        [:db_condition_placeholder_41] => config
    )
     in /home/[my_user_id]/public_html/web/core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php:56
    Stack trace:
    #0 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Database/Connection.php(883): Drupal\mysql\Driver\Database\mysql\ExceptionHandler->handleExecutionException()
    #1 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Database/Schema.php(178): Drupal\Core\Database\Connection->query()
    #2 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/DatabaseStorage.php(117): Drupal\Core\Database\Schema->tableExists()
    #3 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/CachedStorage.php(95): Drupal\Core\Config\DatabaseStorage->readMultiple()
    #4 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(165): Drupal\Core\Config\CachedStorage->readMultiple()
    #5 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(104): Drupal\Core\Config\ConfigFactory->doLoadMultiple()
    #6 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(89): Drupal\Core\Config\ConfigFactory->doGet()
    #7 /home/[my_user_id]/public_html/web/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(50): Drupal\Core\Config\ConfigFactory->get()
    #8 [internal function]: Drupal\automated_cron\EventSubscriber\AutomatedCron->__construct()
    #9 /home/[my_user_id]/public_html/vendor/symfony/dependency-injection/ContainerBuilder.php(1140): ReflectionClass->newInstanceArgs()
    #10 /home/[my_user_id]/public_html/vendor/symfony/dependency-injection/ContainerBuilder.php(586): Symfony\Component\DependencyInjection\ContainerBuilder->createService()
    #11 /home/[my_user_id]/public_html/vendor/symfony/dependency-injection/ContainerBuilder.php(531): Symfony\Component\DependencyInjection\ContainerBuilder->doGet()
    #12 /home/[my_user_id]/public_html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(105): Symfony\Component\DependencyInjection\ContainerBuilder->get()
    #13 /home/[my_user_id]/public_html/vendor/symfony/http-kernel/HttpKernel.php(115): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
    #14 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(66): Symfony\Component\HttpKernel\HttpKernel->terminate()
    #15 /home/[my_user_id]/public_html/web/core/lib/Drupal/Core/DrupalKernel.php(715): Drupal\Core\StackMiddleware\StackedHttpKernel->terminate()
    #16 /home/[my_user_id]/public_html/vendor/drush/drush/src/Boot/DrupalBoot8.php(326): Drupal\Core\DrupalKernel->terminate()
    #17 [internal function]: Drush\Boot\DrupalBoot8->terminate()
    #18 {main}
      thrown in /home/[my_user_id]/public_html/web/core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php on line 56
    

    On my website, I am also having an error on screen :

    Drupal\Component\Plugin\Exception\PluginNotFoundException: The "current_theme" plugin does not exist. Valid plugin IDs for Drupal\rules\Core\ConditionManager are: response_code, rules_data_comparison, rules_data_is_empty, rules_list_contains, rules_list_count_is, rules_entity_has_field, rules_entity_is_new, rules_entity_is_of_bundle, rules_entity_is_of_type, rules_node_is_of_type, rules_node_is_promoted, rules_node_is_published, rules_node_is_sticky, rules_path_alias_exists, rules_path_has_alias, rules_text_comparison, rules_entity_field_access, rules_user_has_role, rules_user_is_blocked, webform in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
    
    Drupal\Core\Plugin\DefaultPluginManager->getDefinition() (Line: 16)
    Drupal\Core\Plugin\Factory\ContainerFactory->createInstance() (Line: 67)
    Drupal\Core\Condition\ConditionManager->createInstance() (Line: 21)
    Drupal\rules\Core\ConditionManager->createInstance() (Line: 81)
    Drupal\Core\Plugin\DefaultLazyPluginCollection->initializePlugin() (Line: 80)
    Drupal\Component\Plugin\LazyPluginCollection->get() (Line: 26)
    Drupal\Core\Condition\ConditionPluginCollection->get() (Line: 149)
    Drupal\Component\Plugin\LazyPluginCollection->getIterator() (Line: 88)
    Drupal\asset_injector\AssetInjectorAccessControlHandler->checkAccess() (Line: 109)
    Drupal\Core\Entity\EntityAccessControlHandler->access() (Line: 329)
    Drupal\Core\Entity\EntityBase->access() (Line: 175)
    asset_injector_get_assets() (Line: 142)
    _asset_injector_add_element_libraries() (Line: 120)
    asset_injector_page_attachments() (Line: 311)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 395)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 308)
    Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks() (Line: 285)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 284)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
    call_user_func() (Line: 111)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
    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: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
    Drupal\Core\DrupalKernel->handle() (Line: 19)
    

    I hope this would help you to define wether it comes from the Asset Injector module, the interaction with an other module, or my config...

    Best regards

  • hitting this on our instance as well. save, settings show on site, not in Edit on the css asset.

    will probably rollback to .19 until this is addressed.

  • in our instance, it seemed to degrade more and more over time until it basically became non-functioning. flushing cache and running cron would work once or twice and then that didn't. fully deleting and recreating became the answer but it'd started to become every edit, we had to delete and recreate.

  • 🇩🇪Germany Anybody Porta Westfalica

    We still need ways to reproduce this or at least understand how this can happen. I still have no idea, sorry.

Production build 0.71.5 2024