1
reWARder
News Module Date Bug with one language
  • 2013/7/25 12:24

  • reWARder

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/5/28


I have the next issue I don't seem to be able to solve myself. My xoops installation is using xlanguage and I have four languages installed: English, German, French and Italian.

When I set the language and I go into the news I cant set the date. I get to see what's visible on the pic attached.

Has anyone ever had the same issue and solved it?

Resized Image

2
reWARder
Re: News Module Date Bug with one language
  • 2013/8/10 14:48

  • reWARder

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/5/28


Nobody here to help me with this one?

3
Roby73
Re: News Module Date Bug with one language
  • 2013/8/10 22:51

  • Roby73

  • Friend of XOOPS

  • Posts: 262

  • Since: 2011/6/15


Missing definition in language file...
Sorry i don't know show the file to help you. i can't access to server, i am in holiday


4
jcweb
Re: News Module Date Bug with one language
  • 2013/8/12 13:14

  • jcweb

  • Quite a regular

  • Posts: 253

  • Since: 2005/4/25



5
Mamba
Re: News Module Date Bug with one language
  • 2013/8/20 11:38

  • Mamba

  • Moderator

  • Posts: 11367

  • Since: 2004/4/23


Quote:
I think they will never or not able fix this problem.

I did looked into this and that's what I found (and hopefully, I didn't make any mistake - so please test it):

1) The error what he was getting happens normally when he was using an older translation that didn't have defined the "_CAL_FORMAT" in /language/xxx/calendar.php like this or something similar:

define('_CAL_FORMAT',"Y-m-d");

To test it, in your local language comment it out, and try it.

2) Replacing "_CAL_FORMAT" by "_SHORTDATESTRING" in "formtextdateselecte.php was just a shortcut to get the value

3) However, as long as you were using in the "_SHORTDATESTRING" the value "m", e.g.:

define('_SHORTDATESTRING','m/d/Y');


then it was working fine. But there was a bug in calendar.js for value "n", like here:

define('_SHORTDATESTRING','n/j/Y');


Normally it was not visible, because we had hard-coded in calendar.php:

define('_CAL_FORMAT',"Y-m-d");


I fixed that now, and also assigned the "_SHORTDATESTRING" to "_CAL_FORMAT":

define('_CAL_FORMAT',_SHORTDATESTRING);


so there should be no more problems, as long as "_SHORTDATESTRING" language variable is defined in your "global.php" local language files.

I have committed the code to XOOPS SVN, so please test it in your local langugaes and let us know if it works for you...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

6
reWARder
Re: News Module Date Bug with one language
  • 2013/8/20 15:53

  • reWARder

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/5/28


Thank you, this did the trick for me!

Login

Who's Online

77 user(s) are online (49 user(s) are browsing Support Forums)


Members: 0


Guests: 77


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits