nopCommerce 4.40 is released

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 anni tempo fa
Bump - is anyone else having this problem? Is anyone else able to publish to AWS EB with many plugins?
3 anni tempo fa
a.m. wrote:
IMPORTANT UPDATE:

We've released a new version - 4.40.2. This is a minor release that is fully compatible with the previous versions (4.40.0 and 4.40.1). So all third-party plugins for 4.40 work for all minor versions (4.40.0-4.40.2).

The full list of changes in the new version is available in release notes.


Congratulation and thanks for your new minor update,
I want to implement hierarchy in Url structure in nopcommerce 4.4 as below:
"http://mystore.com/parentcategoryname/childcategoryname/productname"

is Nopcommerce 4.4 support hierarchy in Url structure? and if not, How can I implement that?
3 anni tempo fa
NEW MINOR VERSION:

We've released a new version - 4.40.3. This is a minor release that is fully compatible with the previous versions (4.40.0- 4.40.2). So all third-party plugins for 4.40 work for all minor versions (4.40.0-4.40.3).

The full list of changes in the new version is available in release notes.
3 anni tempo fa
a.m. wrote:
NEW MINOR VERSION:

We've released a new version - 4.40.3. This is a minor release that is fully compatible with the previous versions (4.40.0- 4.40.2). So all third-party plugins for 4.40 work for all minor versions (4.40.0-4.40.3).


Hi Andrei,

After upgrading to 4.40.3,  our clients reported that some of our plugins are not working properly.
We are no longer able to save TimeSpan fields into the database.
We have Schedule entity has some TimeSpan properties  like these (deleted the rest as they are not important) :

public class Schedule : BaseEntity
    {  ...    
        public TimeSpan? SchedulePatternFromTime { get; set; }

        public TimeSpan? SchedulePatternToTime { get; set; }

  ...
    }


We have a ScheduleBuilder that maps them like this:

table                
.WithColumn(nameof(Schedule.SchedulePatternFromTime)).AsCustom("TIME").Nullable()
.WithColumn(nameof(Schedule.SchedulePatternToTime)).AsCustom("TIME").Nullable();


The columns in the database are properly set to "time(7)" so the mapping to the database seems to be working fine but neither Insert nor Update are working.
This used to be working fine until we upgraded to nopCommerce 4.40.3 and now when we try to insert or update a Schedule entity with any value different than null it throws this error:

Short message:
Failed to convert parameter value from a TimeSpan to a DateTime.

Full Error:
System.InvalidCastException: Failed to convert parameter value from a TimeSpan to a DateTime.
---> System.InvalidCastException: Object must implement IConvertible.
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType, Boolean& coercedToDataFeed, Boolean& typeChanged, Boolean allowStreaming)
   --- End of inner exception stack trace ---
   at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType, Boolean& coercedToDataFeed, Boolean& typeChanged, Boolean allowStreaming)
   at System.Data.SqlClient.SqlParameter.GetCoercedValue()
   at System.Data.SqlClient.SqlParameter.Validate(Int32 index, Boolean isCommandProc)
   at System.Data.SqlClient.SqlCommand.BuildParamList(TdsParser parser, SqlParameterCollection parameters)
   at System.Data.SqlClient.SqlCommand.BuildExecuteSql(CommandBehavior behavior, String commandText, SqlParameterCollection parameters, _SqlRPC& rpc)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.BeginExecuteReader(AsyncCallback callback, Object stateObject, CommandBehavior behavior)
   at System.Data.SqlClient.SqlCommand.<>c__DisplayClass130_0.<ExecuteReaderAsync>b__1(CommandBehavior commandBehavior, AsyncCallback callback, Object stateObject)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1](Func`4 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, Object state, TaskCreationOptions creationOptions)
   at System.Threading.Tasks.TaskFactory`1.FromAsync[TArg1](Func`4 beginMethod, Func`2 endMethod, TArg1 arg1, Object state)
   at System.Data.SqlClient.SqlCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
--- End of stack trace from previous location ---
   at LinqToDB.Data.DataConnection.ExecuteScalarAsync(CancellationToken cancellationToken)
   at LinqToDB.Data.DataConnection.QueryRunner.ExecuteScalarAsync(CancellationToken cancellationToken)
   at LinqToDB.Linq.QueryRunner.ScalarQueryAsync(Query query, IDataContext dataContext, Expression expression, Object[] ps, Object[] preambles, CancellationToken cancellationToken)
   at LinqToDB.Linq.QueryRunner.InsertWithIdentity`1.QueryAsync(IDataContext dataContext, T obj, InsertColumnFilter`1 columnFilter, String tableName, String serverName, String databaseName, String schemaName, TableOptions tableOptions, CancellationToken token)
   at LinqToDB.DataExtensions.InsertWithInt32IdentityAsync[T](IDataContext dataContext, T obj, InsertColumnFilter`1 columnFilter, String tableName, String databaseName, String schemaName, String serverName, TableOptions tableOptions, CancellationToken token)
   at LinqToDB.DataExtensions.InsertWithInt32IdentityAsync[T](IDataContext dataContext, T obj, String tableName, String databaseName, String schemaName, String serverName, TableOptions tableOptions, CancellationToken token)
   at Nop.Data.DataProviders.BaseDataProvider.InsertEntityAsync[TEntity](TEntity entity)


We are properly setting the values to be of type TimeSpan so it is not a problem on our end (the code has not been changed since 4.40.2 on our side).
Any idea why this is no longer working?
Do you think it is related to switching back to Autofaq container somehow?

Any help with this will be much appreciated since this Scheduling component is used in several of our plugins that come with our themes and now all our clients that are on nopCommerce 4.40.3 will not be able to use them.

Thanks,
Boyko
3 anni tempo fa
Hi guys,

After some investigation, it seems like this change is causing the issue.

It is working fine when I change this line:
private static readonly Lazy<IDataProvider> _dataProvider = new(() => new SqlServerDataProvider(ProviderName.SqlServer, SqlServerVersion.v2008), true);

To this:
private static readonly Lazy<IDataProvider> _dataProvider = new(() => new SqlServerDataProvider(ProviderName.SqlServer, SqlServerVersion.v2008, SqlServerProvider.SystemDataSqlClient), true);

In other words the SqlServerProvider used to be SystemDataSqlClient (prior to 4.40.3) and now it is MicrosoftDataSqlClient.

What is the reason for changing that? Could we have this back or if not then what are our alternatives to get our previous code working again?

p.s: It is a bit of an urgent matter for us as more and more people are upgrading to 4.40.3 and they start to complain.

Thank you in advance!
Boyko
3 anni tempo fa
@Boyko

I believe that was part of '#5561 Fixed searching problem on the order list page' here: https://github.com/nopSolutions/nopCommerce/commit/5b3e78ca49f0a4e5ebf21a22243e951472ea2ffb

Sorry, I've just noticed you linked to it .... doh!
3 anni tempo fa
Hi, Boyko. We have updated the 4.40.3 release with changes in the provider configuration that solve the problem you are having

Nop-Templates.com wrote:


What is the reason for changing that? Could we have this back or if not then what are our alternatives to get our previous code working again?

p.s: It is a bit of an urgent matter for us as more and more people are upgrading to 4.40.3 and they start to complain.

Thank you in advance!
Boyko
3 anni tempo fa
Sergei-k wrote:
Hi, Boyko. We have updated the 4.40.3 release with changes in the provider configuration that solve the problem you are having


Thank you, Sergei!

It seems to be working fine now!

Thank you again for the quick fix!

Have a great weekend!

Boyko
3 anni tempo fa
webie wrote:
Agree with jgruenwald and hkbits.  There should be the choice of either running SQL scripts or accepting that if you run an auto-migration update that there will be problems.

We have modified core tables for our purposes.  Previously, we would look at the SQL update script to determine the database changes.  However, now it is not easy to determine the changes as there is no single place describing all of the changes.

At present, we have installed a vanilla installation of 4.4 and are running comparisons with 4.3 to identify the changes.  This has created a huge amount of necessary extra work that could have been avoided by following the previously accepted and working database upgrade process.

@nopcommerceteam please provide an update SQL script, or at the very least detail all of the changes you have made since 4.3 to the 4.4 database, including new and modified data.

Thank you.


I think this needs to be addressed
3 anni tempo fa
RE:  "... provide an update SQL script, or at the very least detail all of the changes..."

One could use SSMS:  (DB) > Tasks > Generate Scripts, and then Diff the scripts from one version to the other.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.