Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   PHP Fatal Error: undefined functions get_template_part and post_password_required (http://forum.bytesforall.com/showthread.php?t=23287)

piotao Sep 21, 2015 12:54 AM

PHP Fatal Error: undefined functions get_template_part and post_password_required
 
Hello,
I found in my server log some interesting messages:
1.
Code:

[Fri Sep 18 15:18:53 2015] [error] [client 162.216.19.183] PHP Fatal error:  Call to undefined function get_template_part() in /home/piotao/PKB/www/wp-content/themes/montezuma/index.php on line 1
and here is the index.php file mentioned in the call:
Code:

<?php get_template_part( 'head' ); ?>
</head>
<body <?php body_class(); ?>>
               
        <?php
        global $montezuma, $wp;
        // - use custom template if set ( for post or page )
        // - or else, according to WP Template Hierarchy
        $tpl = bfa_get_virtual_template();
        echo bfa_parse_php( $montezuma['maintemplate-' . $tpl] );
        ?>
       
        <?php wp_footer(); ?>

</body>
</html>

... and this error is connected to the server invocation with the following requests:
Code:

162.216.19.183 - - [18/Sep/2015:15:18:53 +0200] "GET /readme.html HTTP/1.1" 200 7360 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6"
162.216.19.183 - - [18/Sep/2015:15:18:53 +0200] "GET /wp-content/themes/montezuma/ HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6"
162.216.19.183 - - [18/Sep/2015:15:18:53 +0200] "GET /wp-admin/js/common.js HTTP/1.1" 200 24619 "http://sucuri.net" "Mozilla/5.0 (compatible; MSIE 8.0; MSIE 9.0; Windows NT 6.0; Trident/4.0; InfoPath.1; SV1; .NET CLR 3.8.36217; WOW64; en-US)"

2.
Another error I've found today is this one:
Code:

[Sat Sep 19 13:11:54 2015] [error] [client 87.255.66.244] PHP Fatal error:  Call to undefined function post_password_required() in /home/piotao/PKB/www/wp-content/themes/montezuma/comments.php on line 4
Here is the code from this file:
Code:

<?php
global $montezuma;

if ( post_password_required() ) :
        echo bfa_parse_php( $montezuma['subtemplate-comments-password'] );
        return;
endif;
...

This error was caused by the request:
Code:

87.255.66.244 - - [19/Sep/2015:13:11:54 +0200] "POST /wp-content/themes/montezuma/comments.php HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 6.0; rv:16.0) Firefox/12.0"
How to get rid of these errors?

juggledad Sep 21, 2015 03:57 AM

What version of Montezuma are you using?

I'd say you have a problem:
1) get_template_part is a function defined in .../montezuma/includes/get_template_parts.php
2) 'post_password_required' is a WordPress function (in wp-includes/post-template.php)

If you have updated recently, I'd check to see if teh update completed correctly
if not, I'd try to locate those two files and start worring that I might have been hacked...


All times are GMT -6. The time now is 06:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.