• Resolved Treebeard

    (@malawimama)


    On a multisite: I can’t get the search form to work with anything except the popup. It works, except if you add a new user and they click on the Activation link, the page is broken and there is a Fatal error where the search form normally is.

    The code in my template:

    <?php display_search_box(DISPLAY_RESULTS_AS_POP_UP); ?>

    The fatal error on the Activation page, /wp-activate.php?key=92de40009d567510 (I removed the http)

    Fatal error: Call to undefined function display_search_box() in /home/…../public_html/wp-content/themes/mytheme-v3/header.php on line 53

    We really didn’t want the popup but there was no way around it, the other codes didn’t work at all, because the search form is in the header (which is repeated throughout the network).

    Hoping this is something that will be fixed soon? We are about to launch the site, but just waiting on a response. If it’s not something that can be fixed soon, please let me know (sorry! no pressure LOL!) We have a huge 200 site network for a college, so they’ll be adding hundreds of new users this way, and that fatal error is breaking the rest of the page (because the search is in the header) – so all you see is the logo and that fatal error.

    Also – when you click on the link, the new user is never activated.

    Thanks for your help ~

    http://wordpress.org/extend/plugins/google-custom-search/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author edwinkwan

    (@edwinkwan)

    Hi Malawaimama,

    The problem you have is a PHP problem. With your new users, who do not have the custom google seach plugin activated and therefor the function display_search_box does not exist.

    Can you try this instead

    <?php
    if (function_exists(‘display_search_box’)) {
    display_search_box(DISPLAY_RESULTS_AS_POP_UP);
    }
    ?>

    What the code above should be doing is to check if the function display_search_box exists before calling it.

    Of course the best solution is to use a widget in there so you don’t need to hard code the function.

    Hope it works, please let me know how it goes and can you mark the topic as resolved if it fixes your problem.

    Kind Regards,

    Edwin

    Thread Starter Treebeard

    (@malawimama)

    that works! thank you so much for your help 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Google Custom Search] Fatal error: Call to undefined function’ is closed to new replies.