Activities of "chofoza"

Only problem is I am still getting this error when clicking Administration > Settings.

DependencyResolutionException: None of the constructors found with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'Volo.Abp.SettingManagement.Web.Pages.SettingManagement.Components.EmailSettingGroup.EmailSettingGroupViewComponent' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.SettingManagement.IEmailSettingsAppService emailSettingsAppService' of constructor 'Void .ctor(Volo.Abp.SettingManagement.IEmailSettingsAppService)'.

Any ideas?

Thank you so much @ilkayilknur. Your suggestions helped me get there!

Running yarn and gulp didn't help. yarn continues to fail at the same places in step 2 even now that everything is working. But while I was scrutinising the errors I saw a problem: I am running on MacOS and store my projects in my iCloud drive, and that folder pathname has a space in it (/Mobile Documents/) which the add-module update couldn't deal with. I moved everything to another folder, and the add-module step completed. Although the yarn command fails at step 2, the abp command is trying to continue, but was also failing because of the space - moving to a different folder allowed the entire process to complete, including automatically running the db migrations.

Next problem was I still could not see the tables, and no menu (despite the message during install that it had run, and me running it manually through command line as well as running DbMigrator). Eventually I realised that the db migration had run on the live connection string and not in my dev environment, so I ran the command line tool specifying my local connection string, and that then worked.

Still no menu. I had previously checked a test project against my existing one and all the relevant cms code had been added so the add-module command did add nearly everything properly. I copied the content.Menu.SetSubItemOrder from the test project into the MenuContributor. It didn't work but also only sounds it sets the order to an already added item... Eventually realised my role didn't have permissions on the CmsKit - so obvious but it took me ages.

So then I could see the menu, and actually access the page and blog lists! But when I tried to add a new page I got an error about a missing tui-editor library. I copied the entire wwwroot/libs folder from my test project over to this one, and then it started working. I created and can view a page. I assume all the missing libs were from step 2 of the yarn process. I don't know what steps 3 and 4 do but everything appears to be working!

It's been a hell of a morning. Thank you for your help and I hope this helps someone else.

  • ABP Framework version: v4.3.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hi, I am having multiple issues with an upgrade from 4.2 to 4.3 and trying to add the CMS modules. My abp CLI and suite are both at the latest version.

When I add CmsKit or CmsKit.Pro it fails during step 2 of 4:

[1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... error Command failed. Exit code: 128 Command: git Arguments: ls-remote --tags --heads ssh://git@github.com/seonim-ryu/Squire.git Directory: [web project folder] Output: Host key verification failed. fatal: Could not read from remote repository.

I can see the Nuget dependencies in all my projects, but my database does not have any cms tables in it, and the menu doesn't appear. I have tried adding the relevant "EnableAll" code to the GlobalFeatureConfigurator in Domain.Shared but it didn't do anything. I also ran the DbMigrator project and it ran successfully, but didn't add any tables.

I also tried to add the file management module and had the same error about Squire.git.

I also get the following error when I click on Settings in the Administrator menu (all other menu pages are ok)

DependencyResolutionException: None of the constructors found with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'Volo.Abp.SettingManagement.Web.Pages.SettingManagement.Components.EmailSettingGroup.EmailSettingGroupViewComponent' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.SettingManagement.IEmailSettingsAppService emailSettingsAppService' of constructor 'Void .ctor(Volo.Abp.SettingManagement.IEmailSettingsAppService)'.

I've done a full "update all packages" through abp suite and obviously don't get any compiler errors. I did also follow the upgrade doc from 4.2 to 4.3 so those steps have also been implemented.

I've considered creating a new project and moving my custom code across, but I'll need to use the new db layout and therefore would lose my live data. I could possibly migrate data but I don't know if that will work for identity columns and foreign keys.

Has anyone seen these problems before and have I missed something simple?

Answer

I am having a problem with a recently upgraded project. It runs, and seems fine generally, but when I click on Administration > Settings I get this error:

Autofac.Core.DependencyResolutionException: None of the constructors found with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'Volo.Abp.SettingManagement.Web.Pages.SettingManagement.Components.EmailSettingGroup.EmailSettingGroupViewComponent' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.Abp.SettingManagement.IEmailSettingsAppService emailSettingsAppService' of constructor 'Void .ctor(Volo.Abp.SettingManagement.IEmailSettingsAppService)'.
   at Autofac.Core.Activators.Reflection.ReflectionActivator.GetAllBindings(ConstructorBinder[] availableConstructors, IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.<ConfigurePipeline>b__11_0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Builder.RegistrationBuilder`3.&lt;&gt;c__DisplayClass41_0.&lt;PropertiesAutowired&gt;b__0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)

All other admin menu items seem ok. Any ideas? It's a Pro MVC/SQL project without access to any original source code.

Answer

@chofoza , that's the open-source package. you need to add the CmsKit Pro package to your commercial project.

abp add-module Volo.CmsKit.Pro 

Thank you @alper, I manually removed all the non-Pro packages and added .Pro. All of my projects reference the Pro packages but the install did still fail at the same place. I tried multiple times and it showed errors downloading three different git packages and then continues to show the last one:

ls-remote --tags --heads ssh://git@github.com/adobe-webplatform/eve.git ls-remote --tags --heads ssh://git@github.com/nhn/raphael.git ls-remote --tags --heads ssh://git@github.com/seonim-ryu/Squire.git (if I keep running add-module I keep getting this error now)

I also don't have any cms tables in the database, and I tried to add a migration, but I'm assuming because the add-module fails too many steps have been missed for it to work.

Answer

Hi, when I add Cms Kit manually to an existing project it fails updating the Web project.

Command line: abp add-module Volo.CmsKit

Error: *[1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... error Command failed. Exit code: 128 Command: git Arguments: ls-remote --tags --heads ssh://git@github.com/seonim-ryu/Squire.git Directory: (my project directory)/aspnet-core/src/(project name).Web Output: Host key verification failed. fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.*

Anything I can do to work around this? All of my projects in the solution have the CmsKit dependencies except for the main web project, and steps 3 and 4 haven't completed either.

For anyone wondering the command line to install Cms Kit is abp add-module Volo.CmsKit

Hi @cotur, I have the CLI and Suite both on RC2, but when I try add the Cms-Kit I get an error that it could not be found.

Am I using the wrong "name" for it? This is what I have: abp add-module Cms-Kit (and I've tried variations of the name too)

Ok I have sorted out the filtering issue. I didn't understand how easy the dependency injection was but finally got my head round that. I am injecting the httpContextAssessor and the OU repository, and then finding the current users OU and calling the GetUsersInOrganizationUnitWithChildrenAsync method with its Code.

The other problem I mentioned above is still happening: In dev if I look at my Inactive page and my normal Users page, they behave as expected. In live, whichever one I look at first becomes the "default" and I can't see the other one. The screens are very similar obviously, but the filter is fixed to the first one I chose, and the Actions list is fixed to the first one too. Something is being cached somewhere it shouldn't but I can't figure out why this only affects live and the dev behaviour is perfect?

Hi @gterdem.

I got all of this working, but have been struggling with part 2 of my question. I am pretty sure I can get the linq query working to filter on the current users OU's (or start with GetUsersInOrganizationUnitWithChildrenAsync and then filter on Active only) but I can't work out how to get the current user in my EntityFrameworkCore project. I've tried various dependency injections but I keep getting errors. I also tried passing the user ID along with the Ajax but it's ignored.

Can you please help?

Also in my dev environment if I view the Inactive page and the normal Users page they both behave normally. However in production whichever one I view first is what I continue to see (ie if I look at Inactive first, I see the same filter and Actions when I go to Users, and vice versa). This only seems to be an issue in prod and I can't reproduce it in dev. Any ideas?

Showing 1 to 10 of 16 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09