Resolved it by changing the migration class:
migrationBuilder.CreateIndex( name: "IX_AppSubscriptionPaymentsExtensionData_SubscriptionPaymentId_Key_IsDeleted", table: "AppSubscriptionPaymentsExtensionData", columns: new[] { "SubscriptionPaymentId", "Key", "IsDeleted" }, unique: true, filter: ""IsDeleted" = false");
Hello,
I have the same issue. I have version 12.3.0 moving from SQL to Postgre. I added this. But still get the error:
And yes followed: https://aspnetboilerplate.com/Pages/Documents/EF-Core-PostgreSql-Integration?searchKey=postgre
protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder);
modelBuilder.Entity<ApplicationLanguageText>()
.Property(p => p.Value)
.HasMaxLength(100); // any integer that is smaller than 10485760
modelBuilder.Entity<SubscriptionPaymentExtensionData>(b =>
{
b.HasQueryFilter(m => !m.IsDeleted)
.HasIndex(e => new { e.SubscriptionPaymentId, e.Key, e.IsDeleted })
.IsUnique()
.HasFilter("\"IsDeleted\" = false");
});
Applying migration '20240807165429_Initial_Migration'. Failed executing DbCommand (305ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] CREATE UNIQUE INDEX "IX_AppSubscriptionPaymentsExtensionData_SubscriptionPaymentId_~" ON "AppSubscriptionPaymentsExtensionData" ("SubscriptionPaymentId", "Key", "IsDeleted") WHERE [IsDeleted] = 0; Npgsql.PostgresException (0x80004005): 42601: erreur de syntaxe sur ou près de « [ »
POSITION: 181
at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|234_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlDataReader.NextResult()
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteNonQuery()
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject)
at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable
1 migrationCommands, IRelationalConnection connection)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c__DisplayClass0_0.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
Exception data:
Severity: ERREUR
SqlState: 42601
MessageText: erreur de syntaxe sur ou près de « [ »
Position: 181
File: scan.l
Line: 1245
Routine: scanner_yyerror
42601: erreur de syntaxe sur ou près de « [ »
POSITION: 181
I am closing because we decided to ugrade from v12 to 13.3
I have the Asp.Net Core MVC Jquery version 12.3.0 I am trying to add a custom widget.
After doing necessary config I ran npm run create-bundles. After that, when loading the dashbaord I get these errors:
TypeError: Cannot read properties of undefined (reading 'defaults') pointing to: app-layout-libs.min.js /* Set the defaults for DataTables initialisation */ $.extend( true, DataTable.defaults, { dom: "<'row'<'col-xs-12 col-md-6'l><'col-xs-12 col-md-6'f>>" + "<'row'<'col-xs-12'tr>>" + "<'row'<'col-xs-12 col-md-5'i><'col-xs-12 col-md-7'p>>", renderer: 'bootstrap' } );
Hello,
I am having issues with the Localization. Currently users are not able to change their language. The flag remains french and the language stays french However, I am able to set the default language as admin. But even then le flag remains French however it switches to the new default language
Gave the same project to a colleague and he ran it with no problem.
So I reinstalled my system and it worked.
I recently am coming accross these errors on the logging page ASP.NET CORE MVC & jQuery .NET 7.0 v12.3.1
Uncaught TypeError: abp.services is undefined <anonymous> https://localhost:44302/view-resources/Areas/App/Views/_Bundles/common-scripts.min.js?v=yzE80BD7kYAKvvWECWXiQgYKMuzJ-MHGMHL61D8d018:6 <anonymous> https://localhost:44302/view-resources/Areas/App/Views/_Bundles/common-scripts.min.js?v=yzE80BD7kYAKvvWECWXiQgYKMuzJ-MHGMHL61D8d018:9
Uncaught TypeError: app.ModalManager is not a constructor <anonymous> https://localhost:44302/view-resources/Views/Shared/Components/TenantChange/Default.js:2 <anonymous> https://localhost:44302/view-resources/Views/Shared/Components/TenantChange/Default.js:53
Uncaught TypeError: app.consts is undefined trySubmitForm https://localhost:44302/view-resources/Views/Account/Login.min.js?v=zCuu3L2lfWMUL0d4XPVBlEXYW7zIL7xMWeH9x0gdpQI:60 setCaptchaToken https://localhost:44302/view-resources/Views/Account/Login.min.js?v=zCuu3L2lfWMUL0d4XPVBlEXYW7zIL7xMWeH9x0gdpQI:46 trySubmitForm https://localhost:44302/view-resources/Views/Account/Login.min.js?v=zCuu3L2lfWMUL0d4XPVBlEXYW7zIL7xMWeH9x0gdpQI:55 handleLogin https://localhost:44302/view-resources/Views/Account/Login.min.js?v=zCuu3L2lfWMUL0d4XPVBlEXYW7zIL7xMWeH9x0gdpQI:7 dispatch https://localhost:44302/view-resources/Areas/App/Views/_Bundles/account-layout-libs.min.js?v=HZIXkg3Jlrqq8HxqxbGYXs75uhUxOpU_nHhuj8kCEBU:5628 handle https://localhost:44302/view-resources/Areas/App/Views/_Bundles/account-layout-libs.min.js?v=HZIXkg3Jlrqq8HxqxbGYXs75uhUxOpU_nHhuj8kCEBU:5432
I am getting this on all my aspnet zero projects
Hello, thanks for your help.
I changed the job signature to this:
public class UpdateStatsVentesMoisJob : AsyncBackgroundJob<StatsVentesMoisJobArgs>, ITransientDependency
Then I created this under DocuPro.Application/DomainServices
using Abp.Domain.Repositories; using DocuPro.CommonBases; using Microsoft.Extensions.Logging; using Stripe; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
namespace DocuPro.DomainServices { public class DomaineServiceDatabaseFunctions: IDomaineServiceDatabaseFunctions {
private readonly IRepository<Periode> _periodeRepository;
private readonly ILogger<DomaineServiceDatabaseFunctions> _logger;
public DomaineServiceDatabaseFunctions(IRepository<Periode> periodeRepository, ILogger<DomaineServiceDatabaseFunctions> logger)
{
_periodeRepository = periodeRepository;
_logger = logger;
}
public async Task UpdateStatsVentesMois(int periodeId)
{
var periode = await _periodeRepository.GetAsync(periodeId);
if (periode == null)
{
_logger.LogWarning($"UpdateStatsVentesMois. Periode with Id {periodeId} not found.");
return;
}
_logger.LogInformation($"UpdateStatsVentesMois. Periode with Id {periodeId} WAS found.");
// Other logic...
}
}
}
But when I execute I get:
WARN 2024-03-04 12:10:33,578 [38 ] .DomainServices.UpdateStatsVentesMoisJob - UpdateStatsVentesMoisJob. Job STARTED. ERROR 2024-03-04 12:10:33,756 [43 ] .DomainServices.UpdateStatsVentesMoisJob - An error occurred while executing UpdateStatsVentesMoisJob for PeriodeId 146. Abp.Domain.Entities.EntityNotFoundException: There is no such an entity. Entity type: DocuPro.CommonBases.Periode, id: 146 at Abp.Domain.Repositories.AbpRepositoryBase`2.GetAsync(TPrimaryKey id) at DocuPro.DomainServices.DomaineServiceDatabaseFunctions.UpdateStatsVentesMois(Int32 periodeId) in C:\Apps\MedicPro Fevrier\MedicPro.All\src\DocuPro.Application\DomainServices\DomaineServiceDatabaseFunctions.cs:line 28