Base solution for your next web application

Activities of "joe704la"

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 11
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .NET 6

Is there anyway to put a SVG Duotone icon like how Metronic has it in their demo in ASP.net zero? I tried it in the app-navigation.service.ts but didn't realize that just adds that string as a css class.

Any help would be much appreciated

I figured out the issue. I had some css files listed in the Angular.json file for fullcalendar module and plugins that were messing things up.

  • What is your product version? 11.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net 6
  • Which theme are you using? default
  • What are the theme settings? default

I upgraded my project from 10.4 to 11 today and I am getting the below error. It seems to be getting stuck on AppPreBootstrap.ts file in the method getApplicationConfig. It gets to line 83 and errors out on getting the custom headers below. Any idea what could be causing this? My project has multiTenancy off. It is a single tenant project.

let customHeaders = [ { name: abp.multiTenancy.tenantIdCookieName, value: abp.multiTenancy.getTenantIdCookie() + '', },

core.mjs:6469 ERROR ReferenceError: abp is not defined at Function.getApplicationConfig (AppPreBootstrap.ts:83) at Function.run (AppPreBootstrap.ts:24) at root.module.ts:48 at new ZoneAwarePromise (zone.js:1387) at Array.<anonymous> (root.module.ts:42) at ApplicationInitStatus.runInitializers (core.mjs:24714) at core.mjs:26018 at _callAndReportToErrorHandler (core.mjs:26123) at core.mjs:26016 at ZoneDelegate.invoke (zone.js:372) defaultErrorLogger @ core.mjs:6469 handleError @ core.mjs:6516 (anonymous) @ core.mjs:26126 invoke @ zone.js:372 run @ zone.js:134 runOutsideAngular @ core.mjs:25349 (anonymous) @ core.mjs:26126 invoke @ zone.js:372 onInvoke @ core.mjs:25450 invoke @ zone.js:371 run @ zone.js:134 (anonymous) @ zone.js:1276 invokeTask @ zone.js:406 onInvokeTask @ core.mjs:25437 invokeTask @ zone.js:405 runTask @ zone.js:178 drainMicroTaskQueue @ zone.js:582 zone.js:1063 Unhandled Promise rejection: abp is not defined ; Zone: <root> ; Task: Promise.then ; Value: ReferenceError: abp is not defined at Function.getApplicationConfig (AppPreBootstrap.ts:83) at Function.run (AppPreBootstrap.ts:24) at root.module.ts:48 at new ZoneAwarePromise (zone.js:1387) at Array.<anonymous> (root.module.ts:42) at ApplicationInitStatus.runInitializers (core.mjs:24714) at core.mjs:26018 at _callAndReportToErrorHandler (core.mjs:26123) at core.mjs:26016 at ZoneDelegate.invoke (zone.js:372) ReferenceError: abp is not defined at Function.getApplicationConfig (http://localhost:4200/main.js:84:23) at Function.run (http://localhost:4200/main.js:42:25) at http://localhost:4200/main.js:18826:75 at new ZoneAwarePromise (http://localhost:4200/polyfills.js:5759:29) at Array.<anonymous> (http://localhost:4200/main.js:18822:16) at ApplicationInitStatus.runInitializers (http://localhost:4200/vendor.js:137367:52) at http://localhost:4200/vendor.js:138671:28 at _callAndReportToErrorHandler (http://localhost:4200/vendor.js:138776:24) at http://localhost:4200/vendor.js:138669:20 at ZoneDelegate.invoke (http://localhost:4200/polyfills.js:4744:26)

Thank you, that worked.

Any ideas on this?

  • version - 8.9.2
  • Angular
  • .NET Core

I am having issues with my Angular project. I haven't had this issue before and not sure where it is coming from all of a sudden but the angular appbuilds when I do Yarn Start just fine. But when I go to localhost:4200 in the console window I get "Cannot read property currency of undefined" error as you can see in the first image. I am hoping if I can figure out the currency issue maybe the second bug will go away as well.

I then went and commented out the provider for getCurrencyCode to see if that helped, which it appeared to get rid of that error. But I got a different error instead and I am thinking I caused this second issue from commenting the currency code out, but I am not entirely sure.

The error I am thinking maybe started after I commented out the currency code is "Cannot read property blobToText of undefined. Which you can see in the last image

Okay great, I will work on upgrading to 10.3.0. Is there any docs that show what CSS changed from Metronic 6 to 7?

Are you planning on Upgrading to Metronic 8 at some point in the near future? I am still on a version of Zero that is on Metronic 6 and I am looking to try and do an upgrade but I am in no hurry and if you guys do plan on moving to Metronic 8 in the next few months I will probably just wait until then, so I don't have to go through the pain a second time.

Figured the issue out. When you asked about the TenantId I had a thought and checked the ChatController and sure enough it uses a using statement that sets TentantId to null. I removed that and it worked just fine.

            using (CurrentUnitOfWork.SetTenantId(null))
            {
                var fileDto = await _fileAttachmentsService.GetUserFileAttachmentForView(fileId);
                var fileObject = fileDto.FileAttachment;
                if (fileObject == null)
                {
                    return StatusCode((int)HttpStatusCode.NotFound);
                }


                return File(fileObject.BinaryObject, contentType, fileName);
            }

My project is a .NET Core 3.1 project with Angular front-end.

I have a simple entity called FileAttachment and I have tried sending in a guid to the below method in my FileAttachmentManager I created and it always comes back Null. Even though I can grab the Guid when debugging and write SQL that will pull up the record I am looking for, so I know the record is in the DB. I cannot for the life of me figure out why it is not working. The manager is in the Core layer and I am calling it from the ChatController.

public Task<FileAttachment> GetOrNullAsync(Guid id)
        {
            return _fileAttachmentRepository.FirstOrDefaultAsync(id);
        }
            I also tried creating a service in the Application layer doing something similar to the below method. But also did not work. Any help would be much appreciated. 
    
        public async Task<GetFileAttachmentForViewDto> GetUserFileAttachmentForView(Guid id)
        {
            var currentUserId = AbpSession.UserId;
            if (!currentUserId.HasValue)
            {
                throw new UserFriendlyException("User not logged in, please login to continue.");
            }

            var fileAttachment = await _fileAttachmentRepository.GetAsync(id);


            var output = new GetFileAttachmentForViewDto { FileAttachment = ObjectMapper.Map<FileAttachmentDto>(fileAttachment) };

            var input = new DownloadAttachmentInputDto
            {
                TypeId = fileAttachment.TypeId,
                FileAttachmentId = fileAttachment.Id,
                FileAttachmentType = fileAttachment.FileAttachmentType
            };

            await CheckDownloadPermissions(input, currentUserId.Value);

            return output;
        }
Showing 1 to 10 of 246 entries