• henrykarl

    (@henrykarl)


    This is actually from Bard. I will add my comment at the end

    When attempting to clone a WordPress theme using the new “Create Block Theme” tool, you may encounter the error message:

    “Warning: require_once(/home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/inc/class-dummy-theme-update.php): Failed to open stream: No such file or directory in /home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/functions.php on line 71

    Fatal error: Uncaught Error: Failed opening required ‘/home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/inc/class-dummy-theme-update.php’ (include_path=’.:/usr/share/php:/www/wp-content/pear’) in /home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/functions.php:71 Stack trace: #0 /home/user/Local Sites/dummy-site/app/public/wp-settings.php(611): include() #1 /home/user/Local Sites/dummy-site/app/public/wp-config.php(96): require_once(‘/home/user/Loc…’) #2 /home/user/Local Sites/dummy-site/app/public/wp-load.php(50): require_once(‘/home/user/Loc…’) #3 /home/user/Local Sites/dummy-site/app/public/wp-admin/admin.php(34): require_once(‘/home/user/Loc…’) #4 /home/user/Local Sites/dummy-site/app/public/wp-admin/themes.php(10): require_once(‘/home/user/Loc…’) {main} thrown in /home/user/Local Sites/dummy-site/app/public/wp-content/themes/dummy-theme/functions.php on line 71″

    This error indicates that the file <code class=””>class-dummy-theme-update.php is missing from the theme’s directory. This file contains important functionality for the theme, and its absence is causing the error.

    To fix this issue, you can follow these steps:

    1. Check the Original Theme: Verify if the <code class=””>class-dummy-theme-update.php file exists in the original theme. If it does, copy it to the cloned theme’s <code class=””>inc directory.
    2. Create the Missing File: If the file is not present in the original theme, create it manually and copy the contents from the original theme’s <code class=””>functions.php file into the new file.
    3. Ensure Correct Filename: Rename the newly created file to <code class=””>class-dummy-theme-update.php.
    4. Save and Retry: Save the file and attempt to create the block theme again.

    After following these steps, you should be able to successfully create the block theme without encountering the error message.

    My comment:

    I deleted the functions.php file after I copied its content. I added this content to a new php file called class-dummy-theme-update.php and everything is working now. Two things need to be mentioned:

    • You lose all the patterns that came with the original theme.
    • To “Create Block Theme” team. Please do something about this issue. The cloning feature is not smooth and it seems that it depends on the theme. Perhaps a fix or may be a warning when using this feature?

    Thank you!

    • This topic was modified 1 year ago by henrykarl.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Felipe Santos

    (@foosantos)

    Hi there,

    Is this issue with all themes that you try from your end, or only with a specific theme?

    I’m trying to get more details to see if the issue is with the initial theme, as I can’t reproduce this.

    Thread Starter henrykarl

    (@henrykarl)

    Thank you for your reply. Here is the environment: 

    I haven’t tried it with other themes. The issue is still there even after the latest update. I just tried it now to check!

    Kavya Gokul (a11n)

    (@properlypurple)

    Hey @

    When cloning a theme, the plugin will basically replace the theme slug from all files, but it will not rename any files/folders. In any such case, you would have to manually check for things that have not been renamed.

    In your case, you have to rename the file class-ona-theme-update.php and change ona to whatever slug your new theme has.

    It seems to be the intended behaviour for the plugin, but you can file a feature request/bug for the plugin on Github.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error when cloning and installing the cloned theme’ is closed to new replies.