putyourlightson / craft-blitz

Intelligent static page caching for creating lightning-fast sites with Craft CMS.
https://putyourlightson.com/plugins/blitz
Other
149 stars 36 forks source link

Missing stackTrace Column After Updating to CraftCMS 5 #681

Closed viesrood closed 2 months ago

viesrood commented 2 months ago

Bug Report

Hi,

After updating CraftCMS from version 4 to 5, I encountered the following error related to the Blitz plugin:

sql

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'stackTrace' in 'field list'

It appears that the stackTrace column is missing from the blitz_hints table after the update. I tried running the migrations again using:

bash

php craft migrate/all
php craft blitz/migrate

However, the issue persists. Could you please provide guidance on properly resolving this issue, or update the plugin to ensure compatibility with CraftCMS 5?

Thank you for your assistance.

Diagnostics Report

Application Info

Installed Plugins

Loaded Modules

Blitz Plugin Settings

{
    "debug": false,
    "hintsEnabled": true,
    "cachingEnabled": true,
    "refreshCacheEnabled": true,
    "refreshMode": 3,
    "includedUriPatterns": [
        {
            "uriPattern": ".*"
        }
    ],
    "excludedUriPatterns": [
        {
            "uriPattern": "https:\/\/viesrood.nl\/tegeltjeswand\/form"
        },
        {
            "uriPattern": "https:\/\/viesrood.nl\/tegeltjeswand\/"
        }
    ],
    "cacheStorageType": "putyourlightson\\blitz\\drivers\\storage\\FileStorage",
    "cacheStorageSettings": {
        "folderPath": "@webroot\/cache\/blitz",
        "compressCachedValues": ""
    },
    "cacheStorageTypes": [],
    "cacheGeneratorType": "putyourlightson\\blitz\\drivers\\generators\\HttpGenerator",
    "cacheGeneratorSettings": {
        "concurrency": "3"
    },
    "cacheGeneratorTypes": [],
    "customSiteUris": [],
    "cachePurgerType": "putyourlightson\\blitz\\drivers\\purgers\\DummyPurger",
    "cachePurgerSettings": [],
    "cachePurgerTypes": [],
    "deployerType": "putyourlightson\\blitz\\drivers\\deployers\\DummyDeployer",
    "deployerSettings": [],
    "deployerTypes": [],
    "ssiEnabled": false,
    "ssiTagFormat": "<!--#include virtual=\"{uri}\" -->",
    "detectSsiEnabled": true,
    "esiEnabled": false,
    "queryStringCaching": 0,
    "includedQueryStringParams": [
        {
            "queryStringParam": ".*"
        }
    ],
    "excludedQueryStringParams": [
        {
            "queryStringParam": "gclid"
        },
        {
            "queryStringParam": "fbclid"
        }
    ],
    "apiKey": "",
    "generatePagesWithQueryStringParams": true,
    "purgeAssetImagesWhenChanged": true,
    "refreshCacheAutomaticallyForGlobals": true,
    "refreshCacheWhenElementMovedInStructure": true,
    "refreshCacheWhenElementSavedUnchanged": false,
    "refreshCacheWhenElementSavedNotLive": false,
    "cacheNonHtmlResponses": false,
    "trackElements": true,
    "trackElementQueries": true,
    "excludedTrackedElementQueryParams": [],
    "cacheDuration": null,
    "nonCacheableElementTypes": [],
    "sourceIdAttributes": [],
    "liveStatuses": [],
    "integrations": [
        "putyourlightson\\blitz\\drivers\\integrations\\CommerceIntegration",
        "putyourlightson\\blitz\\drivers\\integrations\\FeedMeIntegration",
        "putyourlightson\\blitz\\drivers\\integrations\\SeomaticIntegration"
    ],
    "defaultCacheControlHeader": "no-store",
    "cacheControlHeader": "public, max-age=31536000",
    "cacheControlHeaderExpired": "public, max-age=5",
    "sendPoweredByHeader": true,
    "outputComments": true,
    "refreshCacheJobPriority": 10,
    "driverJobBatchSize": 100,
    "driverJobPriority": 100,
    "queueJobTtr": 300,
    "maxRetryAttempts": 10,
    "maxUriLength": 255,
    "mutexTimeout": 1,
    "commands": [],
    "injectScriptEvent": "DOMContentLoaded",
    "injectScriptPosition": 3
}

Recommendations

Site Tracking

bencroker commented 2 months ago

It looks like the m240310_120000_add_stack_trace failed to run during your upgrade. Can you try removing it from the migrations database table, setting the value of schemaVersion to 5.0.0.0 in the plugins database table, and finally running php craft migrate/all?

viesrood commented 2 months ago

That solved the problem! Thanks a lot!

bencroker commented 2 months ago

Glad to hear it!