Activities of "Sturla"

Thanks for the input enisn.

I will soon start to explore the CMS in details (and going through your answer) and figure out what options I have and how much I need/can built on top of it. I will come back here and add any feedback/knowledge I gain on that journey.

Just to add (as it might give you an idea for making the CMSKit better) I will also be exploring something like this here.

Hi @enisn

I have tried to add more meat to this question for you. I hope this makes it easier for you to answer me.

I´m trying to see how far I can go using CMS Kit without creating my own CMS 🙈!

So the question is if I can use it with little or no custom code (except some Dynamic Widgets) OR do I have to extend it an do a complete custom extension build on top of it (is that even possible)? What are my best options?

My requirements:

  • My tenants are creating sales pages for their product (just one product per domain). These pages can differ as much as the tenants are many.
  • Each tenant should be able to create rather complex pages, with different elements on them, just like you see on the image below
  • This applies to both the landing page (index.html) as other pages the tenant wants to create.
  • I´m not looking for a "WYSIWYG control everything" designer like Wix, but I would like some control and dynamic nature of page creation.

Questions (contains the previous questions also)

  1. Can I create a complex pages by using CMS Kit out of the box or do I need to create custom page templates (that every tenant will have access to from "create page" button)?
  2. If I need to create custom template page, can CMS Kit manage the content for the page?
    • If I allow the tenant to change from a template with different content placeholders then the content would be lost.
  3. I would not want to share these themes between tenants because if one asks for a change (and many are using that template) I will have to make a copy of it (in code) and do the change. Thats not dynamic or flexable enough for my needs.
  4. Could a Dynamic Widget be used to create these "sections" of premade blocks (as seen on image below)? This would probably be the most ideal scenario. Then I would have a "Hero widget" a "Carousel widget" etc. that has different elements (text, images, placement of text, enable/disble etc.) that the user can change for that page. The only issue I see here is that the CMS menu will quickly fill up with many many widgets.
  5. Do the Dynamic Widgets open up in design/edit mode when I click on them (in the text field of CMS Kit) after they have been added as content? If I have complex widget then I would like my tenants to have a UI (that might have extra information in it)
  6. Can I intercept the "create page" button and offer my own popup UI for selecting a template?

Just to include it here I asked this question, What is the best way to customize look and feel for each tenant? 6872, before but never did anything with it since it pointed to this Tenant-specific themes 5295 and I thought this was not quite what I needed 🤷‍♂️

I started thinking about these things 2022 and see that some have been updated but not all.

I have few questions regarding the CSM.

I want to to pre-create different pages for tenants based on their needs. They will be offered a UI selections and then we will create the pages they need. I also want them to be able to create and edit these pages afterwards.

Question summary:

  1. Can I create complex pages like the image here below? I want to be able to do something that looks really nice https://abp.io/support/questions/6872/What-is-the-best-way-to-customize-look-and-feel-for-each-tenant. This is for both normal pages from menu but also the landing ("index.html") page it self.
  2. Can I add dynamic widgets into these pre-made pages?
  3. Can I intercept the "create page" button and offer my own popup UI for selecting a template?
  4. Can you edit the dynamic widget from the page its on by clicking on the widget on the page its self?

Same questions in more detail

Q1 Can I create complex pages like the image here below? And are the pages responsive?


Q2 Can I add dynamic widgets into these pre-made pages? I´m pretty sure it is but want to ask.


Q3 Can I intercept the "create page" button and offer my own popup UI for selecting a template? When clicking "+ New page" I want to intercept that and offer another UI showing a selection of different type of pages e.g. "Landing page", "Meet the team", "The product" etc..


Q4 Can you edit the dynamic widget from the page its on by clicking on the widget on the page its self? I would not want to go the the menu for it and I don´t want manual editing of text.

  • ABP Framework version: v9.0.1
  • UI Type: Blazor Server backend with MVC frontend
  • Database System: EF Core (SQL Server)

Have you looked into this?

Not the commercial version but it does in the open source and I added it to my commercial product 2 years ago so you should accomondate for this also.

I figured this out!

There are still the wrong values in the AbpLanguages table!

This should be in the migration information and handled somehow. Maybe I missed it in earlier versions?

I have followed the migration guide on this but am totally unable to fix it..

Any change there is something missing I need to do? This happens so early starting up I can´t get any more detailed information about where it could be happening. I even tried removing everything Icelandic (is or is-IS) and just have 'en' but still an issue..

[12:54:37 DBG] HealthReportCollector - health report execution history saved.
[12:54:37 DBG] HealthReport history already exists and is in the same state, updating the values.
[12:54:37 DBG] HealthReportCollector has completed.
[12:54:37 DBG] HealthCheck collector HostedService executed successfully.
[12:54:41 DBG] Starting HttpMessageHandler cleanup cycle with 3 items
[12:54:41 DBG] Ending HttpMessageHandler cleanup cycle after 0.0553ms - processed: 0 items - remaining: 3 items
[12:54:41 INF] Request starting HTTP/2 GET https://localhost:44307/api/abp/application-configuration?IncludeLocalizationResources=False - null null
[12:54:41 ERR] An unhandled exception has occurred while executing the request.
System.Globalization.CultureNotFoundException: Culture is not supported. (Parameter 'name')
Icelandic is an invalid culture identifier.
   at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
   at Microsoft.AspNetCore.RequestLocalization.DefaultAbpRequestLocalizationOptionsProvider.GetLocalizationOptionsAsync()
   at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
[12:54:41 DBG] Response markup is scheduled to include Browser Link script injection.
[12:54:41 DBG] Response markup is scheduled to include browser refresh script injection.
[12:54:41 DBG] Response markup was updated to include Browser Link script injection.
[12:54:41 DBG] Response markup was updated to include browser refresh script injection.
[12:54:41 INF] Request finished HTTP/2 GET https://localhost:44307/api/abp/application-configuration?IncludeLocalizationResources=False - 500 null text/html; charset=utf-8 11.4419ms
[12:54:41 INF] Request starting HTTP/2 GET https://localhost:44307/_vs/browserLink - null null
[12:54:41 INF] Request starting HTTP/2 GET https://localhost:44307/_framework/aspnetcore-browser-refresh.js - null null
[12:54:41 INF] Request finished HTTP/2 GET https://localhost:44307/_framework/aspnetcore-browser-refresh.js - 200 13770 application/javascript; charset=utf-8 1.4353ms
[12:54:41 INF] Request finished HTTP/2 GET https://localhost:44307/_vs/browserLink - 200 null text/javascript; charset=UTF-8 15.2492ms
[12:54:41 INF] Request starting HTTP/2 GET https://localhost:44307/favicon.ico - null null

  • ABP Framework version: v8.2.0, Lepton Theme
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

If I then just comment all the File "stuff" out to in the UI (just the UI) I get the following error when running

Autofac.Core.DependencyResolutionException: An exception was thrown while activating ContractWorkModule.JobFiles.JobFilesAppService.
 ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'ContractWorkModule.JobFiles.JobFilesAppService' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.Abp.Domain.Repositories.IRepository`2[ContractWorkModule.AppFileDescriptors.AppFileDescriptor,System.Guid] appFileDescriptorRepository' of constructor 'Void .ctor(ContractWorkModule.JobFiles.IJobFileRepository, ContractWorkModule.JobFiles.JobFileManager, Volo.Abp.Caching.IDistributedCache`2[ContractWorkModule.JobFiles.JobFileDownloadTokenCacheItem,System.String], Volo.Abp.Domain.Repositories.IRepository`2[ContractWorkModule.AppFileDescriptors.AppFileDescriptor,System.Guid], Volo.Abp.BlobStoring.IBlobContainer`1[ContractWorkModule.JobFiles.JobFileFileContainer])'.

so now I´m trying to track that down... It seems that the suite part has not been tested that much for this File thing..

UPDATE I solved that one by adding this line to my ContractWorkModuleApplicationModule but then I had to add my EntityFrameworkCore project that has my database context as a reference. Is that the way to go for a module?

context.Services.AddTransient<IRepository<AppFileDescriptor, Guid>, EfCoreRepository<ShowCasasDbContext, AppFileDescriptor, Guid>>();

BUT now I´m getting the following error

[10:55:21 DBG] Get dynamic claims cache for user: 56e99f30-fe1a-429f-44c4-3a137061d937
[10:55:21 INF] Request finished HTTP/2 GET https://localhost:44369/Pages/Jobs.razor.js - 404 0 null 34.0081ms
[10:55:21 INF] Request reached the end of the middleware pipeline without being handled by application code. Request path: GET https://localhost:44369/Pages/Jobs.razor.js, Response status code: 404
[10:55:22 WRN] Unhandled exception rendering component: Failed to fetch dynamically imported module: https://localhost:44369/Pages/Jobs.razor.js
TypeError: Failed to fetch dynamically imported module: https://localhost:44369/Pages/Jobs.razor.js
Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://localhost:44369/Pages/Jobs.razor.js
TypeError: Failed to fetch dynamically imported module: https://localhost:44369/Pages/Jobs.razor.js
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
   at ContractWorkModule.Blazor.Pages.ContractWorkModule.Jobs.OnAfterRenderAsync(Boolean firstRender) in C:\Dev\NineKeys.ShowCasas\aspnet-core\modules\ContractWorkModule\src\ContractWorkModule.Blazor\Pages\ContractWorkModule\Jobs.razor.cs:line 111
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
[10:55:22 ERR] Unhandled exception in circuit 'zCPhR6vkqJKDFKyFgew8tT-7NvbRH6KsYgbbCL9rOII'.
Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: https://localhost:44369/Pages/Jobs.razor.js
TypeError: Failed to fetch dynamically imported module: https://localhost:44369/Pages/Jobs.razor.js
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
   at ContractWorkModule.Blazor.Pages.ContractWorkModule.Jobs.OnAfterRenderAsync(Boolean firstRender) in C:\Dev\NineKeys.ShowCasas\aspnet-core\modules\ContractWorkModule\src\ContractWorkModule.Blazor\Pages\ContractWorkModule\Jobs.razor.cs:line 111
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
[10:55:22 DBG] Get dynamic claims cache for user: 56e99f30-fe1a-429f-44c4-3a137061d937
[10:55:22 INF] Executed endpoint 'Microsoft.AspNetCore.Routing.RouteEndpoint'
[10:55:22 INF] Request finished HTTP/2 CONNECT https://localhost:44369/_blazor?id=A5k3AEkOw7p_-WHpWIf1HA - 200 null null 10154.4415ms
[10:55:22 INF] Connection id "0HN4O57KU2NH1", Request id "0HN4O57KU2NH1:00000015": the application completed without reading the entire request body.

UPDATE 2 I figured why the js was not being loaded.. it was trying to reference the js file from a totally wrong path (notice that my module has a module folder under pages (all genereated with Suite)

BUT after pointing it to the .js I get the following error

[11:11:32 WRN] Unhandled exception rendering component: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
   at Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(Int64 asyncHandle, String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
   at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
   at Blazorise.DataGrid.JSDataGridModule.Initialize(ElementReference elementRef, String elementId)
   at Blazorise.DataGrid.DataGrid`1.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
[11:11:32 ERR] Unhandled exception in circuit 'cNIk9AF7tB-ZzTyDjjAGRWxePnRGsr20JCvkzZwBHk4'.
Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
   at Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(Int64 asyncHandle, String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args)
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
   at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
   at Blazorise.DataGrid.JSDataGridModule.Initialize(ElementReference elementRef, String elementId)
   at Blazorise.DataGrid.DataGrid`1.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

UPDATE 3 I could not fix the error above so I just commented all out BUT now I sometimes get this error

[11:31:38 WRN] Unhandled exception rendering component: Collection was modified; enumeration operation may not execute.
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
  at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
  at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.Common.ContentToolbar.mvtNVO0Qjc(RenderTreeBuilder  )
  at Blazorise.Row.&lt;BuildRenderTree&gt;b__24_2(RenderTreeBuilder __builder3)
  at Microsoft.AspNetCore.Components.CascadingValue`1.Render(RenderTreeBuilder builder)
  at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
[11:31:38 ERR] Unhandled exception in circuit 'b8SskGnvorXXbNMQgrv2vO6JHWfGZCHdeQPmqprrUr0'.
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
  at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
  at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.Common.ContentToolbar.mvtNVO0Qjc(RenderTreeBuilder  )
  at Blazorise.Row.&lt;BuildRenderTree&gt;b__24_2(RenderTreeBuilder __builder3)
  at Microsoft.AspNetCore.Components.CascadingValue`1.Render(RenderTreeBuilder builder)
  at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)

I you try to create db from these entites https://ufile.io/ajc1x5q2 (that were just created out of Suite) then there are lots of things wrong

  • UploadFileAsync method nowhere to be found
  • MaxFileUploadSize nowhere to be found
  • Namespaces not found or missing

I don´t know if it matters but I´m creating this inside a module.

Jobs being master and JobFiles being child.

Here are the rest of the errors

*

  • UI Type: Blazor Server 8.2.0
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

I create a Blazor Web App using Suite and then created a module for it and noting else.. just vanilla and no configurations..

What I get is this strange menu.. firstly the Administration menu is there with nothing under it and then the ContractWorkModule page comes above this folder.

On top of this everything is performing super super slow (in debug mode..). I see that for every refresh there is a 39.97 MB download.. is the auto part not working? Should WASM not be an opt-in and not a default?

There are more things wrong here.. like I created a Test page that is not shown but I can navigate to it etc.

Update I´m confused! According to your documentation you have you have updated server and wasm projects to use this new .net 8.0 thing

But why have you then also added this Blazor Web App option in Suite?

I thought that, that was the new thing so I started using it but I should have just created a new Blazor server project instead (where I can then opt into WASM also if I really want that)! Right or what?

  • ABP Framework version: v8.2.0
  • UI Type: the new Blazor Web App
  • Database System: EF Core
  • Separate host and tenant schema: Yes
Showing 1 to 10 of 213 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09