dzyndzel
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cacheSearch is working now. Thank You for Your help!
Forum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cacheThank You, I’ll let You know if it works in next three days.
- This reply was modified 1 year, 11 months ago by dzyndzel.
Forum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cacheIn \includes\class-client.php:
public function check_ajax_permissions() {
check_ajax_referer(
'searchwp_live_search_client_nonce',
'searchwp_live_search_client_nonce',
true);
}
/**
* Potential (opt-in) performance tweak: skip any plugin that's not SearchWP-related.
*And this function is used in following function at the same file:
public function search() {
$this->check_ajax_permissions();
if ( empty( $_REQUEST['swpquery'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
die();
}
$this->set_excerpt_length();
if ( Utils::is_searchwp_active() ) {
$this->show_results_searchwp_active();
} else {
$this->show_results_searchwp_not_active();
}
// Short circuit to keep the overhead of an admin-ajax.php call to a minimum.
die();
}In \includes\class-form.php:
// Set up our parameters.
$params = [
'ajaxurl' => esc_url( $ajaxurl ),
'origin_id' => get_queried_object_id(),
'config' => $this->configs,
'msg_no_config_found' => esc_html__( 'No valid SearchWP Live Search configuration found!', 'searchwp-live-ajax-search' ),
'aria_instructions' => esc_html__( 'When autocomplete results are available use up and down arrows to review and enter to go to the desired page. Touch device users, explore by touch or with swipe gestures.' , 'searchwp-live-ajax-search' ),
'searchwp_live_search_client_nonce' => wp_create_nonce( 'searchwp_live_search_client_nonce' ),
];
// We need to JSON encode the configs.
$encoded_data = [
'l10n_print_after' => 'searchwp_live_search_params = ' . wp_json_encode( $params ) . ';',
];
// Localize and enqueue the script with all the variable goodness.
wp_localize_script( 'swp-live-search-client', 'searchwp_live_search_params', $encoded_data );Forum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cacheYou were right. After little bit of intense searching I’ve found following appearances:
- In \includes\class-form.php at line 288
- In \includes\class-client.php at line 199
- In \src\script.js at line 379
Forum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cacheWell, I’ve looked into every php file in plugin source code and wasn’t able to find searchwp_live_search_client_nonce
Forum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cacheForum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cacheExcuse me, but I don’t understand. Can You paraphrase this?
Forum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cache@qtwrk now error is visible, You can check website.
Forum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cache@qtwrkΒ Little update. Due to unplanned site updates I’ll let You know tomorrow. Sorry for delay.
Forum: Plugins
In reply to: [LiteSpeed Cache] Ajax status 403 after cacheWell it became quite a mess in this thread.
@qtwrk No problem, my bad, I’ve hidden search due to this error. Now It should be visible in top-left corner near menu. Bear in mind now it works, but that’s because I’ve purged cache lately. I’ll let You know when the problem occurs (probably in next couple of hours).
- This reply was modified 1 year, 11 months ago by dzyndzel.
Forum: Plugins
In reply to: [Page scroll to id] Deprecated: strcmp(): Passing null to parameter
