• Resolved edjeavons

    (@edjeavons)


    Hi. Thanks for your work on this plugin, it’s a great solution for search in WordPress.

    I’m having difficulty using the routing option with instant search. Specifically when loading a page with search params in the URL results in the error:

    Fatal error: Uncaught TypeError: urldecode(): Argument #1 ($string) must be of type string, array given

    Please may you verify that it definately works as intended because I don’t think I have any custom code or other plugins that would cause the issue.

    https://share.cleanshot.com/zSzTKSwz

    I’ve tested the form on multiple pages across the website, and with permalinks enabled/disabled but all have the same issue.

    Any suggestions for things I should try or does this feel like an issue in the search-with-typesense plugin?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Sachyya

    (@sachyya-sachet)

    Hello @edjeavons

    Glad that you like our plugin and using it. Really appreciate it.

    I verified the issue and yes, there is issue with routing enabled on custom post types. We are working on the fix for this. As a workaround, you can prefix the schema slug like this and the issue should be resolved:

    Please change the schema name and the unique prefix to yours.

    /*Add a custom prefix to fix the issue with routing*/
    function your_slud_add_schema_prefix($schema){
    	if( 'antenna' == $schema['name'] ) {
    		$schema['name'] = 'my_unique_prefix_name_' . $schema['name']; //replace prefix name with your preferred name
    	}
    	return $schema;
    }
    add_filter( 'cm_typesense_schema', 'your_slud_add_schema_prefix', 20 );

    Regards,

    Sachyya

    Thread Starter edjeavons

    (@edjeavons)

    Thanks for the advice, that’s got us up and running.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page error with routing enabled’ is closed to new replies.