New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REGRESSION: date of article and module manager broken in persian language #6207
Comments
Please set backend language to persian and logout joomla, then again login with persian language! |
Same. no issue for the date. BUT I confirm the issue for the modules tabs and this is a big regression! |
I can confirm that there is an issue with the persian date. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6207. |
date has to be tested with debug OFF as there is no uncompressed jalali calendar_setup Can't find why modules tabs don't show |
My tests were with debug OFF This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6207. |
The thai language issue was a JS error and unrelated see http://forum.joomla.org/viewtopic.php?f=706&t=874697&p=3272023#p3272023 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6207. |
I found out that the specifc calendar js file for Persian is the reason why module tabs are broken
|
Issue is this chnage
I.e. mootools is no more loaded The fa-IR js file has to be modified |
As the fix is beyond the control of the core of joomla and is something for the Persian Translation Team can this be closed here? This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6207. |
I would like to leave that open simply because I doubt the the translators will be able to fix it themself. @dgt41 or @Fedik maybe? |
Maybe check with the Thai translation team as it looks like they fixed an On 28 February 2015 at 14:13, Thomas Hunziker notifications@github.com
Brian Teeman |
Thanks for that info. I've sent them an email to ask what they did. |
I can confirm error on Module edit, but in content all looks good . But it very tricky to fix/debug, as they do not provide uncompressed version of calendar.js |
Aww, comon. It's sure simpler to learn than JavaScript 😃 |
https://gist.github.com/dgt41/cfcbe426029726ef63e0 |
@test It's even worse compared to the original one. |
@dgt41 If I change ONLY in the original file It looks like working here. |
@infograf768 in date article problem, when save article after 4time, date is ok: |
@farhadst what browser you use? @infograf768 it could not work in IE, var method, event;
if(document.addEventListener){
method = 'addEventListener';
event = 'submit';
} else {
method = 'attachEvent';
event = 'onsubmit';
}
C.inputField.form[method](event, function() { |
@Fedik But does not solve article date! |
@infograf768 I thought that I changed only that part on that file :) |
something tells me that it based on https://github.com/farhadi/JalaliJSCalendar 😄 |
@Fedik I will bet that the problem here is the code to support multiple instances... |
@dgt41 this simple to check, just leave the calendar only for one field, other set to text, example |
This is the line that produces the error: C.inputField.value = date.print(C.ifFormat, 'jalali', C.langNumbers); |
I updated the gist: https://gist.github.com/dgt41/cfcbe426029726ef63e0 Correction Line 36: F("langNumbers", true); // Needs to be true |
@dgt41 i test this code https://gist.github.com/dgt41/cfcbe426029726ef63e0 |
Works here too! @mhem Therefore jalali date will also work when Debug is on.
|
@dgt41 |
@infograf768 |
This can now be closed |
Closed as requested. |
Hi, one more issue. |
@MHEHM have you tried to clean your browser’s cache? |
Also, on which page does it fails exactly? |
@dgt41 yes, i cleaned my browser cache. |
@MHEHM @infograf768 |
I confirm the error: |
@MHEHM @infograf768 Here we go then: jQuery(document).ready(function() {
var form_id = "#"+C.inputField.form.id;
jQuery(form_id).on("submit", function() {
var dateEl = C.inputField || C.displayArea;
var dateFmt = C.inputField ? C.ifFormat : C.daFormat;
if (dateEl && parseInt(dateEl.value) != 0 && dateEl.value != '') {
var date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt, 'jalali');
C.inputField.value = date.print(C.ifFormat, 'gregorian', C.langNumbers);
}
});
}); This will NOT work as there is a BUG on core-uncompressed.js at line 33: jQuery(form).submit(); NEEDS to be: jQuery(form).trigger("submit"); Once you verify that this also works on your setups I will make a PR for core.js |
Please also test #6580, to get this bug corrected once for good! |
@dgt41 I tested your last code with #6580 fix, and it worked for me. |
Works great here too. |
Salam |
@dgt41 |
jQuery(document).ready(function() {
var form_id = "#"+C.inputField.form.id;
jQuery(form_id).on("submit", function() {
var dateEl = C.inputField || C.displayArea;
var dateFmt = C.inputField ? C.ifFormat : C.daFormat;
if (dateEl && parseInt(dateEl.value) != 0 && dateEl.value != '') {
var date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt, 'jalali');
C.inputField.value = date.print(C.ifFormat, 'gregorian', C.langNumbers);
}
});
}); But will need 3.4.2 for the proper submit binding |
@dgt41 |
@infograf768 To elaborate a little more (previous comment was from my mobile): @Fedik Yes you are right here! I guess trying to figure out why this code didn’t execute in conjunction with #6580 I tried all the possible variations I could think, and this just left hanging there 😃 |
@dgt41 Thanks |
Hi This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6207. |
install joomla 3.4
install persian language
set administrator panel (backend) to persian language
(when backend language set to En, everything is ok)
The text was updated successfully, but these errors were encountered: