• Resolved Mitchell Gilbertson

    (@mgilbertson)


    I use this plugin on many sites(over 500). All of them that are utilizing ajax have the same issue. Even with every option in SPB disabled, it still breaks. It works fine if you are logged in, but it does not work for non-logged in users.

    This is not an issue with my code performing the ajax requests. I have both the wp_ajax_ and wp_ajax_nopriv calls and it was working on all sites previously. Disabling SPB is the only solution I have found.

    Whenever a non-logged in user performs an ajax request, the request gets redirected to /wp-admin/admin.php?page=spb-settings, which then gets redirected to /wp-login.php. Not sure why this would be happening, but it is breaking every AJAX request.

    https://imgur.com/a/anI0U5U

    I have created a sandbox environment with a copy of one of the sites we are having the issue with. All plugins except for ACF Pro and SPB are disabled. Every setting in SPB is set to disabled.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Mitchell Gilbertson

    (@mgilbertson)

    {“module_tweaks”:”0″,”instant_page”:”0″,”trim_query_strings”:”0″,”disable_self_pingbacks”:”1″,”dequeue_emoji_scripts”:”1″,”disable_post_embeds”:”0″,”dequeue_comment_reply_script”:”0″,”dequeue_dashicons”:”0″,”dequeue_block_library”:”0″,”dequeue_global_styles”:”0″,”heartbeat_settings”:”enabled”,”post_revisions”:99,”autosave_interval”:1,”declutter_head”:{“declutter_shortlinks”:”0″,”declutter_adjacent_posts_links”:”0″,”declutter_wlw”:”0″,”declutter_rsd”:””,”declutter_rest_api_links”:””,”declutter_feed_links”:””,”declutter_wp_version”:”0″},”roles_to_disable_sbp”:””,”module_caching”:”0″,”caching_expiry”:10,”caching_separate_mobile”:”0″,”caching_warmup_after_clear”:”0″,”caching_exclude_urls”:””,”caching_exclude_cookies”:””,”caching_include_query_strings”:”utm_source”,”ls_cache_info”:””,”module_caching_ls”:”0″,”caching_ls_cache_logged_in_users”:””,”caching_ls_expiry”:10,”caching_ls_separate_mobile”:”0″,”caching_ls_exclude_urls”:””,”caching_ls_exclude_cookies”:””,”caching_ls_include_query_strings”:”name\nfbclid\ngclid\ngclsrc\nutm_content\nutm_term\nutm_campaign\nutm_medium\nutm_source\nutm_id\n_ga\nmc_cid\nmc_eid\n_bta_tid\n_bta_c\ntrk_contact\ntrk_msg\ntrk_module\ntrk_sid\ngdfms\ngdftrk\ngdffi\n_ke\nredirect_log_mongo_id\nredirect_mongo_id\nsb_referer_host\nmkwid\npcrid\nef_id\ns_kwcid\nmsclkid\ndm_i\nepik\npk_campaign\npk_kwd\npk_keyword\npiwik_campaign\npiwik_kwd\npiwik_keyword\nmtm_campaign\nmtm_keyword\nmtm_source\nmtm_medium\nmtm_content\nmtm_cid\nmtm_group\nmtm_placement\nmatomo_campaign\nmatomo_keyword\nmatomo_source\nmatomo_medium\nmatomo_content\nmatomo_cid\nmatomo_group\nmatomo_placement\nhsa_cam\nhsa_grp\nhsa_mt\nhsa_src\nhsa_ad\nhsa_acc\nhsa_net\nhsa_kw\nhsa_tgt\nhsa_ver\n_branch_match_id”,”module_css”:”0″,”enable_criticalcss”:”0″,”criticalcss_default”:””,”criticalcss_codes”:{“is_front_page”:””,”is_home”:””,”is_single”:””,”is_page”:””,”is_category”:””,”is_tag”:””,”is_archive”:””},”remove_criticalcss”:”1″,”criticalcss_excludes”:””,”css_inline”:”0″,”css_minify”:”0″,”css_exclude”:””,”module_assets”:”0″,”minify_html”:”0″,”optimize_gfonts”:”0″,”missing_image_dimensions”:”0″,”localize_tracking_scripts”:”0″,”lazyload”:”0″,”lazyload_exclude”:””,”js_optimize”:”off”,”js_exclude”:”js\/jquery\/jquery.js\r\njs\/jquery\/jquery.min.js”,”js_include”:””,”js_footer”:”0″,”js_footer_exclude”:”js\/jquery\/jquery.js\r\njs\/jquery\/jquery.min.js”,”preboost”:{“preboost_enable”:””,”preboost_include”:””,”preboost_featured_image”:””},”cdn_enable”:”0″,”cdn_url”:””,”cdn_includes”:””,”cdn_excludes”:””,”cloudflare_enable”:”0″,”cloudflare_api”:””,”cloudflare_email”:””,”cloudflare_zone”:””,”cf_rocket_loader_enable”:”0″,”cf_dev_mode_enable”:”0″,”cf_css_minify_enable”:”0″,”cf_html_minify_enable”:”0″,”cf_js_minify_enable”:”0″,”cf_apo_enable”:”0″,”cf_apo_device_type”:”0″,”cf_browser_cache_ttl”:”0″,”sucuri_enable”:”0″,”sucuri_api”:””,”sucuri_secret”:””,”sbp_csp_warning”:””,”module_woocommerce”:”0″,”woocommerce_disable_cart_fragments”:”0″,”woocommerce_optimize_nonwc_pages”:”0″,”woocommerce_disable_password_meter”:”0″,”woocommerce_action_scheduler_period”:30,”woocommerce_marketing”:”1″,”woocommerce_analytics”:”1″,”woocommerce_tracking”:”1″,”button”:””,”backup”:””}

    Plugin Author Optimocha

    (@optimocha)

    Hi @mgilbertson,

    Thank you for the thorough explanation! We actually fixed this in v4.5.4 which will be released soon. You can give it a test by downloading the ZIP file here: https://github.com/optimocha/speed-booster-pack/archive/refs/heads/development.zip

    If you don’t want to upload the development version, you can test if the fix works by adding the following line:

    if( ! get_option( 'sbp_activation_redirect' ) ) { return; }

    …right under line 148 in the speed-booster-pack/admin/class-speed-booster-pack-admin.php file. After doing so, it will look like this:

    View post on imgur.com

    In our tests, this fixed all AJAX-related redirect issues. I hope it fixes your issues as well, and we’ll release the fix as soon as this weekend!

    Plugin Author Optimocha

    (@optimocha)

    @mgilbertson just wanted to bump this and confirm if this fix works for you. Did you try it?

    Thread Starter Mitchell Gilbertson

    (@mgilbertson)

    Hey,

    Thank you very much for the prompt response. I can confirm that the development version of the plugin that you included does indeed fix the problem. You guys rock, thanks for the hard work.

    Thread Starter Mitchell Gilbertson

    (@mgilbertson)

    here’s a link to that same example with SBP 4.5.4 running

    https://em4bsandbox2.wpengine.com/staff/

    Plugin Author Optimocha

    (@optimocha)

    @mgilbertson thank you so much! Just released version 4.5.4 for everyone.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘SPB is breaking AJAX for non-logged in users’ is closed to new replies.