Fatal error: Cannot redeclare directory_theme_paginate()
This topic contains 10 replies, has 3 voices, and was last updated by Rich Harris 6 years, 4 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
November 14, 2018 at 3:04 am #454069
Hi.
After updating Directory Starter, I get this message:
Fatal error: Cannot redeclare directory_theme_paginate() (previously declared in /home/montclai/public_html/wp-content/themes/insomnia-mbid/lib/utils.php:3) in /home/montclai/public_html/wp-content/themes/directory-starter/lib/utils.php on line 20I even attempted to replace the updated files with my original version via php, no change. It was literally working fine a few minutes ago.
Credentials to follow…
November 14, 2018 at 3:07 am #454070This reply has been marked as private.November 14, 2018 at 3:13 am #454071I did try disabling all plugins, but no change at all. If I disable the file mentioned in the error, or just the one line, the error proceeds until I empty the child-theme’s version of the file, and then the error moves to the next file. Without the utils.php file in the child theme, I get an error warning that I need the file.
This is disturbing and frightening. Please help.
November 14, 2018 at 3:20 am #454072Finally, disabling my child theme fixes the error but leaves me childless. Sorry for the many posts.
November 14, 2018 at 7:32 am #454088Hi Rich,
Thanks for your post. I’ve just checked your Website and I noticed that you’ve already switched to a ‘Twenty Seventeen’ child theme, could you replicate the issue so that we could check on it?
Thanks!
November 14, 2018 at 7:37 am #454089I thought you guys did that, since I see the 2017 theme became active a few hours after I left the office. If you check now, you can see what happens if I activate my child theme.
https://montclaircenter.com/November 14, 2018 at 7:38 am #454090I can disable the theme via cPanel if you need. Thanks again.
November 14, 2018 at 10:10 am #454115Okay. After reverting to Directory-Starter 1.1.5, I removed a section of code in the child theme’s functions.php which seems to have fixed much of the site. Here is the removed code:
// Define the version number for quick access
if (!defined(‘DIRECTORY_STARTER_VER’)) define(‘DIRECTORY_STARTER_VER’, ‘1.1.5’);require_once(‘lib/utils.php’); // Utility functions goes here
require_once(‘lib/config.php’); // Configuration goes here
require_once(‘lib/init.php’); // Theme setup functions goes here
require_once(‘lib/cleanup.php’); // Cleanup functions goes here
require_once(‘lib/scripts.php’); // CSS and JS includes goes here
require_once(‘lib/nav.php’); // Nav menu functions goes here
require_once(‘lib/sidebars.php’); // Register your sidebars here
require_once(‘lib/widgets.php’); // Widget functions goes here
require_once(‘lib/comments.php’); // Comments functions goes here
require_once(‘lib/entrymeta.php’); // Entry meta functions goes here
require_once(‘lib/custom.php’); // Any custom functions goes here
require_once(‘lib/gd.php’); // GeoDirectory functions goes here
require_once(‘lib/admin/customizer.php’); // Customizer settings
require_once(‘lib/styles.php’); // CSS generated by customizer
require_once(‘lib/dummy.php’); // Dummy post functions goes hereLeaving any “require” line breaks the site. Without them, the search function of the directory works, but my category pages are crazy. i.e.:
Looks wrong: https://montclaircenter.com/apparel-accessories/apparel-accessories/
Should look like: https://montclaircenter.com/?geodir_search=1&stype=gd_shopping&s=+&snear=&sgd_shoppingcategory%5B%5D=&sgeo_lat=&sgeo_lon=I’d really appreciate it if you’d help me find a fix or how to revert this issue. I haven’t completely checked over the rest of the site yet, but so far i might be able to redirect all category page links to similar searches as a workaround (hopefully you’ve got something better). I still want to perform the theme update and soon the WP 5.0, but stable first.
Thanks again for the help, any advice here would be great.
November 14, 2018 at 11:40 am #454122Hi Rich,
Thanks for your reply. I will forward this to a developer and he will assist you further with this.
Thanks!
November 14, 2018 at 1:07 pm #454129Hi,
You don’t need that lib folder in your child theme. Can you please let us know why you have added it in the child so we can remove if you don’t need it? That folder is already in parent theme and not needed in the child theme. I have disabled the GD setting Design->Listings->Listing left section which fixed the sidebar issue on the category page.
Regards,
PatrikNovember 14, 2018 at 9:52 pm #454277Wow. Amazing. Thank you. I’m not sure why the lib folder was there, I was either following a tutorial or copying someone else’s install. Either way, it wasn’t something I fully understood.
I guess the upgrading and rolling back of the theme put the ‘listing left’ setting on – or I was overriding it before. In any case, I am much more equipped to deploy the update now.
Thanks again.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket