Base solution for your next web application

Activities of "dmux"

Disregard this. I found the answer here:

https://github.com/ng-bootstrap/ng-bootstrap/issues/1522

Essentially, just add

.modal { overflow-y: auto !important; }

... to the css for the modal.

Hi Guys,

Once again, I really love the RAD tool!

But some time between Feb 9 and Feb 22, something changed, and that broke stuff without me realising straight away, and that stung me. (Look, maybe I reinstalled my VS about then, and got a new version of the RAD tool...?)

It looks like it now has a "ViewType" property on the NavigationProperty. This is a cool feature, being able to have a dropdown... But the tool auto-populates the property with value "null", so when I regenerated some entities I didn't realise it just left out the selectors altogether from the modal. That means using the auto-generated modal now throws an error because the foreign keys are not set. It would be better if it auto-populated it with "LookupTable" for backwards compatibility.

Now that I have figured this out I'm going back through all the entity json files and populating the property.

I hope this is helpful.

Thanks again for the great tool.

Hi,

I can see #6250 which addresses arrow functions in the MVC project causing IE11 compatibility issues. It looks like some more arrow functions have crept in since that time.

I am using ASP Core MVC Project v8.0.

I see the "EntityHistory" arrow functions (which the PR was fixing) all through the RAD-generated code. I found they were in the PartialTemplates.txt file so I have updated the template files and will test, but the RAD Tool probably should be updated for this

I am also getting a syntax error from IE for an arrow function in customizable-dashboard-libs.min.js (36,39):

        timer = setTimeout(() => {
            callBack();
        }, delay);
        

and chat.signalr.js (42,30):

      connection.start()
            .then(() => {
                reconnectTime = 5000;
                tries = 1;
            })
            

Please advise how to refactor these to not use arrow functions.

I recently upgraded my Core MVC project from 8.1 to 8.6, and it looks like everything is ok running in debug mode locally in Visual Studio, but when I push it up to Azure App Service (using my existing build pipeline) none of my localizations (in Core\Localization<project><project>.xml) are working - menu items, column headings, everything has reverted to "[Property name]" format. Interestingly, this even includes new items added in the ASPNETZERO base project since 8.1 (See "Dynamic Parameters" and "Webhook Subscriptions"):

When I go to the Languages section on the Azure published 8.6 site I can see 900 entries, which appear to be the built-in ones:

On my existing live site (another Azure app), which is still v8.1, I see 1849 entries and all my localizations are working:

I see 1961 entries on my local debug version (V8.6 upgrade added quite a few), and they are all working:

Incidentally I have disabled all other languages so that English (UK) is the only enabled option. Is that relevant? It was like that before the upgrade as well.

Can someone tell me what might be going on?


Update:

When I enabled US English in the host, the localization suddenly worked in my tenant, even though the tenant still has UK English as the default.

This is now the setting:

... and now all my localizations work.

I'm still interested to learn what is happening. I don't want US English enabled because if a user selects it some of my date validations will not work correctly.

Hi @ismcahdas,

I'm not exactly sure what your question means. I don't think there is a way to make more than one language the default. English (UK) is set to default.

Anyway I finally solved it when I noticed the English (US) had the code "en". I changed it to have "en-us" and then disabled it in the host. Now the UK one is the only one enabled and is the default, and it's working in the tenant.

Thanks, Kevin

My app has tens of thousands of old AbpUserNotifications and AbpTenantNotifications. I only need to keep them if they are less than a week old. I can't access repositories for those data tables, so what is the best way to delete old records in my background worker?

What I meant was if I could use IRepository<UserNotification>, I could just delete the records older than a certain date.

In IUserNotification I can see there is a delete function, but I have to specify a user. What I need to do is iterate over all the users and get all the notifications older than a certain time, then delete them. I guess if I could iterate over all users I could use IUserNotification to get all notifications and then delete the older ones.

Is there a way I can iterate over all users? Even just all users in one tenancy (because I can iterate through tenancies)?

Hi @marble68, thanks for your suggestion!

I think you're right - DeleteAllUserNotifications() will be part of the solution. It even lets me specify a date range. Unfortunately it only allows me to operate on notifications for a single user at a time, though. So what I now need is a way to iterate over all the users, so I can run DeleteAllUserNotifications for each one.

I can't see a way to enumerate users. Is there an Abp function for this?

Thanks very much @marble68, I've never bothered going under the bonnet before into the ABP code, and it's interesting!

In the end I stuck with what I've got available out of the box. In my background task I now have this:

List<int> tenants = _tenantRepository.GetAll()
                       .Where(t => !t.IsDeleted && t.IsActive)
                       .Select(t => t.Id)
                       .ToList();

foreach (int tenantId in tenants)
{
    using (var unitOfWork = _unitOfWorkManager.Begin())
    {
        using (_unitOfWorkManager.Current.SetTenantId(tenantId))
        {
            var users = _userRepository.GetAllList();
            foreach (var user in users)
            {
                _notificationStore.DeleteAllUserNotifications(user.ToUserIdentifier(), UserNotificationState.Read, Clock.Now.AddYears(-10), Clock.Now.AddDays(-7));
                _notificationStore.DeleteAllUserNotifications(user.ToUserIdentifier(), UserNotificationState.Unread, Clock.Now.AddYears(-10), Clock.Now.AddDays(-30));
            }
        }
        unitOfWork.Complete();
    }
}

<br> ... so I'm iterating through the tenancies, then the users in each tenancy, and for each user just calling the INotificationStore delete method with parameters. Raw SQL would be much more efficient, but this works great, and I do like to work through the framework where I can.

Thanks again for your ideas and help.

I had the same issue. The steps from @AuroraBMS worked for me.

Showing 21 to 30 of 32 entries