[wp-trac] [WordPress Trac] #60411: Parent theme wrongly missing (till 6.5-alpha-57505)

WordPress Trac noreply at wordpress.org
Thu Feb 1 11:19:24 UTC 2024


#60411: Parent theme wrongly missing (till 6.5-alpha-57505)
-------------------------------------------------+-------------------------
 Reporter:  dennysdionigi                        |      Owner:  (none)
     Type:  defect (bug)                         |     Status:  new
 Priority:  normal                               |  Milestone:  Awaiting
                                                 |  Review
Component:  Themes                               |    Version:  6.4.3
 Severity:  blocker                              |   Keywords:  needs-patch
  Focuses:  administration, template,            |
  multisite, coding-standards, php-              |
  compatibility                                  |
-------------------------------------------------+-------------------------
 The thread has been closed, but the issue is still there and still needs a
 fix.

 There is a bug in latest WordPress FSE Core Updates and/or any FSE theme.
 The following is the error: The parent theme is missing. Please install
 the "XXX" parent theme. when trying to set up the most basic of Child
 Themes.

 I also believe this could be related to Multisite, or to the way the core
 searches for any php file related to parent theme (which blocks based
 themes have not, or at least... not mandatory).

 The double problem is that: even both sibling theme exist, parent and
 child, and even if folder names and directories are the required and right
 ones, this alert should not appear.

 This error, obviously brings to delete the child theme, and lead to,
 maybe, future bigger issues, missing fields, blocks, metabox and so on.

 = Step-by-step reproduction instructions

 == Steps to Reproduce

 Create a child theme
 Create a new directory: wp-content/themes/twentytwentyfour-child
 Create a child theme style.css file, containing Theme Name: Twenty Twenty-
 Four Child and Template: twentytwentyfour (Screenshot)
 Visit WordPress Admin > Appearance > Themes (Screenshot)
 Activate the Twenty Twenty-Four Child (Screenshot)
 (Screenshot of Directory Structure)

 == Expected Behavior

 Visiting the site with the active child theme displays the default Twenty
 Twenty-Four home page with all styles loaded correctly.

 == Actual Behavior
 At first, there is a success message "New theme activated. Visit site"
 Reloading the page results in the following error message: "Error: The
 parent theme is missing. Please install the "twentytwentyfour" parent
 theme." (Screenshot)
 Visiting the site results in a blank white screen where the .wp-site-
 blocks element is empty.

 == Potential patch

 I added an empty index.php inside parent child theme

 === Other Notes

 This is a fresh, standard WordPress installation (v6.5-alpha-57505)
 There are no active plugins on the site.
 There are no special directory changes or customizations.

 As mentioned before, this is a Multisite install, even if there's no
 actual secondary website.
 I tested on a non-Multisite instance, and randomly I still have the issue.

 I would assume patching WordPress would be more difficult than just
 dropping a blank index.php file into the theme (and it doesn't appear to
 have any affect on anything), so maybe as a temporary solution, index.php
 could be added to block themes?

 Or skip the requirement on an index.php at all.


 Environment info
 Wordpress 6.5-alpha-57505

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60411>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list