Analytics Rendering Problem with RTL languages

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



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-forum+un…@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.
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-forum+un…@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.



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/9F5C275E-3DD1-419D-929E-D56D2ABE7806%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.
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

On Wednesday, May 21, 2014 10:35:39 AM UTC+2, rushabh wrote:
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-forum+un…@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.



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-forum+un…@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.

    For more options, visit https://groups.google.com/d/optout.
@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



On 03-Jun-2014, at 12:31 am, Nihad Nagi <ni...@nfiniti.net> wrote:

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

On Wednesday, May 21, 2014 10:35:39 AM UTC+2, rushabh wrote:
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-forum+un…@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.




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-forum+un…@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.

    For more options, visit https://groups.google.com/d/optout.



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-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/BBF63176-A164-4FED-9432-539CC79A0F8E%40gmail.com.

    For more options, visit https://groups.google.com/d/optout.