Warning: call_user_func_array() expects parameter 1 to be a valid callback, clas
-
I created a child theme from customizr and when I intsalled it on another domain, I get this error.
https://gentrydentalcharlotte.com/
Here is where I did the work
-
The thing could be that on the working site you’re using an old version of customizr parent theme. On the new you’re using the latest one. My sensation is that in your child theme you have copied parent core files..which is wrong and except for the skin css hou should delete them. You could say: yeah but why I don’t have this issue on the old site? And my answer would be: because the files you copied in the child theme are “compatible” with the old version of customizr you use on the “working” sitr.. But they aren’t with the latest version, or better they aren’t with a lit of recent customizr releases. Also copyng a whole skin css into the child theme isn’t really a good idea ’cause as the parent theme rvolves also its css evolves. Hope this helps to point you in the right direction..
It doesn’t point me in the right direction, but thanks for your response.
Cheers
I’m sorry if I’ve been not clear.. But I can only suppose how you build your child theme.. You don’t have the issue with the parent theme right? If so.. What can I suggest if not making a child theme which avoids these kind of conflicts? If you don’t want to touch your child theme then I can just suggest you to use, on the new site, the same customizr version you’re using on the working one.. But if you never solve those conflicts you’ll never be able to have the parent theme up to date. And this is valid for whatever wordpress theme..
So that’s what I did. I installed the old parent theme and it didn’t fix it.
I did delete all the core files and upload them, now the site is dead. I need to get the FTP info from my client to fix this, so now I am in a holding pattern.
But your child theme functions.php is still a cipy of the parent theme… Or am I wrong?
Apparently the new version of the parent didn’t have much in the functions.php file. The old one had a few hundred lines of code in it.
I should have known better not to try that without FTP access.
Mmm you have the error in the child theme functions.phpbwhoch is still a copy of the old parent functions.php.. But now you’ve deleted all the others files.. That’s the problem.. And it has nothing to do with the fact that the new parent functions.php didn’t have much.. As I told you you should delete all thr files you copied from the old parent in the child except for skin css. But probably you didn’t remember that you copied also the parent functions.php
There is no “skin.css” file.
I can’t delete all the other files copied from the parent. I made custom edits to those files
I know there is no skin.css, I talked about skin css (like blue.css, blue.min.css and so on..) .
I understand you cannot delete all other files copied from the parent for that reason, but this means that now you have to use the same (or pretty much) customizr-version + customizr-child you have on the old site on the new site.
So grab the directories wp-content/themes customizr and “your_customizr_child” from the old site and put them in the new site.I already tried that.
But what it exactly the error you get?
I just see this in the title, which is pretty vague..
Warning: call_user_func_array() expects parameter 1 to be a valid callback, clasWarning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘TC_header_main’ does not have a method ‘tc_tagline_display’ in /data/21/3/158/140/3321303/user/3706280/htdocs/gentrydental/wp-includes/plugin.php on line 496
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘TC_header_main’ does not have a method ‘tc_social_in_header’ in /data/21/3/158/140/3321303/user/3706280/htdocs/gentrydental/wp-includes/plugin.php on line 496
Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘TC_header_main’ does not have a method ‘tc_tagline_display’ in /data/21/3/158/140/3321303/user/3706280/htdocs/gentrydental/wp-includes/plugin.php on line 496
https://gentrydentalcharlotte.com/gentrydental/
See for yourself
Here is the site that I developed on my own server
https://www.benmackiedesign.com/puredental/
No errors.
They are mirror images of each other, but for some reason when I moved this stuff over I am getting the error in the header.
This is weird..
Anyway I see that your “child-theme” style.css is this right?
https://gentrydentalcharlotte.com/gentrydental/wp-content/themes/puredental/style.css?ver=3.1.6
This means that this is not a child-theme.
Basically it’s another theme based on customizr, and this can create some
https://codex.www.ads-software.com/Child_Themes#How_to_Create_a_Child_ThemeA theme, to be a child of another theme MUST specify the Template attribute, which must point to the parent directory name, without that.. isn’t a child-theme.
(if I’m not wrong, ’cause I don’t know the 100% of the customizr code) You’re not using the parent theme at all, you just use a modified version of it, which you called puredental (so, always if I’m not totally wrong, you can also remove the parent theme)
I see the error you have, but, those methods are in customizr since 3.0.10
https://themes.trac.www.ads-software.com/browser/customizr/3.0.10/parts/class-header-header_main.php#L31do you have those in that theme you call child-theme?
Yes, that is the “style” sheet, but the styles I did are in /inc/css/blue.css
I understand that I didn’t create the child theme correctly. Lesson learned.
I’ll check and see if I have those in my “child theme” but I doubt it.
Thanks
Holy shit, you’re a genius. Thank you! If I knew you, I’d buy you a beer, or whatever your choice of vices are.
I removed those lines from the “class-header-header_main.php” file and it fixed it.
I hate that this is so hacky, so maybe I’ll still go back and create the child the right way.
- The topic ‘Warning: call_user_func_array() expects parameter 1 to be a valid callback, clas’ is closed to new replies.