Hey,
I tried to reproduce the issue with the latest version of abp (7.2.2 as of today) and I could not reproduce the issue. I implemented it as described here: https://github.com/nebula2/abp-qa-5139
Can you please check if the issue occurs using the latest version?
kind regards Jack
Hello, the issues seem to come from issues with database migrations.
TLDR: Clean up duplicates and ensure migrations are all created and applied.
Duplicate feature name: Account.EnableLdapLogin
Please check the AbpFeatures
-Table for any duplicate entries and remove duplicates
Also take a look at the AbpFeatureValues
-Table and ensure that you do not delete the one that is already in use.
Invalid object name 'AbpLocalizationResources
This says that the table is missing. When you check your database you should see that this table not there.
Please create a new migration and check if that creates a class which adds/ manipulates tables. If that's the case, apply it. If not, make sure that your migrations are all applied. To do that, check your EntityFrameworkCore-Project and open the migrations folder
after that, open your databases __EFMigrationsHistory
-Table
If they do not match, run DbMigrator
Hope this helps.
Kind regards Jack
Hey,
In line 52 it says:
1>D:\Teams\project\aspnet-core\modules\Volo.Account.Pro\src\Volo.Abp.Account.Pro.Installer\Volo.Abp.Account.Pro.Installer.csproj : error NU1102: Unable to find package Volo.Abp.Studio.ModuleInstaller with version (>= 7.2.2)
Please take a look at your csproj files and search for
Volo.Abp.Studio.ModuleInstaller
The latest version of that package is 5.3.5 as you can see here. https://www.nuget.org/packages/Volo.Abp.Studio.ModuleInstaller/ So simply change 7.2.2 to 5.3.5
It may well be that the other projects fail to build because of that error. Can you please make described changes and check again?
Hi,
let me rephrase just to ensure that I understood your issue.
You can archieve that by implementing your own IBlobFilePathCalculator
as described here:
https://docs.abp.io/en/abp/latest/Blob-Storing-File-System#file-path-calculation
An example would look as follows:
using System.IO;
using Volo.Abp.BlobStoring;
using Volo.Abp.BlobStoring.FileSystem;
using Volo.Abp.Settings;
namespace app;
public class MyBlobFilePathCalculator : IBlobFilePathCalculator
{
private readonly ISettingProvider _settingProvider;
public MyBlobFilePathCalculator(ISettingProvider settingProvider)
{
_settingProvider = settingProvider;
}
public string Calculate(BlobProviderArgs args)
{
string basePath = _settingProvider.GetOrNullAsync("MySetting").Result;
return Path.Combine(basePath, args.ContainerName, args.BlobName);
}
}
Hi,
You can change the title of your page by configuring a branding provider like described here:
https://docs.abp.io/en/abp/latest/UI/AspNetCore/Branding
The title will be set from what you define as AppName
For your blazor server application, you may check the _Host.cshtml
file and replace the string inside <title></title>
Please let me know if that works for you or if you have any additional questions in that matter :)
Thank you liangshiwei and sorry for the late response.
I ended up with something like this:
@model Microsoft.AspNetCore.Diagnostics.ExceptionHandlerFeature
@{
Layout = "_Layout";
ViewData["Title"] = "Error";
}
<div class="container">
<h1>Oops! Something went wrong.</h1>
<p>We're sorry, but an error has occurred. Please try again later.</p>
@if (Model?.Error != null)
{
<p>@Model.Error.Message</p>
}
<p>If you continue to experience problems, please contact <a href="mailto:support@example.com">support@example.com</a>.</p>
</div>
I was kind of irritated that I needed to provide a page because I assumed that the LeptonXErrorViewComponent
would still handle that.
Hi,
Sorry for the bad experience, we will fix those problems, and your ticket refunded.
About the Issue 3 - CmsKit - cannot upload images
It's not related to ABP, you can see: https://support.abp.io/QA/Questions/4474/Upload-file-Did-not-receive-any-data-in-the-allotted-time
Hi liangshiwei, thank you very much. Sorry for not finding the answer to Issue 3 myself - suggested fix works like a charm.
Issue 1 is left but not important for me at the moment.
Regarding issue 5 - I could not reproduce it locally so I thought it was a misconfiguration of my prod server. Now I am not sure anymore. Need to wait for https://support.abp.io/QA/Questions/4894/Public-site-MVC-error-handling-does-not-work-when-CmsKit-is-enabled
From my perspective we can close this issue. If 4894 is fixed and the forwarding thing still persists, I'll make that reproducable and open another ticket.
Something from CmsKit is overriding the MVC error handling - resulting in redirects of doom.
[15:36:44 INF] Request starting HTTP/2 GET https://localhost:44360/pupsi - -
[15:36:44 INF] Executing endpoint '/Public/CmsKit/Pages/Index'
[15:36:44 INF] Route matched with {page = "/Public/CmsKit/Pages/Index", action = "", controller = "", area = ""}. Executing page /Public/CmsKit/Pages/Index
[15:36:44 INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
[15:36:44 INF] Executing handler method Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages.IndexModel.OnGetAsync - ModelState is Valid
[15:36:44 WRN] Could not find IdentityClientConfiguration for CmsKitPublic. Either define a configuration for CmsKitPublic or set a default configuration.
[15:36:44 INF] Start processing HTTP request GET https://localhost:44322/api/cms-kit-public/pages/pupsi?api-version=1.0
[15:36:44 INF] Sending HTTP request GET https://localhost:44322/api/cms-kit-public/pages/pupsi?api-version=1.0
[15:36:44 INF] Received HTTP response headers after 18.9676ms - 204
[15:36:44 INF] End processing HTTP request after 19.065ms - 204
[15:36:44 INF] Executed handler method OnGetAsync, returned result Microsoft.AspNetCore.Mvc.NotFoundResult.
[15:36:44 INF] Executing StatusCodeResult, setting HTTP status code 404
[15:36:44 INF] Executed page /Public/CmsKit/Pages/Index in 19.9671ms
[15:36:44 INF] Executed endpoint '/Public/CmsKit/Pages/Index'
[15:36:44 INF] Request finished HTTP/2 GET https://localhost:44360/pupsi - - - 302 - - 21.5203ms
[15:36:44 INF] Request starting HTTP/2 GET https://localhost:44360/Error?httpStatusCode=404 - -
[15:36:44 INF] Executing endpoint '/Public/CmsKit/Pages/Index'
[15:36:44 INF] Route matched with {page = "/Public/CmsKit/Pages/Index", action = "", controller = "", area = ""}. Executing page /Public/CmsKit/Pages/Index
[15:36:44 INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
[15:36:44 INF] Executing handler method Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages.IndexModel.OnGetAsync - ModelState is Valid
[15:36:44 WRN] Could not find IdentityClientConfiguration for CmsKitPublic. Either define a configuration for CmsKitPublic or set a default configuration.
[15:36:44 INF] Start processing HTTP request GET https://localhost:44322/api/cms-kit-public/pages/Error?api-version=1.0
[15:36:44 INF] Sending HTTP request GET https://localhost:44322/api/cms-kit-public/pages/Error?api-version=1.0
[15:36:44 INF] Received HTTP response headers after 18.3062ms - 204
[15:36:44 INF] End processing HTTP request after 18.401ms - 204
[15:36:44 INF] Executed handler method OnGetAsync, returned result Microsoft.AspNetCore.Mvc.NotFoundResult.
[15:36:44 INF] Executing StatusCodeResult, setting HTTP status code 404
[15:36:44 INF] Executed page /Public/CmsKit/Pages/Index in 19.2325ms
[15:36:44 INF] Executed endpoint '/Public/CmsKit/Pages/Index'
[15:36:44 INF] Request finished HTTP/2 GET https://localhost:44360/Error?httpStatusCode=404 - - - 302 - - 20.6696ms
[15:36:44 INF] Request starting HTTP/2 GET https://localhost:44360/Error?httpStatusCode=404 - -
[15:36:44 INF] Executing endpoint '/Public/CmsKit/Pages/Index'
[15:36:44 INF] Route matched with {page = "/Public/CmsKit/Pages/Index", action = "", controller = "", area = ""}. Executing page /Public/CmsKit/Pages/Index
[15:36:44 INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
[15:36:44 INF] Executing handler method Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages.IndexModel.OnGetAsync - ModelState is Valid
[15:36:44 WRN] Could not find IdentityClientConfiguration for CmsKitPublic. Either define a configuration for CmsKitPublic or set a default configuration.
[15:36:44 INF] Start processing HTTP request GET https://localhost:44322/api/cms-kit-public/pages/Error?api-version=1.0
[15:36:44 INF] Sending HTTP request GET https://localhost:44322/api/cms-kit-public/pages/Error?api-version=1.0
[15:36:44 INF] Received HTTP response headers after 18.1934ms - 204
[15:36:44 INF] End processing HTTP request after 18.2671ms - 204
[15:36:44 INF] Executed handler method OnGetAsync, returned result Microsoft.AspNetCore.Mvc.NotFoundResult.
[15:36:44 INF] Executing StatusCodeResult, setting HTTP status code 404
[15:36:44 INF] Executed page /Public/CmsKit/Pages/Index in 18.8792ms
[15:36:44 INF] Executed endpoint '/Public/CmsKit/Pages/Index'
[15:36:44 INF] Request finished HTTP/2 GET https://localhost:44360/Error?httpStatusCode=404 - - - 302 - - 20.2102ms
[15:36:44 INF] Request starting HTTP/2 GET https://localhost:44360/Error?httpStatusCode=404 - -
[15:36:44 INF] Executing endpoint '/Public/CmsKit/Pages/Index'
[15:36:44 INF] Route matched with {page = "/Public/CmsKit/Pages/Index", action = "", controller = "", area = ""}. Executing page /Public/CmsKit/Pages/Index
[15:36:44 INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
[15:36:44 INF] Executing handler method Volo.CmsKit.Public.Web.Pages.Public.CmsKit.Pages.IndexModel.OnGetAsync - ModelState is Valid
[15:36:44 WRN] Could not find IdentityClientConfiguration for CmsKitPublic. Either define a configuration for CmsKitPublic or set a default configuration.
[15:36:44 INF] Start processing HTTP request GET https://localhost:44322/api/cms-kit-public/pages/Error?api-version=1.0
And so on... this now repeats.
abp get-source Volo.Abp.LeptonXTheme.Pro
LeptonXDemoAppWebModule
move app.UseErrorPage()
outside of the development clause/pupsi
or something else that obviously does not existTo "fix" the behavior, go to LeptonXDemoAppGlobalFeatureConfigurator
and Change cmsKit.EnableAll()
to cmsKit.DisableAll()
and repeat above steps.
create a new commercial abp solution
Blazor, EF Core, PostgresDb (but should not matter), Public Site with CmsKit
Issue 1 - package.json on new projects
error An unexpected error occurred: "C:\\Repos\\jf\\cmskit-repro\\src\\CmsKitIssue.Web.Public\\package.json: Unexpected token } in JSON at position 196".
This is due to the comma. needed to remove that and run abp install-libs
again
After that, run migrations and all that stuff. If you now try to start the blazor app
Issue 2 - flag-icon-css not getting copied
you get an error because flag-icon-css
is missing in wwwroot/libs
. Funny thing is: the folder exists in node_modules
. I just copied that one over and now it works - but that should get fixed.
Issue 3 - CmsKit - cannot upload images
Before we start, apply workaround from https://support.abp.io/QA/Questions/4884
By adding a MyDynamicWidgetMarkdown.razor
file somewhere in the blazor project with following content:
@using Blazorise.Markdown
@using Volo.Abp.DependencyInjection
@using Volo.CmsKit.Pro.Admin.Blazor.Pages.CmsKit
@inherits Volo.CmsKit.Pro.Admin.Blazor.Pages.CmsKit.DynamicWidgetMarkdown
@attribute [ExposeServices(typeof(DynamicWidgetMarkdown))]
@attribute [Dependency(ReplaceServices = true)]
@* WORKAROUND FOR ISSUE https://support.abp.io/QA/Questions/4884*@
<Markdown @Value="@Value"
ValueChanged="@OnValueChanged"
ImageUploadChanged="@OnImageUploadChangedAsync"
ImageUploadEnded="@OnImageUploadEndedAsync"
AutoDownloadFontAwesome="false"
CustomButtonClicked="@OnCustomButtonClicked"
@ref="@MarkdownRef">
<Toolbar>
@{
foreach (var markdownToolbarButton in MarkdownToolbarButtons)
{
<MarkdownToolbarButton Action="@markdownToolbarButton" />
}
<MarkdownToolbarButton Separator Name="W" Icon="@("none")" Title="Add Widget" Text="W"></MarkdownToolbarButton>
}
</Toolbar>
</Markdown>
<Modal @ref="@AddWidgetModalRef" Closing="@ClosingAddWidgetModal" RenderMode="ModalRenderMode.LazyReload">
<ModalContent Size="ModalSize.Large" Centered="true">
<Form>
<ModalHeader>
<ModalTitle>@L["AddWidget"]</ModalTitle>
<CloseButton Clicked="CloseAddWidgetModalAsync" />
</ModalHeader>
<ModalBody>
@if (Widgets.Any())
{
<Field>
<FieldLabel>@L["Widget"]</FieldLabel>
<FieldBody>
<Select @bind-SelectedValue="@ViewModel.Widget">
<SelectItem></SelectItem>
@foreach (var item in Widgets)
{
<SelectItem Value="@item.Key">@item.Value</SelectItem>
}
</Select>
</FieldBody>
</Field>
foreach (var item in ViewModel.Details)
{
if (item.EditorComponentName is not null)
{
if (ViewModel.Widget == item.Name)
{
<div id="editor-@item.Name">
<form data-check-form-on-close="false">
<DynamicComponent Type="Options.Value.FindParameterComponentType(item.EditorComponentName)"></DynamicComponent>
</form>
</div>
}
}
}
}
else
{
<p>@L["PleaseConfigureWidgets"].Value</p>
}
</ModalBody>
<ModalFooter>
@if (Widgets.Any())
{
<Button Color="Color.Primary" Clicked="AddWidgetAsync">@L["Add"]</Button>
}
</ModalFooter>
</Form>
</ModalContent>
</Modal>
From within your started blazor app, go to CMS->Pages and create a new page Now upload an image You now see that something is uploading stuff
That's about it. Nothing will happen. You can wait some time to experience fancy timeouts
[13:25:21 ERR] Unhandled exception in circuit 'qztupJFivEN9fZn8P9cfI-UIOzmzZKUIR94UO2VEM_Y'.
System.TimeoutException: Did not receive any data in the allotted time.
at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
at System.IO.Pipelines.Pipe.GetReadAsyncResult()
at System.IO.Pipelines.PipeReaderStream.ReadAsyncInternal(Memory`1 buffer, CancellationToken cancellationToken)
This issue also applies to creating a blog post with an image, same stuff happens. And when you try to edit a blog post to add an image after creation.
Issue 4 - CmsKit getting images Funny things also happen when you create a blog post without an image and view it on your public site:
EDIT: Issue 5 is due to misconfiguration ~~Issue 5 - Url forwarding in a tiered app And the last one - url forwarding:
this seems to be only an issue when you have a tiered solution. Non-tiered works Add this:
Then go to your public site /blog
. you should get redirected to /blogs/default
- but that somehow does not work.~~
{
"version": "1.0.0",
"name": "my-app",
"private": true,
"dependencies": {
"@volo/abp.aspnetcore.mvc.ui.theme.leptonx": "~2.1.0",
"@volo/aspnetcore.components.server.leptonxtheme": "~2.1.0",
"@volo/cms-kit-pro.admin": "~7.1.1",
"@volo/account": "~7.1.1",
"@volo/language-management": "~7.1.1"
}
}
Unable to set property 'text' on object of type 'Blazorise.Markdown.MarkdownToolbarButton'. The error was: Unable to cast object of type 'System.Boolean' to type 'System.String'.
Message: Unable to set property 'text' on object of type 'Blazorise.Markdown.MarkdownToolbarButton'. The error was: Unable to cast object of type 'System.Boolean' to type 'System.String'.
Type: InvalidOperationException
Stack Trace
System.InvalidOperationException: Unable to set property 'text' on object of type 'Blazorise.Markdown.MarkdownToolbarButton'. The error was: Unable to cast object of type 'System.Boolean' to type 'System.String'.
---> System.InvalidCastException: Unable to cast object of type 'System.Boolean' to type 'System.String'.
at Microsoft.AspNetCore.Components.Reflection.PropertySetter.CallPropertySetter[TTarget,TValue](Action`2 setter, Object target, Object value)
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.<SetProperties>g__SetProperty|3_0(Object target, PropertySetter writer, String parameterName, Object value)
at Microsoft.AspNetCore.Components.Reflection.ComponentProperties.SetProperties(ParameterView& parameters, Object target)
at Blazorise.BaseComponent.SetParametersAsync(ParameterView parameters)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters)
navigate to
Cms/BlogPosts/Create
or
Cms/Pages/Create