PhotoDune

WordPress + Ajax = problem

2079 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Community Moderator
  • Bought between 10 and 49 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
+10 more
mpc moderator says

Hi guys I am using Ajax to communicate between jQuery and PHP , the jquery takes data from the table and sends it to php, everything works great until there is 80 rows in the table after that it throws this error:

POST .../wp-admin/admin-ajax.php 403 (Forbidden) load-scripts.php:4

When I dug into it it points to the Ajax call, here is how the code looks like:

data = form.serializeArray();

$.post(ajaxurl, {
    action: 'save_settings',
    data: data,
    activeID: id_active,
    value: href
    }, function(response) {
         console.log(response);
    });
3549 posts
  • Author had a File in an Envato Bundle
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Referred more than 2000 users
  • Has been a member for 4-5 years
  • United Kingdom
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Blog Post
+4 more
quickandeasy moderator says

Did this mean to go in ML?

Maybe more people could help in All Marketplaces?

2079 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Community Moderator
  • Bought between 10 and 49 items
  • Referred between 200 and 499 users
  • Has been a member for 4-5 years
  • Won a Competition
+10 more
mpc moderator says

Did this mean to go in ML? Maybe more people could help in All Marketplaces?

OMG I am not sure how did I miss that, thanks!

2333 posts
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Elite Author
  • Contributed a Blog Post
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Has been a member for 4-5 years
+8 more
dtbaker moderator says

I’ve seen forbidden on particular hosting accounts when posting too much data – or data of a certain type.

If possible, try on a localhost or different hosting account to see if you get the same forbidden problem.

722 posts WordPress Ninja
  • Microlancer Beta Tester
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Most Wanted Bounty Winner
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 2-3 years
+2 more
TylerQuinn says

What are you using to handle the calls backside?

Make sure you have nopriv set as well:

add_action('wp_ajax_ActionName', 'callback');
add_action('wp_ajax_nopriv_ActionName', 'callback');

If that’s not the case try adding this to a .htaccess files in your /wp-admin/ directory only.

<IfModule mod_security.c>
SecFilterEngine Off
</IfModule>
by
by
by
by
by