There is a bug that has existed since we started using ABP a year ago. Every time we modify a CRUD page and regenerate the list page (which uses the index.js file), this bug appears. We have an entity called TappProgram that has a child entity named TappProjects. The generated code always includes the incorrect code shown below,
var tappProjectService = window.tapp.dataHub.TappProjects.tappProjects;
whereas the correct code should be as follows:
var tappProjectService = window.tapp.dataHub.tappProjects.tappProjects;
with lowercase t,
it's in this funciton:
function initDataGrids(data) {
initTappProjectGrid(data)
}
function initTappProjectGrid(data) {
if(!abp.auth.isGranted("Tapp.TappProjects")) {
return;
}
var tappProgramId = data.tappProgram.id;
var tappProjectService = window.tapp.dataHub.tappProjects.tappProjects;
var tappProjectCreateModal = new abp.ModalManager({
viewUrl: abp.appPath + "TappProjects/CreateModal",
scriptUrl: abp.appPath + "Pages/TappProjects/createModal.js",
modalClass: "tappProjectCreate"
});
var tappProjectEditModal = new abp.ModalManager({
viewUrl: abp.appPath + "TappProjects/EditModal",
scriptUrl: abp.appPath + "Pages/TappProjects/editModal.js",
modalClass: "tappProjectEdit"
});
var tappProjectDataTable = $("#TappProjectsTable-" + tappProgramId).DataTable(abp.libs.datatables.normalizeConfiguration({
processing: true,
serverSide: true,
paging: true,
searching: false,
scrollX: true,
autoWidth: true,
scrollCollapse: true,
order: [[1, "asc"]],
ajax: abp.libs.datatables.createAjax(tappProjectService.getListByTappProgramId, {
tappProgramId: tappProgramId,
maxResultCount: 5
}),
columnDefs: [
{
rowAction: {
items:
[
{
text: l("Edit"),
visible: abp.auth.isGranted('Tapp.TappProjects.Edit'),
action: function (data) {
tappProjectEditModal.open({
id: data.record.id
});
}
the error causes a front end issue, and the create new button will be broken.
How can we avoid this situation?
Could you fix this issue?
hi any suggestions?
yes, I understand these settings, however, is there a way to customize it to create an inheritance feature.
Here’s the corrected version of your text:
We recently encountered a very strange bug. We updated the emailing settings with our own SMTP credentials, and it worked. However, this morning, the emailing feature stopped working.
I checked the emailing settings page using an admin account, and it showed the default credentials with the original settings, as if we had never changed them back to the original.
I then checked the database, and the AbpSettings table appeared correct—it contained all the correct SMTP information, which is very strange. So, I updated all the fields on the emailing settings page again, and it worked.
I'm concerned that the issue might return. Do you have any suggestions? how can I make sure that it will use the correct smtp?
I need to modify the title and content of the Email Confirmation email template. Is there a way to apply my modifications to all tenants? Or can tenants inherit the title and content from the tenant with tenantId null (host)? so I don't need to update for each tenant one by one.
These modifications involve language texts and text templates.
hi can you look at the question above? or should I create a new ticket?
I need to modify the title and content of the Email Confirmation email template. Is there a way to apply my modifications to all tenants? Or can tenants inherit the title and content from the tenant with tenantId
set to null
(host)? so I don't need to update for each tenant one by one.
These modifications involve language texts and text templates.
thanks your answer, I checked the link you gave me and this one https://abp.io/docs/latest/suite/editing-templates
but could find the instruction on how to use these variables:
%%%%item-dto-properties%%%%item-dto-np-properties%%%%item-dto-nc-properties
this is Server.AppService.ItemCreateDto.txt and I am trying to update it to including my RegularExpression, i.e.:
[RegularExpression(@"^[^<>'""`]*$", ErrorMessage = "Invalid characters detected")]
public new string Address { get; set; }
using System; using System.ComponentModel.DataAnnotations; using System.Collections.Generic;
namespace %%solution-namespace%%%%<if:ApplicationContractsNotExists>%%%%.AppServices%%</if:ApplicationContractsNotExists>%%.%%entity-namespace%% { public %%custom-code-abstract-modifier%% class %%entity-name%%CreateDto%%custom-code-base%% { %%child-master-entity-primary-key%%%%item-dto-properties%%%%item-dto-np-properties%%%%item-dto-nc-properties%% } }
if you ran the project, you can see that it can't pass the validate: ValidateModel()
the error is(same as the login page):
An unhandled exception occurred while processing the request. AbpValidationException: ModelState is not valid! See ValidationErrors for details. Volo.Abp.AspNetCore.Mvc.Validation.ModelStateValidator.Validate(ModelStateDictionary modelState)
Stack Query Cookies Headers Routing AbpValidationException: ModelState is not valid! See ValidationErrors for details. Volo.Abp.AspNetCore.Mvc.Validation.ModelStateValidator.Validate(ModelStateDictionary modelState) Volo.Abp.AspNetCore.Mvc.UI.RazorPages.AbpPageModel.ValidateModel() Tapp.Web.Pages.Account.RegisterModel.RegisterLocalUserAsync() in Register.cshtml.cs + ValidateModel(); Tapp.Web.Pages.Account.RegisterModel.OnPostAsync() in Register.cshtml.cs + user = await RegisterLocalUserAsync(); Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory+GenericTaskHandlerMethod.Convert<T>(object taskAsObject) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory+GenericTaskHandlerMethod.Execute(object receiver, object[] arguments) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger) Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext()