tim2022
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [WP Super Cache] Ignoring query parametersHi Donncha,
Many thanks for looking into that for me. I’ve tested the new fix and unfortunately it’s causing me problems. The problem is with this line:
if ( empty( $_GET ) ) { $_SERVER['REQUEST_URI'] = strtok( $_SERVER['REQUEST_URI'], '?' ); }as it removes the parameters completely from the request rather than just removing them from the caching decision. In my case I still need the parameters active, as there’s javascript on the page that needs them, but the page that can be served up can still be a supercache page.
Rather than change
$_SERVER['REQUEST_URI'], would it be possible to test$wp_cache_request_uriinwpsc_is_get_query()e.g.function wpsc_is_get_query() { static $is_get_query = null; global $wp_cache_request_uri; if ( null === $is_get_query ) { $request_uri = parse_url( $wp_cache_request_uri ); $is_get_query = $request_uri && ! empty( $request_uri['query'] ); } return $is_get_query; }and then the functionality would be the same as before i.e. it passes the parameters through but makes the caching decision on
$wp_cache_request_uri.Many thanks,
Tim
Viewing 1 replies (of 1 total)