update jrCore_notice_page

d.redaelli
d.redaelli
@dredaelli
11 years ago
9 posts
I have updated jrCore_notice_page function because when jrCore_is_ajax_request() the notices were not shown

if (jrCore_is_ajax_request()) {
$_er['notices'][] = array('type' => $notice_type, 'text' => $notice_text);
jrCore_json_response($_er);
exit;
}






updated by @dredaelli: 07/23/14 12:31:42AM
brian
@brian
11 years ago
10,148 posts
jrCore_notice_page should not be found anywhere that a request is being made via AJAX - it should be using jrCore_form_result(). Can you let me know where you see the jrCore_notice_page call at that is being called when access via an AJAX call?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
d.redaelli
d.redaelli
@dredaelli
11 years ago
9 posts
for example

function view_jrBlog_update_save($_post, &$_user, &$_conf)
...........
// Make sure we get a good _item_id
if (!isset($_post['id']) || !jrCore_checktype($_post['id'], 'number_nz')) {
jrCore_notice_page('error', 14);
jrCore_form_result('referrer');
}
...........





if (!isset($_post['id']) || !jrCore_checktype($_post['id'], 'number_nz'))
the message error not appear without the fix
brian
@brian
11 years ago
10,148 posts
Thank you - this is a bug. It should be jrCore_set_form_notice() NOT jrCore_notice_page().

I will get that fixed up.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 years ago
10,148 posts
I've got this fixed in the Profile Blog module 1.0.6 - update and this should work properly now.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
d.redaelli
d.redaelli
@dredaelli
11 years ago
9 posts
there is also the problem in many other modules:
jrAudio
jrPage
...
brian
@brian
11 years ago
10,148 posts
d.redaelli:
there is also the problem in many other modules:
jrAudio
jrPage
...

Thanks - I will check that out.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags