dibe84
Posts: 0
Joined: Fri Dec 06, 2013 11:20 am

Error rendering an image from DB: parse error

I just god a paid subscription. Maybe we can involve the premium support to take a look to my problem that is really blocking me... Thanks a lot

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Error rendering an image from DB: parse error

Hi,

We've finished testing this. Unfortunately, it's a bug. You can wait for a fix or implement your own query function, but it should be a low-level AJAX function bypassing jQuery (otherwise it will trigger an error).

Please look for an example of AJAX request by regular means of your browser. Then you would need to pull a received response in one line, i.e. run:preresponse = response.replace(/[\r\n]/, '');
response_object = JSON.parse( response );

Appery('image_name').get(0).src = "data:image/png;base64," + response_object.base64data;/pre
Let us know if you have any further questions.

dibe84
Posts: 0
Joined: Fri Dec 06, 2013 11:20 am

Error rendering an image from DB: parse error

Hi Katya,

I'll try to write my own ajax function.

It is a global bug or it is affecting only my project? Because I had in plan anyway to create a new app from scratch, maybe it could fix the issue?

Thanks a lot,
Gabriele

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Error rendering an image from DB: parse error

Gabriele,

Unfortunately this is a common bug. Let us know if we can help.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Error rendering an image from DB: parse error

Hello! Sorry for inconvenience. You can try the following workaround - do not create your own AJAX function, create regular service but without mapping. On service Complete event add the following JS code to fill in Image src attribute:
prevar data = JSON.parse(jqXHR.responseText.replace(/[\r\n]/g, ''));
Appery('image_name').get(0).src = "data:;base64," + data.base64data;/pre

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Error rendering an image from DB: parse error

Hi Gabriele,

We pushed a fix. Please check if it works for you.

dibe84
Posts: 0
Joined: Fri Dec 06, 2013 11:20 am

Error rendering an image from DB: parse error

Hi Katya,

I still receiving the same error....

Maryna, can you give me more info about the workaround? Because even if i remove all the mapping from the service i receive the error. so i can't define a JS code on the service complete.

dibe84
Posts: 0
Joined: Fri Dec 06, 2013 11:20 am

Error rendering an image from DB: parse error

Ok, still receiving the error with the mapping but I was able to implement the workaround proposed by Maryna.

Thanks.
Gabriele

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Error rendering an image from DB: parse error

Gabriele,

We are sorry. A workaround suggested by Marina may be wrong. The main disadvantage is that error won't disappear because error handler is called.

https://developer.mozilla.org/en-US/d... Here you can find examples of custom realization AJAX request bypassing jQuery.

dibe84
Posts: 0
Joined: Fri Dec 06, 2013 11:20 am

Error rendering an image from DB: parse error

Hi. The workaround suggested by Marina works fine.
Is possible to have an update about the resolution of the bug? because I need to insert images iterating lists and it would be painful to develop a wororound for tat... and I'd prefer to wait for the resolution.

Gabirlee

Return to “Issues”