UNable to create a child Theme
-
Hi,
I’ve tried to create a child theme (first step, very simple : only style.cc and functions.php files created). After activation, I have an anormal consumption of memory (limitation is the php.ini limit) and an error is produced, the child theme is not working. Is there a specific tuning to do, or graphene is not design to support child theme ?
Best Regards
AR
-
Hello aronce,
Please follow the below url to create child theme-
http://www.wpbeginner.com/wp-themes/how-to-create-a-wordpress-child-theme-video/
I hope the above was helpful.
Kind regards,
Manoj
Thank you for your answer,
Unfortunuatly this method is not working, my problem concerns only the graphene theme, I have not any problem with other themes. To be sure I have tested with the @import solution instead of the method taht I am using (i.e. through an action in functions.php file that is considered as a better solution in the codex). I found the same problem.
I suppose that the author of the theme has implemented a code somewhere to avoid the possibity to create a child theme.Info : the error “Fatal error: Allowed memory size exhausted” is in wp-includes\class.wp-dependencies.php
Best Regard
ARInfo : the error “Fatal error: Allowed memory size exhausted” is in wp-includes\class.wp-dependencies.php
This points to insufficient memory being allocated to PHP. You may ask your hosting provide to increase PHP memory limit to 64MB or 128MB.
There’s nothing in Graphene that would prevent the creation of a child theme. In fact, we routinely recommend it to our users when there is a need to customize the theme beyond the available options.
Thank for your answer,
We have increased in the initialization file php.ini the value for memory_limit to 1024M (just for test) and restarted the web serveur apache. The same problem was found. We have tried both on the real hosting server (Gentoo based OS) and on a local development serveur running XAMPP (two releases, one with PHP 5.5 ans the second with PHP 7). This seems to be something that looks like a loop.The function where the problem is found (class.wp-dependencies.php) is : public function all_deps( $handles, $recursion = false, $group = false ) ... foreach ( $handles as $handle ) { $handle_parts = explode('?', $handle); << here is the errorBest Regards
ARSomething else is probably using up that much memory. The file you quoted is a standard WordPress core file, and Graphene itself uses much less memory.
Try deactivating all plugins, activate the child theme, and then reactivate your plugins one by one to see if any one of them is causing the issue.
Hello,
The test has been done with a minimum a things : only WordPress 4.9.6 and Graphene theme, nothing else. The error appends exactly when activating the child theme. Then It is possible to access to the backend and reactivate the original graphene theme.
If possible, I will check with an old release of WordPress, different versions of PHP to try to identify a cause.
Best Regards
ARWhat’s the content of your child theme’s functions.php file?
Hello,
Please find the content of the functions.php file<?php /** ** activation theme **/ add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } ?>with the following style.css file :
/* Theme Name: Graphene Child Theme Description: Theme enfant pour Graphene Author: Association Commassoc Author URI: http://www.commassoc.net Template: graphene Version: 0.1.0 */We have tried also an alternative solution with only the following style.css file :
/* Theme Name: Graphene Child Theme Description: Theme enfant pour Graphene Author: Association Commassoc Author URI: http://www.commassoc.net Template: graphene Version: 0.1.0 */ @import url("../graphene/style.css");with exactly the same result. My feeling is that a loop is created consuming memory by WordPress due to a cause in relation with the theme graphene.
Best Regard,
ARI just wanted to chime in as I just created a child theme of Graphene.
“Child Theme Graphene Child has been generated successfully.”
I don’t know if that helps at all, but at least in our case it was possible. 🙂
The topic ‘UNable to create a child Theme’ is closed to new replies.
