Input string was not in a correct format

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
hi all,
       write now am developing a website with RTL (Arabic),my problem is when i try to add a product in admin or try to add a product in store front i get a error like INPUT STRING WAS NOT IN A CORRECT FORMAT.......i dont have this problem when i use English as my language.....i get this error when ever i add a product to the category or to the shopping cart.....am doing this with the local host....any suggestions...



thanks.in advance
Il y a 12 ans
Thammu wrote:
hi all,
       write now am developing a website with RTL (Arabic),my problem is when i try to add a product in admin or try to add a product in store front i get a error like INPUT STRING WAS NOT IN A CORRECT FORMAT.......i dont have this problem when i use English as my language.....i get this error when ever i add a product to the category or to the shopping cart.....am doing this with the local host....any suggestions...



thanks.in advance


Have you set Arabic as a Right-to-left: ?
Il y a 12 ans
yes i did................i ticked the box in admin panel...everything is fine but when i try to add a product in admin section
i get a error like "Format string was unhanded by user code"....Input string was not in correct format..i get this error in

CustomerActivityService.cs line No 160  

"comment = string.Format(comment, commentParams);"  ------in this Line

i dont have this problem when i use English as my choice......

Display order For:

English  en-US 0  
Arabic  ar-AE  1

i also get error when i click the new products tab in Menu....i get

Divide By zero exception was unhanded by user code

attempted to divide by zero

in

Pagedlist.cs LINE:61

TotalPages = TotalCount / pageSize;    -in this Line

if you want my xml file i can pass it to you by mail just PM me your mail id please.....
Il y a 12 ans
i have looked at the CustomerActivityService.cs, I dont think its a RTL problem. I'm guessing here, i think its the some of the arabic chars that are making the error
again its a guess, needs to debug and see
Il y a 12 ans
may be thats the problem.........i have no idea what to do am stuck up here and i have no way out.....please help
Il y a 12 ans
Thammu wrote:
yes i did................i ticked the box in admin panel...everything is fine but when i try to add a product in admin section
i get a error like "Format string was unhanded by user code"....Input string was not in correct format..i get this error in

CustomerActivityService.cs line No 160  

"comment = string.Format(comment, commentParams);"  ------in this Line

i dont have this problem when i use English as my choice......

Display order For:

English  en-US 0  
Arabic  ar-AE  1

i also get error when i click the new products tab in Menu....i get

Divide By zero exception was unhanded by user code

attempted to divide by zero

in

Pagedlist.cs LINE:61

TotalPages = TotalCount / pageSize;    -in this Line

if you want my xml file i can pass it to you by mail just PM me your mail id please.....






oops am sorry for this........i unfortunately edited the Recently added products to 0....

  so i got the error divide by zero error....


i will tell you what was the error so that if somebody who go through this problem may find this useful .....


  when you get error like Divide by zero error when you try cliking the new products tab in header menu.......

you might have made the value to zero....so please change to some number to avoid this error....


hope this helps for somebody who did this by mistake like i did.......




unfortunately i cant find the answer for the Arabic one i get this error Input string was not in correct format when ever i try adding product in Arabic...so sad........
Il y a 12 ans
am sorry again its in configuration ->settings->catalog settings in that change newly added products value to some value..to avoid this error.....its very rare Hope some find this useful......
Il y a 12 ans
but the problem which still unsolved is......Input string Error.....when i try adding products by using Arabic as my language of choice..................................
somebody  please help me from this...................


the Error is .....................i

CustomerActivityService.cs line No 160  

"comment = string.Format(comment, commentParams);"  ------in this Line i get a

input string exception unhanded by user code

"input string was not in a correct foramt"



i dont have this problem when i use English as my choice......

Display order For:in language is as follows

English  en-US 0  
Arabic  ar-AE  1



where to change this



regards thammu
Il y a 11 ans
Hello Thammu

I'm sorry for the delay to reply to you

unfortunately it seems like the forum dosn't have the feture to send me an email when i had a PM.

any way ,, what i understand from your private message is that you have translated the text using ping translator + you have fixed where sometimes the brakets are not in the correct possition as it seems.

will, this is the resone of your problem, some string are using something like {0} or {1} but when you use arabic you will find the bracts {} in the start of the word. this is normal because you using rtl text with ltr text just leave it as it is

for example:


الحساب '{0}' لا يملك حقوق التعديل على المجلد '{1}'. الرجاء منح حقوق التعديل على هذا المجلد

and

فشل في تنصيب: {0}


from what it look like its not currect but actuly its correct and you see it like that just because of the reading.

to make sure its on the right way; copy it to note pad and press Right-Shift + Right-ctrl

so when you translate the string just dont touch {0} and leave it as its :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.