Item image upload problem and non english character in page name

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



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/7574b0cc-8043-4a8f-931f-9e3049ac51f2%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
Is there anybody to help me on my issues?

Thanks 

Ali




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/7bf976c7-7ca2-4193-9705-220ebf983173%40googlegroups.com.

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

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.

body{font-family:Helvetica,Arial;font-size:13px}body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding:1em; margin:auto; background:#fefefe; }

h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}

h1 {
color: #000000;
font-size: 28pt;
}

h2 {
border-bottom: 1px solid #CCCCCC;
color: #000000;
font-size: 24px;
}

h3 {
font-size: 18px;
}

h4 {
font-size: 16px;
}

h5 {
font-size: 14px;
}

h6 {
color: #777777;
background-color: inherit;
font-size: 14px;
}

hr {
height: 0.2em;
border: 0;
color: #CCCCCC;
background-color: #CCCCCC;
}

p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0;
}

a, a:visited {
color: #4183C4;
background-color: inherit;
text-decoration: none;
}

#message {
border-radius: 6px;
border: 1px solid #ccc;
display:block;
width:100%;
height:60px;
margin:6px 0px;
}

button, #ws {
font-size: 12 pt;
padding: 4px 6px;
border-radius: 5px;
border: 1px solid #bbb;
background-color: #eee;
}

code, pre, #ws, #message {
font-family: Monaco;
font-size: 10pt;
border-radius: 3px;
background-color: #F8F8F8;
color: inherit;
}

code {
border: 1px solid #EAEAEA;
margin: 0 2px;
padding: 0 5px;
}

pre {
border: 1px solid #CCCCCC;
overflow: auto;
padding: 4px 8px;
}

pre > code {
border: 0;
margin: 0;
padding: 0;
}

#ws { background-color: #f8f8f8; }

table {
border-collapse: collapse;
font-family: Helvetica, arial, freesans, clean, sans-serif;
color: rgb(51, 51, 51);
font-size: 15px; line-height: 25px;
padding: 0; }

table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }

table tr:nth-child(2n) {
background-color: #f8f8f8; }

table tr th {
font-weight: bold;
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }

table tr td {
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }

table tr th :first-child, table tr td :first-child {
margin-top: 0; }

table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }

.send { color:#77bb77; }
.server { color:#7799bb; }
.error { color:#AA0000; }


Thanks,
Anand Doshi.

On 3 April 2014 at 4:50:48 pm, aliosman20 (at…@gmail.com) wrote:

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
--
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/7574b0cc-8043-4a8f-931f-9e3049ac51f2%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/etPan.5340ff7d.7545e146.1e2%40apdmacbook.local.

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


2014-04-06 10:17 GMT+03:00 Anand Doshi <an...@erpnext.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.

On 3 April 2014 at 4:50:48 pm, aliosman20 (at...@gmail.com) wrote:

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
--
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/7574b0cc-8043-4a8f-931f-9e3049ac51f2%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/etPan.5340ff7d.7545e146.1e2%40apdmacbook.local.

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/CA%2B-d9uQkqojxx3eou1VqUnP0CGYKJGCxnX%3Dk5M2%2BVRp5tjJ7pg%40mail.gmail.com.

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