We are having an odd issue with the feature check where a feature can be considered both enabled and disabled depending on where it's checked.
For instance, we have a feature check on the menu contributor to only show the corresponding menu if the feature is enabled:
if (context.Menu.Name == StandardMenus.Main && await featureChecker.IsEnabledAsync(MyDefinitionProvider.MyFeature))
{
// this correctly shows or hides the menu depending on the feature status
await ConfigureMainMenuAsync(context);
}
However, when doing the same check on a background worker, sometimes we get a different result:
protected override async Task DoWorkAsync(PeriodicBackgroundWorkerContext workerContext)
{
await Parallel.ForEachAsync(await TenantStore.GetListAsync(), tenantParallelOptions, async (tenant, ct) =>
{
try
{
using (CurrentTenant.Change(tenant.Id))
{
if (!await featureChecker.IsEnabledAsync(MyDefinitionProvider.MyFeature))
return;
// some logic here that should only execute when the feature is enabled
// this is where we get the inconsistency, since even with the feature enabled and menu visible, sometimes this is not executed
}
}
catch (Exception ex)
{
Logger.LogError(ex, "Error for tenant {TenantId}", tenant.Id);
}
});
}
This is a bit convoluted to reproduce, but from what we could gather it has something to do with enabling/disabling the feature for the tenant or edition, and the edition being assigned/unassigned from the tenant.
This can result in the scenario below where the row that holds the tenant status for the feature is simply deleted from the table. And THIS is when we observe the inconsistency stated above.
I know it's a little confusing, but if necessary we can schedule a call to explain in detail.
Using the module entity extension system, I'm adding a few custom properties to the Plan entity from the Payment Module. That works as expected except for one of the properties, where I need the field in the UI to allow multiple lines (text area), but instead in the UI the field is still rendered as a simple single line text input, not allowing me to input what I need.
According to the documentation:
DataTypeAttribute
is used to specify the type of the property. It is used to determine how to render the property on the user interface
So, my understanding was that by setting the data type of my property to DataType.MultilineText
as shown below, it should result in a text area field where I can type multiple lines of text, but that is not the case. Am I missing something?
Here's my custom property definition:
ObjectExtensionManager.Instance.Modules()
.ConfigurePayment(payment =>
{
payment.ConfigurePlan(plan => plan
.AddOrUpdateProperty<string>("Features", property =>
{
property.DisplayName = LocalizableString.Create<PaymentGatewayResource>("PlanFeatures");
property.Attributes.Add(new DataTypeAttribute(DataType.MultilineText));
property.UI.OnTable.IsVisible = false;
})
);
});
Hi, @EngincanV. Any update on this?
Regarding the favicon, I managed to fix it by adding the favicon.svg
file. Previously we had only a favicon.ico
file.
Hi there!
Currently, we have implemented a custom branding per tenant by overriding the properties available in the DefaultBrandingProvider
. However, this class only has AppName
, LogoUrl
and LogoReverseUrl
, which is the logo displayed on the login screen.
We need two additional overrides for the branding:
Is there a programmatic way to override these?
For the menu icon, we are able to simply replace the icon files in wwwroot, but that doesn't work for our dynamic per tenant branding we want. For the favicon, we are also able to replace the file, but for some reason while on the login page we still see the default LeptonX favicon.
Any suggestions? Thanks.
Hi, @EngincanV thanks for the response.
I tested the change with the steps you mentioned and it did work, that is, the table created in the previous module is no longer created again in the migration for the new module.
However, I noticed that this only worked when I ran the command to remove the latest migration twice (as you instructed), and as expected that removes the last two migrations, even though the second to last migration it removes has no relation to the latest one or its tables. I don't understand why that is the case, could you please provide an explanation?
Thanks in advance.
Support, please support.
Hi, since the question was asked by @bmulinari and you have added the last response, questions become invisible from our dashboard. This is the reason why we could not prioritize to answer this question. Sorry for the late response.
@bmulinari can you please send the project again, because when I try to download the application, it gives a 502 bad gateway error? I have reviewed it before but I could not find it in my workspace for now.
I will prioritize it and will fix your problem when you send your email. So, please let me know.
Regards.
@EngincanV, I have sent the e-mail again with the code.
Hi! I apologize for the broken link. I've shared a new by mail.
Let me know if you need anything.
Hi, @EngincanV. As requested, I've sent the application code and added a bit of context to the issue mentioned here.
Let me know if you need anything else, thanks!
Hi! We are having an issue with Entity Framework migrations in our solution which consists of an application and multiple custom modules. Each module has its own DbContext
, like in the approach shown here. It's worth pointing out that we are using a separate database for the tenant.
To put it simply, here's the issue we are facing:
This obviously results in the error "Table_A already exists" when running the migrator. I'm not sure what we are doing wrong, but we tried a bunch of different things and the migration for Table_B is always wrong (it shouldn't try to recreate Table_A).
Any help is appreciated. Thanks!
Hi there. I see that 8.3.3 is out, but I couldn't find a mention of this in the release notes. Could you please confirm whether this issue was fixed in this release?