patrickdemooij9 / SeoToolkit.Umbraco

SeoToolkit is a SEO package for Umbraco 9, 10, 11, 12 & 13. This package features most functionalities needed for your SEO needs like meta fields, sitemap, robots.txt and much more.
MIT License
34 stars 28 forks source link

Update to dot net core 8 SeoToolkitRedirects | SqliteException: SQLite Error 1: 'no such column: SeoToolkitRedirects.IsEnabled'. #262

Closed DanielOberlechner closed 7 months ago

DanielOberlechner commented 7 months ago

Hi i get the dollowing update error message after updateing to the new version dot net core 8.0

Is there any special step to do. I don;t have it overall enabled only for a few templates ....

Kind regards, Daaniel

DanielOberlechner commented 7 months ago

Solved issue by manually adding this field and make it integer with value 1 ... Probably got forgotten to mention in programming .... now it looks at the first moment as it works

@patrickdemooij9 FYI

DanielOberlechner commented 7 months ago

Issue happened somehow again and now again needs fix. What possible solutions do we have here?

Error happens even if redirect plugin is not installed ....

Kind rergards, Daniel

DanielOberlechner commented 7 months ago

*push this error still exists and bugs me to hell ... can't run softeware anymore to a stable point ....

patrickdemooij9 commented 7 months ago

Hi @DanielOberlechner Do you perhaps have the full stacktrace available for me? It sounds like a migration didn't run correctly for you.

DanielOberlechner commented 7 months ago

` SqliteException: SQLite Error 1: 'no such table: SeoToolkitRedirects'. Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(int rc, sqlite3 db)

Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: SeoToolkitRedirects'. at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements()+MoveNext() at Microsoft.Data.Sqlite.SqliteCommand.GetStatements()+MoveNext() at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReader(CommandBehavior behavior) at Umbraco.Cms.Persistence.Sqlite.Services.SqlitePreferDeferredTransactionsConnection.CommandWrapper.ExecuteDbDataReader(CommandBehavior behavior) at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in C:\projects\dotnet\src\MiniProfiler.Shared\Data\ProfiledDbCommand.cs:line 204 at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.<>cDisplayClass35_0.b0() at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.<>cDisplayClass38_0`1.b0() at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func1 func) at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.Execute[T](Func1 f) at Umbraco.Cms.Infrastructure.Persistence.FaultHandling.FaultHandlingDbCommand.ExecuteDbDataReader(CommandBehavior behavior) at NPoco.Database.<>c__DisplayClass298_0.b__0() at NPoco.Database.ExecutionHook[T](Func1 action) at NPoco.Database.ExecuteReaderHelper(DbCommand cmd) at NPoco.Database.ExecuteDataReader(DbCommand cmd, Boolean sync) at NPoco.AsyncHelper.RunSync[T](Task1 task) at NPoco.Database.QueryImp[T](T instance, Expression1 listExpression, Func2 idFunc, Sql Sql, PocoData pocoData)+MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at NPoco.Database.Fetch[T](Sql sql) at SeoToolkit.Umbraco.Redirects.Core.Repositories.RedirectsRepository.GetByUrls(String[] paths) at SeoToolkit.Umbraco.Redirects.Core.Services.RedirectsService.GetByUrl(Uri uri) at SeoToolkit.Umbraco.Redirects.Core.Middleware.RedirectMiddleware.HandleRedirect(HttpContext context) at SeoToolkit.Umbraco.Redirects.Core.Middleware.RedirectMiddleware.Invoke(HttpContext context) at SeoToolkit.Umbraco.Sitemap.Core.Middleware.SitemapMiddleware.Invoke(HttpContext context, ISitemapGenerator sitemapGenerator, ISitemapIndexGenerator sitemapIndexGenerator) at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

patrickdemooij9 commented 7 months ago

I have tried to reproduce this, but I just can't get it to throw an error. Are you perhaps able to check the database table umbracoKeyValue and then what the value is next to Umbraco.Core.Upgrader.State+SeoToolkit_Redirects_Migration?

DanielOberlechner commented 7 months ago

Screenshot 2024-01-23 at 21 43 12

DanielOberlechner commented 7 months ago

Keep in mind I tinkered around myself quite abit and now I don't know which is the first unttouched database without any of my doings. I created once the table myself, a other time i restored the database (bad idea) ... just letting you know

Evene uninstalling the redirect plugin didn't solve the problem for me just gotta say ....

patrickdemooij9 commented 7 months ago

Hmm, it does say that all migrations are run as expected. What you could try is this:

Though I am suprised to hear that you still have this issue after uninstalling the redirects package. You might want to check your bin folder to see that the DLL has actually been deleted. It might still be there and therefore being loaded into your application.

DanielOberlechner commented 7 months ago

Now it works again. I had no dll installed and simply removed the table you advised me! Thank you so much now I can progress with my website development! Now I simply installed whole paclage with redirect and everything.

Kind regards, Daniel

patrickdemooij9 commented 6 months ago

Great to hear that that worked! Let me know if you run into any other issues!