Automatic publicPath is not supported in this browser when providing a custom redirect path using the gform_confirmation hook


I’m applying a custom filter to the gform_confirmation hook for the purposes of adding a dynamic confirmation redirect based on a database setting.

The issue I’m having is that the redirect works correctly when the form is submitted by a user that is logged in, but the javascript error “Automatic publicPath is not supported in this browser” appears when the form is submitted by a user that is NOT logged in. In the later situation, instead of a redirect, gravity forms will load the contents of the page provided in the redirect path as inline html. Very strange.

I’ve tested in multiple browsers and cleared cache, the issue persists.

My code looks like this…

add_filter( 'gform_confirmation', 'crb_gform_confirmation', 10, 4 );
function crb_gform_confirmation( $confirmation, $form, $entry, $ajax ) {
	if ( ! is_singular( 'crb_development' ) ) {
		return $confirmation;

	$crb_request_form_thank_you = carbon_get_the_post_meta( 'crb_request_form_thank_you' );
	if(!$crb_request_form_thank_you) {
		return $confirmation;

	$confirmation = array(
		'redirect' => get_permalink( $crb_request_form_thank_you ),

	return $confirmation;

If anyone is wondering about the google maps error, it’s caused by redirect page content being loaded into the page as inline html which includes script tags for google maps api hence leading to that message. the issue in question here is not related.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.