Namespacing missing for javascript variable ajax_url which give syntax error

in Download Manager Free

Viewing 6 posts - 1 through 6 (of 6 total)
Jun 4, 2021 at 9:10 am
#154865
Participant
Praveen Mudaliar
OP

Hello There,
We are getting syntax error because of namespace is missing in variable name ajax_url.

Can you please update it as var name ajax_url is very common and it may conflict.

Details :

SyntaxError: Identifier ‘ajax_url’ has already been declared

<script>

var wpdm_site_url = ‘<?php echo site_url(‘/’); ?>’;

var wpdm_home_url = ‘<?php echo home_url(‘/’); ?>’;

var ajax_url = ‘<?php echo admin_url(‘admin-ajax.php’); ?>’;

var wpdm_ajax_url = ‘<?php echo admin_url(‘admin-ajax.php’); ?>’;

var wpdm_ajax_popup = ‘<?php echo get_option(‘__wpdm_ajax_popup’, 0); ?>’;

</script>

Jun 4, 2021 at 9:25 am
#154866
Spectator
Humayon

Hi @praveenk,
You are getting the syntax error most probably for the other third-party plugins.
For now, you need to comment out the line or deactivate other plugins if that is not required. Also, in the next major update, we have already scheduled to remove those vars.
After that update, they will be like wpdm.ajax_url.
Hope you understand.
Thank you

Jun 23, 2021 at 9:00 am
#155648
Participant
Praveen Mudaliar
OP

Hello Humayon,
When we can see the major release which you have mentioned ?

Jun 23, 2021 at 9:16 am
#155649
Keymaster
Shahjada
Staff

Hopefully, within the next week, we are almost done with testing.

Jul 27, 2021 at 9:10 am
#158378
Participant
Praveen Mudaliar
OP

When we will be having release for this fix ?

Jul 27, 2021 at 9:29 am
#158381
Spectator
Humayon

Hello @praveenk,
Sorry for the inconvenience.
We will implement/adjust the issue in the upcoming update 3.2.13 which will be released within this week.
So, please spare us some additional time.
Cheers!

Viewing 6 posts - 1 through 6 (of 6 total)

The topic "Namespacing missing for javascript variable ajax_url which give syntax error" is closed to new replies.