Page 2 of 3

Error rendering an image from DB: parse error

Posted: Thu Jan 23, 2014 10:47 am
by dibe84

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


Error rendering an image from DB: parse error

Posted: Thu Jan 23, 2014 1:45 pm
by Kateryna Grynko

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.


Error rendering an image from DB: parse error

Posted: Thu Jan 23, 2014 3:06 pm
by dibe84

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


Error rendering an image from DB: parse error

Posted: Thu Jan 23, 2014 3:07 pm
by Kateryna Grynko

Gabriele,

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


Error rendering an image from DB: parse error

Posted: Thu Jan 23, 2014 6:32 pm
by Maryna Brodina

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


Error rendering an image from DB: parse error

Posted: Fri Jan 24, 2014 8:58 am
by Kateryna Grynko

Hi Gabriele,

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


Error rendering an image from DB: parse error

Posted: Fri Jan 24, 2014 12:09 pm
by dibe84

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.


Error rendering an image from DB: parse error

Posted: Fri Jan 24, 2014 12:30 pm
by dibe84

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

Thanks.
Gabriele


Error rendering an image from DB: parse error

Posted: Fri Jan 24, 2014 12:57 pm
by Kateryna Grynko

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.


Error rendering an image from DB: parse error

Posted: Thu Feb 06, 2014 10:14 am
by dibe84

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