Skip to content

Plugin assets conflicting with DebugKit #759

@shahways

Description

@shahways

This is a (multiple allowed):

  • bug

  • CakePHP Version: 4.0.7

  • Platform and Target:
    DebugKit 4.1.2
    macOS Catalina 10.15.4
    MAMP with Apache 2.2.34, PHP 7.4.2 and MySQL 5.7.26

What you did

  • Baked a theme-only plugin and added a 'templates' and 'webroot' folder.
  • Created a default.php layout and placed some image, css and js assets in the webroot folder of the plugin.
  • Activated the theme in the AppController in the beforeRender callback.
  • Created a view in the plugin in templates/Pages/test.php

What happened

  • The page keeps pending on the plugin assets (js/img/css). After a minute all the assets return a 500 error.
  • The error.log shows "Error: [PDOException] SQLSTATE[HY000]: General error: 5 database is locked", the stack trace shows 2 lines related to DebugKit (vendor/cakephp/debug_kit/src/ToolbarService.php:256 and vendor/cakephp/debug_kit/src/Middleware/DebugKitMiddleware.php:66)
  • Loading a plugin asset directly through the URL works fine and fast
  • Deleting the tmp/debug_kit.sqlite file had no effect
  • When debug set to false, everything works perfectly

What you expected to happen

When debugging is enabled, plugin assets should be loading just as fast without locking the DebugKit sqlite db.

Additional information

In cakephp/cakephp#757 (#757) at the bottom @allanmcarvalho apparently describes the same situation, but I could not find any related issues here. His screenshot of his browser inspector looks exactly like mine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions