Images not getting loaded openerp webclient with postgres 9.1 in windows

Asked by RASHIK EP

Hi,

When I install OpenERP Server with postgres 9.1 in windows, Home page Images not getting loaded in openerp webclient .

When I check the Image view It shows

 "data:image/png;base64,x6956424f5277304b47676f414141414e5355684555674141414751414141426b43414141414142566
...............

Image cannot be displayed because it contains errors ".

Looking for a fix.

Thanks
Rashik

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Web (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
RASHIK EP
Solved:
Last query:
Last reply:
Revision history for this message
kalmen (kalmenchia) said :
#1

same problem , to be more specific ,

I installed openerp 6.1 with 32 bit 9.1.5 postgresql on a AWS 64Bit windows 2008 Virtual machine.

Tried 64bit postgres ,

Tried restore db from postgres version of another machine where db backed up is working fine ,i.e. image
can display properly.

all not working.

Revision history for this message
RASHIK EP (rashikep) said :
#2

Hi kalmenchia,

Can you please tell me which version of postgres DB you backed up and restored on which version. I am trying to restore a DB backed up from postgres 9.1.5 on Ubuntu server to Postgres 9.1.5 on windows 2008 server. I tried both 32 bit and 64 bit version of postgres. But doesnt works..!

Revision history for this message
kalmen (kalmenchia) said :
#3

Hi Rashikep.

I have tested from windows 2003 , PostgresSQL 9.1.5 to AWS windows 2008 , PostgresSQL 9.1.5 ,
i t has the same problem .

~ i have tested both 32 bit and 64 bit of postgressql on 64bit AWS windows 2008 , SAME PROBLEM
~ i have tested edit the field ,in the ir.menu table , it is also not working .

However, i can quite sure that after insllation or restore of db , the database saved into the
ir.menu fields is not correct ,

My suspect to this issue when i use Chrome to display and confirm my thoughts ,

1. data:image/png;base64,x6956424f5277304b47... , it cannot display properly.

2. data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGV .... , THIS is from the working
    version which display the same image icon , SALES

as you can see that the data after BASE64 is different , so
i went to the postgresSQL field and check the content of the field ir_ui_menu.web_icon_data , and copy the
data in the field and tested it and confirmed that it restored correctly and the data CAN display the image.

so i can quite sure that OPENERP when it trying to display the content , it somehow miss interpreted the base64
image to something else.

and created bug report #1051754 , pls follow up from there.

Revision history for this message
RASHIK EP (rashikep) said :
#4

Hi,

Go to postgresql.conf and replace the line

#bytea_output = 'hex' # hex, escape

with:
bytea_output = 'escape' # hex, escape

Regards,
-Mario

Revision history for this message
Michal Klopocki (hu6hzq0zv8rdv031e6gz9a-michael) said :
#5

Thank you for this solution Mario, has worked fine.