Community Forums › Forums › Archived Forums › General Discussion › Executive Pro error in logs
- This topic has 6 replies, 3 voices, and was last updated 4 years, 6 months ago by twgerber.
-
AuthorPosts
-
October 16, 2019 at 2:26 pm #494069twgerberMember
Oct 16 19:56:34 192.168.190.244 apache2[18463]: [u1870] [eyc18.onpressidium.com] [165.227.123.217] [error] [pid 18463:rid Xad18X8AAAEAAEgfAm8AAABF:tid 139829325743872] mod_proxy_fcgi.c(673): [client 192.168.193.223:49500] AH01071: Got error 'PHP message: PHP Notice: Undefined variable: echo in /eyc18-www/wp-content/themes/executive-pro/functions.php on line 193\nPHP message: PHP Notice: genesis_search_form is deprecated since version 2.7.0! Use get_search_form() instead. in /eyc18-www/wp-includes/functions.php on line 4440\n'
October 16, 2019 at 4:15 pm #494073AnitaKeymasterIf you are receiving a PHP error, you will need to increase your PHP version on the server.
Unfortunately merely giving the error message without telling us what you were doing when you received it doesn't give us what we'd need to adequately help you.
Love coffee, chocolate and my Bella!
October 16, 2019 at 4:45 pm #494075twgerberMemberThe error is from the server logs.
It's not a PHP version error.
Undefined variable: echo in /eyc18-www/wp-content/themes/executive-pro/functions.php on line 193
PHP Notice: genesis_search_form is deprecated since version 2.7.0! Use get_search_form() instead.
These errors are from theme code.
Please use the right method calls.
I am on the latest versions of this theme. I shouldn't be getting any errors in server log from the theme. Php version is 7.0.33
October 16, 2019 at 4:47 pm #494076twgerberMemberHere is the theme code that is the problem
/* CHANGES MADE 3/14/19 */
// Add search to header
// Header Search Function
add_filter( 'genesis_header', 'genesis_header_icon', 10, 2 );
function genesis_header_icon(){ ?>
<div class="custom-search head-custom-search">
<?php echo sprintf( '%s', __( genesis_search_form( $echo ) ) ); ?>
</div>
<div class="header-icons">
<span class="search-box">
<i class="dashicons dashicons-search"></i>
</span>
</div>October 16, 2019 at 7:43 pm #494079AnitaKeymaster@twgerber that code you provided isn't in the Executive Pro theme. It's custom code. Did you use this tutorial to add that to the theme?
It says:
/* CHANGES MADE 3/14/19 */
...as if someone modified the original theme. So it's not an issue with the original code. If you used that post or something similar, maybe reach out to them to correct it.
This isn't official StudioPress support. This is the community forum where we are volunteers here to help when we can.
Love coffee, chocolate and my Bella!
October 17, 2019 at 11:25 am #494088Victor FontModeratorThe warning message you received says that the genesis_search_form() function is deprecated. This means that it should not longer be used. The message also provides you with the solution. It says, "Use get_search_form() instead." This means you have to change your code like this:
/* CHANGES MADE 3/14/19 */ // Add search to header // Header Search Function add_filter( 'genesis_header', 'genesis_header_icon', 10, 2 ); function genesis_header_icon(){ ?> <div class="custom-search head-custom-search"> <?php echo sprintf( '%s', __( get_search_form( $echo ) ) ); ?> </div> <div class="header-icons"> <span class="search-box"> <i class="dashicons dashicons-search"></i> </span> </div>
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?October 17, 2019 at 11:30 am #494090twgerberMemberI think another contractor probably modified this.
Hmm. Will have to look into this further.
Thx
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.