Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add a way to disable ajax calls on post edit pages #9685

Open
priscillamc opened this issue May 9, 2018 · 5 comments
Open

Comments

@priscillamc
Copy link

Is your feature request related to a problem? Please describe.

User notices slow performance editing posts with shortcodes and avoid disabling the Yoast metabox on the post edit page.

bildschirmfoto-2018-04-13-um-12-34-45

Describe the solution you'd like

The user would like to be able to disable the call to the wpseo_filter_shortcodes action.

why you think the feature request is something we should consider for the Yoast SEO plugins?

This could possibly be a workaround for other issues when users don't want to disable page analysis, etc. for the entire site. See issue #5942 and issue #5393

Additional context

@Globerada
Copy link

Globerada commented Nov 8, 2018

I hope this info helps. I have looking for a solution several weeks, because I didn't know what was happening.

I had a custom short code which loads a ton of lines into the post via:

      ob_start();	 
      include_once($file_to_include);
      $content = ob_get_contents();		
      ob_end_clean();	

This was slowing down the editor as @priscillamc stated. What I have done is to edit the function which register the shortcode to return an empty string if is a the post data from WP SEO does is present.

  $shortcodes = filter_input( INPUT_POST, 'data', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); 
  
  foreach ( $shortcodes as $shortcode ) { 
      if (stripos($shortcode, 'trx_title') !== false) {
        return '';
      }
  }  

@Pcosta88
Copy link
Contributor

Please inform the customer of conversation # 610683 when this conversation has been closed.

@suascat
Copy link

suascat commented Jul 13, 2023

Please inform the customer of conversation # 1036551 when this conversation has been closed.

@suascat
Copy link

suascat commented Jul 13, 2023

The user from the above ticket mentioned the slowness on the edit page is caused when Yoast SEO Local is activated.

For whatever reason, whenever navigating to just about any page in wp-admin, admin-ajax was making tons of calls with the wpseo_filter_shortcodes action when, and only when, Yoast Local was activated, resulting in 502s. Either deactivating Yoast Local or, or temporary fix of completely turning off the heartbeat on the post editor and the backend plus adding add_filter('wp_ajax_wpseo_filter_shortcodes', '__return_false', 10, 2); to the functions.php file stopped this behavior. This intense admin-ajax behavior would only happen when Yoast Local was activated.

@shabnam611
Copy link

Please inform the customer of conversation # 1042316 when this conversation has been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants