HI,
This is about this documentation page: https://docs.abp.io/en/abp/latest/Virtual-File-System#dealing-with-embedded-files-during-development Dealing With Embedded Files During Development
I think this sentence: "physical file at development time" should be changed to physical file at development time (when a host app is run at development time - in run mode)
I am confused about what modules I would need to include when I use AbpVirtualFileSystemOptions.FileSets.ReplaceEmbeddedByPhysical method. I am using some existing web applications as examples.
I need to uderstand this: **The example below shows an application that depends on a module (MyModule) that contains embedded files. The application can access to the source code of the module at development time. ** When I always start my web project I would say that any change I make within the solution will result in comilation and only then the web app will run, which means embeded files will be also compiled into depended assemblies and will be avalable to the web app. Is this only about changing files marked as embeded at run time (once the web app is running) that the abp virtual file system will serve these changed physical files?
First case is when I have the theme AdminLTETheme project added to the solution and I can see **AbpAspNetCoreMvcUIAdminLTEThemeModule **being added to the web Commerce.Web.cspro. **Why? ** I can see that CommerceWebModule, CommerceDomainSharedModule and CommerceApplicationContractsModule are being added. **Why? **
Is the rule that whenever I mark a file as embeded and I intend to change it at run time, I will need to add its module to the host app?
D:\Projects\Commerce\src\Commerce.Web\CommerceWebModule.cs
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<CommerceDomainSharedModule>(Path.Combine(contentRoot, $"..{separator}Commerce.Domain"));
options.FileSets.ReplaceEmbeddedByPhysical<CommerceApplicationContractsModule>(Path.Combine(contentRoot, $"..{separator}Commerce.Application.Contracts"));
options.FileSets.ReplaceEmbeddedByPhysical<CommerceWebModule>(hostingEnvironment.ContentRootPath);
options.FileSets.ReplaceEmbeddedByPhysical<**AbpAspNetCoreMvcUIAdminLTEThemeModule**>(Path.Combine(contentRoot, $"..{separator}..{separator}modules{separator}Commerce.Themes{separator}src{separator}ABP-Framework-Theme-Using-AdminLTE3-Template{separator}src{separator}Indo.Abp.AspNetCore.Mvc.UI.Theme.AdminLTE"));
});
This is the second case. I am not so sure if all of these modules needs to be added.
D:\abp\modules\cms-kit\host\Volo.CmsKit.Web.Unified\CmsKitWebUnifiedModule.cs
public class CmsKitWebUnifiedModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
if (hostingEnvironment.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<AbpAspNetCoreMvcUiThemeSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}..{0}..{0}framework/src{0}Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<CmsKitDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.CmsKit.Domain.Shared", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<CmsKitDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.CmsKit.Domain", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<CmsKitCommonWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.CmsKit.Common.Web", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<CmsKitPublicWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.CmsKit.Public.Web", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<CmsKitAdminWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.CmsKit.Admin.Web", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<CmsKitApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.CmsKit.Application.Contracts", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<CmsKitApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.CmsKit.Application", Path.DirectorySeparatorChar)));
options.FileSets.ReplaceEmbeddedByPhysical<CmsKitWebModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Volo.CmsKit.Web", Path.DirectorySeparatorChar)));
});
}
@songshuai1986 try radvistaATgmailDotcom
As suggested here: https://developercommunity.visualstudio.com/t/ts6053-node-modulessource-mapsource-map-not-found/1412153
I added bolded text below, closed the solution, opened and rebuild.
Add this to your package.json "dependencies": { "@volo/abp.aspnetcore.mvc.ui.theme.lepton": "^5.2.0-rc.2", "@volo/account": "^5.2.0-rc.2" }, "typings": "source-map.d.ts"
I would want to have my own custom page like this: /Pages/BookPosts/Create.cshtml /Pages/PropertyPosts/Create.cshtml
There is no need to override BlogPosts/Create.cshtml because I need to have various entities that have some common rendering on top, so I can actually make a blog post as view component or view razor page and render it within each new entity
@songshuai1986 I am interested in the same topic (just learning Infrastructure as code deployments). Please PM me to continue discussion. I will attempt to help. I was doing some POC on microsoft Yarn reverse proxy (lke custom api gateway) and know some stuff.
First. I noticed some new documentation: https://docs.abp.io/en/commercial/latest/guides/identityserver-deployment?&_ga=2.203072337.1127043900.1648793980-1948653032.1648275318#kubernetes
I think based on this order of execution: at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties) at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel)
... from your Your API host that is protected by OpenIdConnect which requires login
https://github.com/skoruba/IdentityServer4.Admin/issues/914
I think your API host that is protected by OpenId Connect and configureed with an OpenID Connect provider like Identity server 4 and your client (web app) is trying to send you to login screen and uses well known URL to discover the URL of the login page and since the middleware is trying to reach this document it cannot see it because of your intra services visibility. So how are your web host and Identity provider talking to each other. I would first try to see if well-known URL is active (Identity service is running) and second to play with service discovery within the node
Endpoints, where Identity Server 4 seams to be contacted are slow or not responding: https://auth.fa.cn.azurewebsites.net/.well-known/openid-configuration https://auth.fa.cn.azurewebsites.net/api/abp/application-configuration https://auth.fa.cn.azurewebsites.net/Account/Login Generating tokens: https://auth.fa.cn.azurewebsites.net/connect/token
Some useful pointers: https://github.com/IdentityServer/IdentityServer4/issues/2337 This error is caused by your API being unable to load the OpenID Discovery Document (/.well-known/openid-configuration) For Microsoft OpenID Connect metadata document location is here: https://login.microsoftonline.com/45a9ecad-23ee-48d2-a93e-3d324fccc453/v2.0/.well-known/openid-configuration in your case it is: https://auth.fa.cn.azurewebsites.net/.well-known/openid-configuration
I've just noticed, when running in Docker the responses from the .well-known/openid-configuration endpoint are all http, but the entire app is setup to be https.
This is why source map was requested as a deep dependency of abp.aspnetcore.mvc.ui.theme.lepton theme
npm ls source-map
my-app@1.0.0 D:\Volosoft\AbpCommercial\Acme.HelpDesktop52\src\Acme.HelpDesktop52.Web.Public
-- @volo/abp.aspnetcore.mvc.ui.theme.lepton@5.2.0-rc.2
-- @volo/abp.aspnetcore.mvc.ui.theme.commercial@5.2.0-rc.2
-- @abp/aspnetcore.mvc.ui.theme.shared@5.2.0-rc.2
-- @abp/aspnetcore.mvc.ui@5.2.0-rc.2
-- gulp@4.0.2
-- glob-watcher@5.0.5
-- anymatch@2.0.0
-- micromatch@3.1.10
-- snapdragon@0.8.2
-- source-map@0.5.7
I don't know what is it in the build configuration that complains.
@enisn,
Are you saying that once I add custom Properties in ExtraProperties I will automatically see these below other fiels in Blog Post edit screen?
I cannot possibly use ExtraProperties as I don't want to depend on existing entity: BlogPost and define very complex .AddOrUpdateProperty<Type> property definitions in Domain.Shared.MyAppModuleExtensionConfigurator.cs and add valitions and other UI related concerns. I want to use normal Entity Classes and properties and do add relations between entities.
I would probly want to compose some entities like: Book, RentalProprty, Event from a BlogPost entity at the top and add specific view component for Book, RentalProperty and Event below it.
I would want to compose pages like these 2: /Account/Manage /SettingManagement
Basically to replicate dynamic nature of how \Account\Manage.cshtml is assembled from 4-5 view components in a loop:
@await Component.InvokeAsync(group.ComponentType, new
{
parameter = group.Parameter
})
group.ComponentType here is AccountProfilePictureManagementGroupViewComponent, AccountProfilePersonalInfoManagementGroupViewComponent, etc.
public class AccountProfileManagementPageContributor : IProfileManagementPageContributor
{
public async Task ConfigureAsync(ProfileManagementPageCreationContext context)
{
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<AccountResource>>();
context.Groups.Add(
new ProfileManagementPageGroup(
"Volo-Abp-Account-Picture",
l["ProfileTab:Picture"],
typeof(AccountProfilePictureManagementGroupViewComponent)
)
);
context.Groups.Add(
new ProfileManagementPageGroup(
"Volo-Abp-Account-PersonalInfo",
l["ProfileTab:PersonalInfo"],
typeof(AccountProfilePersonalInfoManagementGroupViewComponent)
)
);
AccountProfilePictureManagementGroupViewComponent : AbpViewComponent
AccountProfilePersonalInfoManagementGroupViewComponent : AbpViewComponent
I would need to create a custom BlogPost page enabling some ViewComponent injections at run time depending on what is needed for a particular Book or other Entities.
I generated solution with abp suite v5.2.0-rc.2. I have this error in all web apps: Admin, Public and Identity.
Severity Code Description Project Path File Line Suppression State Error TS6053 File 'D:/Acme.HelpDesktop52/src/Acme.HelpDesktop52.Admin.Web/node_modules/source-map/source-map' not found. The file is in the program because: Root file specified for compilation Acme.HelpDesktop52.Admin.Web JavaScript Content Files 1 Active
Thanks
I am using the latest Abp Suite to generate code for entities. I am following this tutorial: https://docs.abp.io/en/commercial/5.2/abp-suite/creating-many-to-many-relationship
I wanted to know if I can during Code generation time to enter my custom properties of simple type or even navigation property to other existing entity.
I suppose you didn't plan this feature. I would suggest you would provide devs a chance to
BTW I have a DB schema with many of these many to many relationships using a linked table, sometimes with and sometimes without extra properties. What would I need to do regarding writing remaining code (after code generation) to allow for editing/viewing extra properties (and maybe navigation properties)
As we know sometimes linked tables can have more complex relationships with other tables (let's say 1 to many with some other table, like a category for a book applies to a collection of Regions)
Thanks Rad
I would like to convert a wordpress theme that builds on top of some Post types: Page, Post, Archive, Nav-Menu-Item, Revision etc. I would like to see how Cms-Kit is extensible and use that approach or try to change/enhance it in the best possible way to allow easy upgrades (without my code becoming unusable) and to get some advice on where and how to extend Cms-Kit to allow new upgrades to that module.
Wordpress has the concept of Post Types (see below). It seems that Post Type 'post' corresponds to Page in Cms-Kit and 'page' to Blog
https://docs.abp.io/en/abp/5.2/Modules/Cms-Kit/Pages https://docs.abp.io/en/abp/5.2/Modules/Cms-Kit/Blogging
Wordpress allows creating Custom Post Types like 'Book' that can "inherit" from one of these default post types let's say 'post' So I can get a list of Books based on some Category association with 'Book' custom type. So posts can be listed in a template. To add custom properties to 'Book' Wordpress uses the concept of Custom Fields that can hold Book related properties like AuthorName, PublishYear etc. Also a taxonomy can be created with is like hierarchical category list and a taxonomy can be associated with the Book custom type. In that way we can categorize Books by some of Taxonomy terms.
So how to specialize some of the Page and Blog entities to add extra fields and how to provide additional categorization via various Taxonomies (with their terms) Is there a way to extend Cms-Kit to render those additional fields and additional categorizations we introduced (it is like a hierarchical Category listing where we can have Category.ParentId pointing to the Parent Category.
I would like to have capability to have multiple custom layouts for Customer facing site for each Page or Post and specialization of these (like Books, Authors, Teachers etc) so I can display one Book content in 2 columns with one side section or in 3 columns without a side. What would be the best way to manage such layouts and to design them and invoke at run time if a particula Book selects a particular layout and not a default one.
Can I use something like this:
Configure<CmsKitCommentOptions<>(options =>
{
options.EntityTypes.Add(new BookEntityTypeDefinition(nameof(BlogPost)));
});
options.FileSets.AddEmbedded<EventHubDomainModule>();
});
Configure<CmsKitCommentOptions>(options =>
{
options.EntityTypes.Add(new BookEntityTypeDefinition(nameof(BlogPost)));
});`
Thanks Rad
There are many different types of content in WordPress. These content types are normally described as Post Types, which may be a little confusing since it refers to all different types of content in WordPress. For example, a post is a specific Post Type, and so is a page.
Internally, all of the Post Types are stored in the same place — in the wp_posts database table — but are differentiated by a database column called post_type.
In addition to the default Post Types, you can also create Custom Post Types.
The Template files page briefly mentioned that different Post Types are displayed by different Template files. As the whole purpose of a Template file is to display content a certain way, the Post Types purpose is to categorize what type of content you are dealing with. Generally speaking, certain Post Types are tied to certain template files.
There are several default Post Types readily available to users or internally used by the WordPress installation. The most common are:
Post (Post Type: ‘post’)Page (Post Type: ‘page’)Attachment (Post Type: ‘attachment’)Revision (Post Type: ‘revision’)Navigation menu (Post Type: ‘nav_menu_item’)Block templates (Post Type: ‘wp_template’)Template parts (Post Type: ‘wp_template_part’)
The Post Types above can be modified and removed by a plugin or theme, but it’s not recommended that you remove built-in functionality for a widely-distributed theme or plugin.
It’s out of the scope of this handbook to explain other post types in detail. However, it is important to note that you will interact with and build the functionality of navigation menus and that will be detailed later in this handbook.
Top ↑
Post Posts are used in blogs. They are:
displayed in reverse sequential order by time, with the newest post first have a date and time stamp may have the default taxonomies of categories and tags applied are used for creating feeds
single and single-post category and all its iterations tag and all its iterations taxonomy and all its iterations archive and all its iterations author and all its iterations date and all its iterations search home index