Inhalte aufrufen

Profilbild

Turkish Language Problem

language problem

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
3 Antworten zu diesem Thema

#1 suat_suphi

suat_suphi

    Member

  • Members
  • PunktPunkt
  • 24 Beiträge

Geschrieben: 07 October 2022 - 16:09

I get an error when I use admin panel with Turkish language. I am using the latest version Smartstore.Community.5.0.0.win-x64 

 

www.abc.net/admin/setting/rewardpoints/ 

 

Controller: Setting, Action: RewardPoints, Status: 500 (InternalServerError)

Exception has been thrown by the target of an invocation.

Value cannot be null. (Parameter 'input')

 

www.abc.net/admin/discount/create/

same problem 

 

Controller: Discount, Action: Create, Status: 500 (InternalServerError)

Exception has been thrown by the target of an invocation.

Value cannot be null. (Parameter 'input')



#2 suat_suphi

suat_suphi

    Member

  • Members
  • PunktPunkt
  • 24 Beiträge

Geschrieben: 08 October 2022 - 12:46

The problem is because Validation.MustBeANumber returns null (LocaleStringResource) 

solution

public string GetErrorMessage(string key, string propertyName)
        {
            Guard.NotEmpty(key, nameof(key));
            Guard.NotNull(propertyName, nameof(propertyName));

            var template = GetString(key)??key;
            var formatter = ValidatorOptions.Global.MessageFormatterFactory()
                .AppendPropertyName(propertyName);

            return formatter.BuildMessage(template);
        }

 

 

 

ArgumentNullException: Value cannot be null. (Parameter 'input')
  • System.Text.RegularExpressions.ThrowHelper.ThrowArgumentNullException(ExceptionArgument arg)
  • System.Text.RegularExpressions.Regex.Replace(string input, MatchEvaluator evaluator)
  • FluentValidation.Internal.MessageFormatter.BuildMessage(string messageTemplate) in MessageFormatter.cs
  • Smartstore.Web.Modelling.Validation.ValidatorLanguageManager.GetErrorMessage(string key, string propertyName) in ValidatorLanguageManager.cs +
    1. return formatter.BuildMessage(template);
  • Smartstore.Web.MvcStarter+<>c__DisplayClass2_0.<ConfigureMvc>b__7(string x) in MvcStarter.cs +
    1. return validatorLanguageManager.GetErrorMessage("MustBeANumber", x);
  • Microsoft.AspNetCore.Mvc.DataAnnotations.NumericClientModelValidator.GetErrorMessage(ModelMetadata model


#3 suat_suphi

suat_suphi

    Member

  • Members
  • PunktPunkt
  • 24 Beiträge

Geschrieben: 08 October 2022 - 12:50

Can you add English to the display language of the forum?



#4 stefanmueller

stefanmueller

    SmartStore AG

  • Administrators
  • 458 Beiträge

Geschrieben: 11 October 2022 - 13:35

HI Suat,

 

please report this as an issue in our bugtracker at github,

 

for Smartstore 5 this is this repository:

 

https://github.com/s...tore/Smartstore

 

 

 

Re: forum display language, you can turn English on in the footer.

 

Angehängte Datei  Snag_6595e8b.png   34.31K   0 Anzahl Downloads

 

Greetings SStefan

 

 

 


Stefan