Item image upload problem and non english character in page name

36 views
Skip to first unread message

aliosman20

unread,
Apr 3, 2014, 7:20:46 AM4/3/14
to erpnext-dev...@googlegroups.com
Hi all,

Queston 1: After I upload the item image in item page, there is no image file on image selection field. I got this error on my console:

Traceback (innermost last): File "lib/webnotes/handler.py", line 54, in uploadfile ret = webnotes.utils.file_manager.upload() File "lib/webnotes/utils/file_manager.py", line 26, in upload filedata = save_uploaded(dt, dn) File "lib/webnotes/utils/file_manager.py", line 35, in save_uploaded return save_file(fname, content, dt, dn) File "lib/webnotes/utils/file_manager.py", line 98, in save_file temp_fname = write_file(content, files_path) File "lib/webnotes/utils/file_manager.py", line 200, in write_file with open(fname, 'w+') as f: IOError: [Errno 13] Permission denied: u'/var/www/erpnext/public/files/1f47c94b8b8cce098735bf4133205e3cf6749cafb34a0f466f3679b4'

Questin 2: On website and shopping cart, Pagename is autogenerated by erpnext in all item group and items but there is problem with auto generate page name in non english word like "ü, ş, ğ, ö, ç,ı".

For example: İtem name is "Tuğla-çeşme" so page name should be "tugla-cesme".

How can we handle this non english character on page name? or change all non english character to english character?
ü>>u
ö>>o
ş>>s
ı>>i
ç>>c
ğ>>g

Thanks,

Ali

aliosman20

unread,
Apr 4, 2014, 9:22:24 AM4/4/14
to erpnext-dev...@googlegroups.com
Is there anybody to help me on my issues?

Thanks 

Ali


Anand Doshi

unread,
Apr 6, 2014, 3:17:16 AM4/6/14
to aliosman20, erpnext-dev...@googlegroups.com

Hi Ali.

Answer 1: public/files folder does not seem to have write permission.

Answer 2: You will need to override the autoname method of Website Generator in website.py. We have not used the standard slugifier, which replaces accented chars to its ascii equivalents, because it also removes characters that are not available in ascii. So, for an item name in chinese, it would lead to a blank page name.

Thanks, Anand.


Thanks,
Anand Doshi.
--
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/7574b0cc-8043-4a8f-931f-9e3049ac51f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ali Osman TEKKANAT

unread,
Apr 9, 2014, 6:02:40 AM4/9/14
to erpnext-dev...@googlegroups.com
Hi Anand,

I solved first question. But in second question I did not find website.py file and I am not familiar with coding.

So if I translate erpnext to Turkish, is that autorename problem solve?

Thanks,


Ali Osman Tekkanat


Reply all
Reply to author
Forward
0 new messages