Make WordPress Core

Opened 6 months ago

Closed 3 weeks ago

#59949 closed defect (bug) (duplicate)

stylesheet_directory filter called too early

Reported by: jyd44's profile jyd44 Owned by:
Milestone: Priority: normal
Severity: major Version: 6.4
Component: Themes Keywords: reporter-feedback close
Focuses: template Cc:


With the new version 6.4.1, which introduces the global variable $wp_stylesheet_path, there is no way to setup a dedicated stylesheet directory in the theme.

During the very early process of constants initialization , the function get_directory_stylesheet() is called first in the file default-constants.php line 422 (called from line 578 in wp-settings.php) and setup the global variable, and in a second call in wp_get_active_and_valid_themes() (load.php line 1057, called from wp-settings.php line 609) before having a change to setup the 'stylesheet_directory' filter in the functions.php file of the theme, as this one is only loaded line 611 of the file wp-settings.php

Change History (4)

#1 @SergeyBiryukov
6 months ago

  • Component changed from General to Themes

Hi there, welcome back to WordPress Trac! Thanks for the report.

This appears to be related to #59847, specifically comment:17:ticket:59847.

#2 @jorbin
6 months ago

  • Keywords reporter-feedback added

@jyd44 Can you please test using trunk? [57129] likely fixed this.

#3 @jorbin
5 months ago

  • Keywords close added

@jyd44 Can you verify if this is still an issue using either trunk or 6.4.2. If not, I am going to assume it is a duplicate of #59847 and close this ticket.

#4 @hellofromTonya
3 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

I'm not able to reproduce this issue. I agree with @SergeyBiryukov and @jorbin that it's likely related to #59847 and, if yes, then it was fixed via [57129].

Closing this ticket as a duplicate.

@jyd44 does the issue still happen today when using a newer version than 6.4.1?
If no, yippee!
If yes, please feel free to reopen this ticket and comment with more information. Thank you.

Note: See TracTickets for help on using tickets.