Analytics Rendering Problem with RTL languages

42 views
Skip to first unread message

Nihad Nagi

unread,
May 20, 2014, 5:25:08 PM5/20/14
to erpnext-dev...@googlegroups.com
Hi,
First of all, let me truly thank you for your prosperous and intelligent solution that from my humble opinion is better than all other Compiere based ERPs in the market.Keep it up.
My issue is with the analytics reports in general. Everything works fine if the user's language is LTR, but when it is set to an RTL language like Arabic, the analytics reports don't show up.
The stack-trace shows that the FILTER variable is undefined:
  1. Uncaught TypeError: Cannot read property 'get' of undefined frappe.min.js:1191
    1. frappe.views.GridReport.Class.extend.apply_filterfrappe.min.js:1191
    2. (anonymous function)VM787:160
    3. o.extend.eachjquery.min.js:2
    4. erpnext.StockAnalytics.erpnext.StockGridReport.extend.update_groupsVM787:158
    5. erpnext.StockAnalytics.erpnext.StockGridReport.extend.prepare_dataVM787:114
    6. frappe.views.GridReport.Class.extend.refreshfrappe.min.js:1180
    7. (anonymous function)frappe.min.js:1172
    8. o.event.dispatchjquery.min.js:3
    9. $event.dispatchVM789:41
    10. r.handle
  2. var filter=this.filter_inputs[fieldname].get(0); is undefined as shown.
Any help on this matter would be highly appreciated, once again, Thanks and Goodluck.
Regards,
Nihad

Rushabh Mehta

unread,
May 21, 2014, 4:35:39 AM5/21/14
to erpnext-dev...@googlegroups.com
Hi,

@rushabh_mehta

On 21-May-2014, at 2:55 am, Nihad Nagi <ni...@nfiniti.net> wrote:

Hi,
First of all, let me truly thank you for your prosperous and intelligent solution that from my humble opinion is better than all other Compiere based ERPs in the market.Keep it up.

Thanks!

My issue is with the analytics reports in general. Everything works fine if the user's language is LTR, but when it is set to an RTL language like Arabic, the analytics reports don't show up.
The stack-trace shows that the FILTER variable is undefined:
  1. Uncaught TypeError: Cannot read property 'get' of undefined frappe.min.js:1191
    1. frappe.views.GridReport.Class.extend.apply_filterfrappe.min.js:1191
    2. (anonymous function)VM787:160
    3. o.extend.eachjquery.min.js:2
    4. erpnext.StockAnalytics.erpnext.StockGridReport.extend.update_groupsVM787:158
    5. erpnext.StockAnalytics.erpnext.StockGridReport.extend.prepare_dataVM787:114
    6. frappe.views.GridReport.Class.extend.refreshfrappe.min.js:1180
    7. (anonymous function)frappe.min.js:1172
    8. o.event.dispatchjquery.min.js:3
    9. $event.dispatchVM789:41
    10. r.handle
  2. var filter=this.filter_inputs[fieldname].get(0); is undefined as shown.
Any help on this matter would be highly appreciated, once again, Thanks and Goodluck.

This does not seem like a issue with RTL (though there is a general issue of handling RTL, which we hope will be fixed in an upcoming release of Bootstrap) can you dig deeper.

Regards,
Nihad

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/65d69ba9-4d48-4dc0-b90a-f414533ca649%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nihad Nagi

unread,
Jun 2, 2014, 3:01:03 PM6/2/14
to erpnext-dev...@googlegroups.com
Hi Rushbash,
This is exactly what I meant, I passed to you an example to regenerate the issue at your end, if you wanted. It got nothing to do with bootstrap, its the way the Analytics JS handles the translation, filter fieldnames shouldn't be translated and kept as they are, to be usable in subsequent operations. I fixed it at my end, thanks.
Regards,
Nihad
Hi,

@rushabh_mehta

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.

Nabin Hait

unread,
Jun 3, 2014, 5:32:44 AM6/3/14
to erpnext-dev...@googlegroups.com
@Nihad,

Thanks for debugging and pointing out the issue. We have fixed the issue at our end as well. 

You can check the changes here https://github.com/frappe/erpnext/pull/1737



To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/6cb0ab4c-2808-4208-a537-6ae5496a73b9%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages