Fatal Error Cannot Redeclare Get_query_template Previously Declared In
Contents |
Cannot redeclare get_query_template() the_post_thumbnail_caption kaorisawada @kaorisawada 3 months, 2 weeks
Cannot Redeclare The_post_thumbnail_caption
ago I have never changed the source code but
Fatal Error Cannot Redeclare The_post_thumbnail_caption
the following error happened suddenly. PHP Fatal error: Cannot redeclare get_query_template() (previously declared in
Download Wordpress
xxx\wp-includes\template.php:23) in xxx\wp-includes\template.php on line 23 get_query_template() function is declared in template.php, line 23 previously. But the current position to declare its function is the same file and the same line number. Note that this was resolved by restarting php-cgi.exe without changing the source code. In which situation does this happen? You must be logged in to reply to this topic. Topic Info In: How-To and Troubleshooting 0 replies 1 participant Last reply from: kaorisawada Last activity: 3 months, 2 weeks ago 4.5.3 Status: not resolved Topic Tagsredeclare Forum Search Search for: About Blog Hosting Jobs Support Developers Get Involved Learn Showcase Plugins Themes Ideas WordCamp WordPress.TV BuddyPress bbPress WordPress.com Matt Privacy License / GPLv2 Code is Poetry.
site 4.6 has crashed my site PaulCashmere @paulcashmere 1 month, 4 weeks ago Just upgraded to 4.6 from 4.5.3 and my entire site has crashed. How can I fix this? Error message is Fatal error: Cannot redeclare the_post_thumbnail_caption() (previously declared in /home/noise15/public_html/wp/wp-includes/post-thumbnail-template.php:244) in /home/noise15/public_html/wp/wp-content/themes/thesis_18/custom/custom_functions.php on line 617 Viewing 15 replies - 1 through 15 (of 15 total) Jacob Peattie @jakept 1 month, 4 weeks ago Looks like your theme uses a function name that was added in 4.6. Which is poor form, since https://wordpress.org/support/topic/cannot-redeclare-get_query_template/ if it was prefixed this wouldn't have happened. Going by the folder name, I'm assuming you're using this theme: http://diythemes.com/thesis/ ? If so, as it is a commercial product, you'll need to contact the developer's support channels. https://codex.wordpress.org/Forum_Welcome#Commercial_Products You'll likely need to perform a manual update of the theme. PaulCashmere @paulcashmere 1 month, 4 weeks ago https://wordpress.org/support/topic/46-has-crashed-my-site/ yes Jacob It is Thesis. Would there be a sql file from the backup I can re-add to fix the problem? We have the sql files backed up and current Darko A7 @darko-a7 1 month, 4 weeks ago Hi, it seems that the core now has the same function named exactly the same as your theme. PHP function: the_post_thumbnail_caption() As I have absolutely no knowledge of that theme and as it seems to be a commercial theme, you should contact developers if they didn't already catch the issue themselves. Or, you can fix the problem by yourself renaming the theme's function name to something else (for example: into thesis_the_post_thumbnail_caption()) and all instances that use/call it. Alternatively, you can compare both functions and see if they match in code. If they are 100% the same, you can safely delete the function from your theme's custom_functions.php file. PaulCashmere @paulcashmere 1 month, 4 weeks ago thanks Darko, when I go to Cpanel and drill down to the file conta
theme crash following 4.5 update; nirvana theme njgardener @njgardener 6 months ago /** * Retrieve path of comment popup template in current or parent template. * * Checks for comment https://wordpress.org/support/topic/crash-following-45-update-nirvana-theme/ popup template in current template, if it exists or in the * parent template. * * The template path is filterable via the dynamic {@see ‘$type_template'} hook, * e.g. ‘commentspopup_template'. * * @since 1.5.0 * * @see get_query_template() * * @return string Full path to comments popup template file. */ function get_comments_popup_template() { $template = get_query_template( ‘comments_popup', array( ‘comments-popup.php' cannot redeclare ) ); // Backward compat code will be removed in a future release. if (" == $template) $template = ABSPATH . WPINC . ‘/theme-compat/comments-popup.php'; return $template; } and The WordPress plugins were updated with errors: Installation "My CMS": PHP Fatal error: Cannot redeclare get_comments_popup_template() (previously declared in G:\PleskVhosts\oldwickanimalhospital.com\public_html\wordpress\wp-includes\template.php:484) in G:\PleskVhosts\oldwickanimalhospital.com\public_html\wordpress\wp-includes\deprecated.php on line 3699 Fatal error: Cannot redeclare get_comments_popup_template() (previously fatal error cannot declared in G:\PleskVhosts\oldwickanimalhospital.com\public_html\wordpress\wp-includes\template.php:484) in G:\PleskVhosts\oldwickanimalhospital.com\public_html\wordpress\wp-includes\deprecated.php on line 3699 ` Tried making new wordpress sites in new directory through plesk. Plesk says it's GoDaddy's issue. GoDaddy says it's a WordPress problem - they host WP sites but it's not their product to support or fix… I'm a newbie, and have lost tons of data. Willing to try again, though, so please help. TIA Viewing 2 replies - 1 through 2 (of 2 total) Jack Yan @jack-yan 5 months, 3 weeks ago I have a similar error, were you able to get yours fixed? njgardener @njgardener 5 months, 2 weeks ago my sympathies, Jack. No, I had to rebuild the entire site. I'm gonna be real careful before installing future new releases. I see an update with correction of some bugs available today, but I can't find in the documentation any mention of my problem, though I could easily have missed it. I will be super cautious before installing any updates in the future! Viewing 2 replies - 1 through 2 (of 2 total) You must be l