Make WordPress Core

Opened 2 years ago

Closed 23 months ago

#58020 closed defect (bug) (invalid)

Fatal error: Failed opening required 'wp-includes/html-api/class-wp-html-attribute-token.php'

Reported by: radustarciuc's profile radustarciuc Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.2
Component: HTML API Keywords: close
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Warning: require(/home/familynu/public_html/wp-includes/html-api/class-wp-html-attribute-token.php):
Failed to open stream: No such file or directory in /home/familynu/public_html/wp-settings.php on line 237

Fatal error: Uncaught Error: Failed opening required '/home/familynu/public_html/wp-includes/html-api/class-wp-html-attribute-token.php' (include_path='.:/opt/cpanel/ea-php80/root/usr/share/pear') in /home/familynu/public_html/wp-settings.php:237

Stack trace:
#0 /home/familynu/public_html/wp-config.php(85): require_once()
#1 /home/familynu/public_html/wp-load.php(50): require_once('/home/familynu/...') 
#2 /home/familynu/public_html/wp-blog-header.php(13): require_once('/home/familynu/...')
#3 /home/familynu/public_html/index.php(17): require('/home/familynu/...'
#4 {main} thrown in /home/familynu/public_html/wp-settings.php on line 237

Fatal error: Uncaught Error: Call to a member function set() on null in /home/familynu/public_html/wp-includes/l10n.php:784

Stack trace:
#0 /home/familynu/public_html/wp-includes/l10n.php(872): load_textdomain('default', '/home/familynu/...', 'ro_RO')
#1 /home/familynu/public_html/wp-includes/class-wp-fatal-error-handler.php(47): load_default_textdomain()
#2 [internal function]: WP_Fatal_Error_Handler->handle()
#3 {main} thrown in /home/familynu/public_html/wp-includes/l10n.php on line 784

Change History (9)

#1 @costdev
2 years ago

  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to 6.2.1
  • Version set to 6.2

Hi @radustarciuc, welcome to Trac and thanks for opening this ticket!

The path to WP_HTML_Attribute_Token looks correct to me.

Did these errors occur during the upgrade process? Or some time after upgrade?

Pinging @dmsnell for a second set of eyes. Moving to 6.2.1 for visibility.

#2 @radustarciuc
2 years ago

I don't have auto update for this website so current version was 6.1.1. But somehow errors were about this new version 6.2: Romanian version of new wordpress(6.2) couldn't be found because it was none in the first place.
From my investigation what were missing was: Html API directory and language file.
Now with a back up and a manual update I'm able to access website again

Maybe you roll out a force update?

Last edited 2 years ago by radustarciuc (previous) (diff)

#3 @alexgwcog
2 years ago

I picked this up on two sites this morning too - thankfully staging/development sites not Live with the same fatal error.

A forced install via WP-CLI fixed it.

#4 @dubaidogfish
2 years ago

I have the same issue have replaced parts of url with dots in /home/id.cloudwaysapps.com/id/public_html for this post

[Thu Mar 30 16:38:26.234282 2023] [proxy_fcgi:error] [pid ...:tid ...] [client ....]
AH01071: Got error 'PHP message: PHP Warning:  require(/cloudwaysapps.com/.../public_html/wp-includes/html-api/class-wp-html-attribute-token.php):
Failed to open stream: No such file or directory in ...cloudwaysapps.com/.../public_html/wp-settings.php on line 237
PHP message: PHP Fatal error:  Uncaught Error: Failed opening required '...cloudwaysapps.com/.../public_html/wp-includes/html-api/class-wp-html-attribute-token.php' (include_path='.:/usr/share/php') in /...cloudwaysapps.com/.../public_html/wp-settings.php:237\n

Stack trace:\n
#0 /...cloudwaysapps.com/.../public_html/wp-config.php(95): require_once()\n
#1 /...cloudwaysapps.com/.../public_html/wp-load.php(50): require_once('/home/881655.cl...')\n
#2 /...cloudwaysapps.com/.../public_html/wp-blog-header.php(13): require_once('/home/....cl...')\n
#3 /....cloudwaysapps.com/.../public_html/index.php(17): require('/home/....cl...')\n#4 {main}\n

thrown in /....cloudwaysapps.com/.../public_html/wp-settings.php on line 237'
Last edited 2 years ago by SergeyBiryukov (previous) (diff)

#5 @SergeyBiryukov
2 years ago

  • Description modified (diff)
  • Summary changed from Html API to Fatal error: Failed opening required 'wp-includes/html-api/class-wp-html-attribute-token.php'

#6 @SergeyBiryukov
2 years ago

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

I'm sorry to hear you are having issues with your website. It looks like the error is caused by an incomplete upgrade.

If the wp-includes/html-api/class-wp-html-attribute-token.php file does not exist on your install, downloading the latest version of WordPress and replacing the wp-includes/html-api/ directory with a fresh copy should fix the issue.

Please try the support forums if you need any further help with your site: https://wordpress.org/support/forums/.

#7 @costdev
2 years ago

  • Keywords close added; reporter-feedback removed

Tentatively adding close, pinging @SergeyBiryukov to confirm whether this is ready to close and that any further discussion should occur on the support forums.

#8 @SergeyBiryukov
2 years ago

Issues like this can happen once in a while due to an incomplete upgrade, when new files were added to core but failed to be copied properly, or when the wp-settings.php file that loads them failed to update for some reason.

I believe this is a support issue, and there are no actionable items for core here at this time.

#9 @audrasjb
23 months ago

  • Milestone 6.2.1 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Closing this as invalid since this appears to be a support issue, and not something that can be fixed on Core side. Thanks everyone!

Note: See TracTickets for help on using tickets.