Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter vicepresidentisnp

    (@vicepresidentisnp)

    Joe, I figured it out with some help from another forum. I edited the my-calendar-search.php and tweaked the parameters to get around the issue.

    Here is the code – I added the null parameters so it works with GiveWP which has a known issue with sharing the title param.

    Thx

    */
    function mc_search_results_title( $title, $id = null ) {
    	if (( null == $id ||  isset( $_GET['mcs'] ) || isset( $_POST['mcs'] ) ) && ( is_page( $id ) || is_single( $id ) ) && in_the_loop() ) {
    		$query = ( isset( $_GET['mcs'] ) ) ? $_GET['mcs'] : $_POST['mcs'];
    		// Translators: entered search query.
    		$title = sprintf( __( 'Events Search for “%s”', 'my-calendar' ), esc_html( $query ) );
    	}
    
    	return $title;
    Thread Starter vicepresidentisnp

    (@vicepresidentisnp)

    Hey Rick thanks for the help. I ended up editing the mycalendar code to pass the second argument and it worked. Thanks for the help!

    Thread Starter vicepresidentisnp

    (@vicepresidentisnp)

    [20-Sep-2022 14:03:26 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function mc_search_results_title(), 1 passed in /var/www/wp-includes/class-wp-hook.php on line 307 and exactly 2 expected in /var/www/wp-content/plugins/my-calendar/my-calendar-search.php:166
    Stack trace:
    #0 /var/www/wp-includes/class-wp-hook.php(307): mc_search_results_title(‘Donation Form’)
    #1 /var/www/wp-includes/plugin.php(191): WP_Hook->apply_filters(‘Donation Form’, Array)
    #2 /var/www/wp-content/plugins/give/src/Views/IframeContentView.php(109): apply_filters(‘the_title’, ‘Donation Form’)
    #3 /var/www/wp-content/plugins/give/src/Views/Form/defaultFormTemplate.php(20): Give\Views\IframeContentView->render()
    #4 /var/www/wp-content/plugins/give/src/Controller/Form.php(145): include(‘/var/www/wp-con…’)
    #5 /var/www/wp-includes/class-wp-hook.php(307): Give\Controller\Form->loadDonationFormView(”)
    #6 /var/www/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #7 /var/www/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #8 /var/www/w in /var/www/wp-content/plugins/my-calendar/my-calendar-search.php on line 166

Viewing 3 replies - 1 through 3 (of 3 total)