Archived topic
my site just crushed
19 replies · Started by Kaleem on June 10, 2017
hi, im getting the following error when i try to open my site. please kindly help.
/home3/tajforum/public_html/wp-content/themes/generatepress/inc/plugin-compat.php on line 27
Hi there,
What's the full error? That's just the line telling us where the error is.
That line is just a closing bracket. Make sure your plugin-compat.php file is identical to this: https://github.com/tomusborne/generatepress/blob/1.3.48/inc/plugin-compat.php
thanks for the quick response, i like that! so please can i replace the whole code with the one u just posted?
Yes, as long as you're using GP 1.3.48.
Before 1.3.47, that line called the do_action() function.
Without seeing your full error, I'm not sure what exactly is happening. But if it's saying do_action() isn't defined, it means something in your WP installation is broken and you should re-install WordPress (Dashboard > Updates).
sorry, i think this is the full error:
Fatal error: Cannot redeclare generate_setup_woocommerce() (previously declared in /home3/tajforum/public_html/wp-content/themes/generatepress/inc/plugin-compat.php:12) in /home3/tajforum/public_html/wp-content/themes/generatepress/inc/plugin-compat.php on line 26
Yea not sure what's happening there, the function isn't re-declared, and those lines aren't even the lines with any functions being declared: https://github.com/tomusborne/generatepress/blob/1.3.48/inc/plugin-compat.php
I assume that file has been changed on your end somehow. Try replacing it as I suggested.
i just replace the codes but still the same error
From a coding perspective that's not possible.
Are you using a child theme?
yes im using child theme
Make sure the child theme only has files you need to overwrite. If the child theme has all of the same files, you will get errors.
You can find a good starter child theme here: https://docs.generatepress.com/article/using-child-theme/
i think my theme is not update, so let me update it and see. but can that really cause the error?
That error says that function is being defined twice, which it isn't in the parent theme. If it's being defined twice, it must be in the child theme as well.
in the child theme i have only style.css and function.php. i did not add anything new for long ago.