Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

PHP Fatal Error: undefined functions get_template_part and post_password_required


  #1  
Old Sep 21, 2015, 01:54 AM
piotao
 
6 posts · Oct 2014
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?

Last edited by piotao; Sep 21, 2015 at 01:55 AM. Reason: I enabled email notification.
  #2  
Old Sep 21, 2015, 04:57 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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...
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Sep 21, 2015 at 05:20 AM.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Fatal error: Call to undefined function bfa_get_virtual_template() drashok Montezuma Theme 2 Jul 25, 2014 10:51 PM
PHP Fatal error - undefined function. peri Atahualpa 3 Wordpress theme 7 Mar 24, 2014 11:06 AM
[SOLVED] Excerpt Error: &quot;Fatal error: Call to undefined function: the_post_thumbnail( buzz628 Excerpts, Read more, Pagination 2 Jan 15, 2010 03:58 PM
Fatal error: Call to undefined function: is_tag() in bfa_get_options.php jmenge Atahualpa 3 Wordpress theme 2 Sep 8, 2009 07:10 AM
Fatal error: Call to undefined function is_front_page() kyuen New Versions, & Updating 4 Mar 1, 2009 07:19 PM


All times are GMT -6. The time now is 11:29 PM.


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