New entry Blog error in "Start date" field, separator hours incorrect ...

This is a place to discuss how to adapt mojoPortal to the needs of different cultures. Before asking questions here please first review the localization documentation.

This thread is closed to new posts. You must sign in to post in the forums.
9/3/2012 4:46:01 AM
Gravatar
Total Posts 9

New entry Blog error in "Start date" field, separator hours incorrect ...

When I create a new blog entry from the page:
"Blog / EditPost.aspx"
I always get the error:
"Error: String was not recognized as a valid DateTime"

I found what the problem is:
the field: "Start date"
HTML =
<input class="hasDatepicker" name="ctl00$mainContent$dpdpBeginDate" value="03/09/2012 11.23" id="ctl00_mainContent_dpdpBeginDate" type="text">

It open with the default value of today's date in this format example:
09/03/2012 11.23 with the ["." dot] separator hours.
Saving i receive the ASP.NET error.
While in the field i write manually the correct value: 09/03/2012 11:23 with the separator hour [":" colon]
or using the [...] to enter a date with the calendar, i can save done and without error.
Could be a problem with the "Culture = it-IT" and some converting date scripts ?

Many Thanks, and sorry for my bad English!

9/5/2012 2:39:41 PM
Gravatar
Total Posts 18439

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

Hi,

Sorry for the delayed response, but I'm not able to reproduce this problem. I tried using Firefox browser, I set my preferred language in the browser settings under Tools > Options to Italian. I visit our demo site and login as admin@admin.com with password admin 

Then I go to create a new blog post and the format is correct it has : not .

You did not mention what version of mojoPortal you are using, maybe upgrading will solve the problem. I know that we havw lots of Italian users and I have not seen others report this problem.

Hope that helps,

Joe

9/6/2012 3:50:30 AM
Gravatar
Total Posts 9

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

Sorry, I report below all versions of the portal.

I tried to "http://demo.mojoportal.com" as suggested and i add a new Article in the Blog, and the filed "start date" have properly the "colon" and not de "dot", it's work fine and i see all the blog function in Italian.
I've tried both with FF15, which IE9 on Win7 (obviously in Italian)

What can I check?
Where do you get the settings that field?
I check the setting of Culture, Language and Time, in the web.config / user.config or it could also depend on the Skin?

My site (for a medium size company) i'm an IT-Manager consulting, is under construction, I can, without any problem, send the link via "private message", and i can elavate your account as "Admin" if i do not trust the Guru of mojoportal? who else!

Version:

mojoPortal Versione 2.3.9.0 MSSQL (installed pack dot.net 3.5)
Sistema Operativo Microsoft Windows NT 6.1.7601 Service Pack 1
Informazioni ASP.NET v2.0.50727 Esecuzione in 'Partial Trust'
Fuso Orario Server: W. Europe Daylight Time
Ora locale del Server (GMT 2) 06/09/2012 10:34:17
Ora corrente a Greenwich (GMT o UTC): 06/09/2012 08:34:17

Versioni Funzionalita'

blog 2.6.0.0
contactform 0.0.0.6
eventcalendar 0.0.0.6
feed-manager 0.0.1.0
forums 2.2.0.0
imagegallery 0.0.0.8
kdmediaplayer 1.0.0.1
linksmodule 0.0.0.9
pollfeature-byChristianFredh 0.0.0.5
sharedfiles 0.0.1.0
surveyfeature 1.8.0.0
webstore 0.0.7.3

 

 

9/6/2012 9:50:37 AM
Gravatar
Total Posts 18439

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

I'm not sure what is causing that problem but it is related to jqueryui. Are you using jqueryui from the google cdn or self hosting the files? Maybe you are using an older version of jqueryui. Is the site public? Can you post the url?

9/7/2012 6:01:06 AM
Gravatar
Total Posts 9

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

The line in "web.config" are:(In "user.config" there any lines about jquerry)

<add key="UseGoogleCDN" value="true" />
<add key="GoogleCDNYUIVersion" value="2.6.0" />
<add key="GoogleCDNjQueryVersion" value="1.7.1" />
<add key="GoogleCDNjQueryUIVersion" value="1.8.16" />
<add key="DisableASPThemes" value="false" />

I did an upgrade from 1.3.7.6 (maybe), and I used the new web.config and user.config, and i replace the correct changes for my site installation. (I have not touched the lines of jquery) which are applied on your portal demo that work fine?
If you want I can change it if you send me the correct code/line/version.

The site is in an external hosting in webfarm, the site will be made ​​public by September 20th, if you want I can send you the url via mail.

 

9/7/2012 8:14:59 AM
Gravatar
Total Posts 18439

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

ok, but you could still be using locally hosted jqueryui files based on settings in your skin.

Can you post a link to your site?

9/7/2012 11:12:38 AM
Gravatar
Total Posts 18439

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

Are you forcing your site to use Italian?

ie if you put this in user.config does the problem still happen?

<add key="UseCultureOverride" value="true" />
<add key="site1culture" value="it-IT" />
<add key="site1uiculture" value="it-IT" />

make sure you touch web.config after that because changes in user.config are not detected automatically, so you need to touch (ie type a space in it and save) web.config to make it reload settings

Hope that helps,

Joe

9/8/2012 4:25:13 AM
Gravatar
Total Posts 9

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

Nothing good :-(

(i left your row culture force in user.config )

Always the same, and just press [now] button in the calendar interface it get the right value with the colon separator.

Here the "System log" i've clean the log and this the result when i press the [save] button with the defaul data value in the filed (dot separator.)

2012-09-08 11:14:40,618 ERROR 79.30.46.199 - it-IT - /siteit/Blog/EditPost.aspx?mid=22&pageid=6 - mojoPortal.Web.mojoBasePage - 79.30.46.199-it-IT - /siteit/Blog/EditPost.aspx?mid=22&pageid=6
System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at mojoPortal.Web.BlogUI.BlogEdit.Save()
at mojoPortal.Web.BlogUI.BlogEdit.btnUpdate_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
2012-09-08 11:14:40,618 ERROR 79.30.46.199 - it-IT - /siteit/Blog/EditPost.aspx?mid=22&pageid=6 - mojoPortal.Web.Global -  Referrer(http://www.************.it/siteit/Blog/EditPost.aspx?mid=22&pageid=6) useragent Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0
System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at mojoPortal.Web.BlogUI.BlogEdit.Save()
at mojoPortal.Web.BlogUI.BlogEdit.btnUpdate_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

9/8/2012 12:32:13 PM
Gravatar
Total Posts 18439

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

Sorry but I'm out of ideas, it works correctly for me and uses colon separator not dot separator. I can only help if I can reproduce the problem, but in this case I cannot reproduce the problem.

9/10/2012 7:26:23 AM
Gravatar
Total Posts 9

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

I worked hard, and I have achieved important results, I try to motivate you!: Risatona

i fix the error and fill in the field the "colon" if in:
web.config
(<globalization Culture="en-US" uiCulture="en-US" .../>) so forced in en and not as it was by default: "auto:en-US"

Plus: for have the user interface in Italian I tried:
(<globalization culture="en-US" uiCulture="auto:en-US" ..../>) It works!

BUT I do not know (culture = "en-US" forced) what is involved in the rest of the site.
for example, startdate field now works, however, reverses the month with the day as it is right in en but not HERE! (and we don't use the AM/PM 09/10/2012 2:13 PM, my users to be able to tell that the day the month should be reversed? )

I would be happier to solve olso this, can you help me even a little? I will try to get you at least 2 beers!

9/10/2012 10:42:18 AM
Gravatar
Total Posts 18439

Re: New entry Blog error in "Start date" field, separator hours incorrect ...

You should leave the <globalization element as it was and just use these to force a site culture:

<add key="UseCultureOverride" value="true" />
<add key="site1culture" value="it-IT" />
<add key="site1uiculture" value="it-IT" />

however if it is a multi site installation note that the 1 is the site id, so if the site id is not 1 for your site then you need to change it, ie if site id is 2 then:

<add key="UseCultureOverride" value="true" />
<add key="site2culture" value="it-IT" />
<add key="site2uiculture" value="it-IT" />

See also Localization

 

You must sign in to post in the forums. This thread is closed to new posts.