Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#65213 closed defect (bug) (duplicate)

Uncaught exception 'Error' with message 'Call to undefined function get_the_block_template_html()

Reported by: harishtewari Owned by:
Priority: normal Milestone:
Component: General Version: 7.0
Severity: normal Keywords: has-patch close
Cc: Focuses:

Description

Error message:

Uncaught exception 'Error' with message 'Call to undefined function get_the_block_template_html()' in /var/www/wp-includes/template-canvas.php:12

https://github.com/WordPress/wordpress-develop/pull/11784

Change History (5)

This ticket was mentioned in PR #11784 on WordPress/wordpress-develop by @harishtewari.


4 months ago
#1

https://core.trac.wordpress.org/ticket/65213

Trac ticket:

## Use of AI Tools
None

#2 @westonruter
4 months ago

  • Focuses performance removed

#3 @westonruter
4 months ago

  • Keywords close added

The function should always exist there. If it doesn't for you, then something strange is going on. The fix isn't what you proposed in the attached PR.

This should probably get closed as invalid.

#4 @westonruter
4 months ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed

Ah, well the issue is probably that someone is making a direct request to /wp-includes/template-canvas.php. Since this doesn't load WordPress, it doesn't require any other files that have this function defined. This is hardly unique to template-canvas.php, however. The same thing happens when attempting to access /wp-includes/template-canvas.php or many other PHP files in WordPress core. This has previously been reported. I'm closing this as a duplicate of #62722.

Note: See TracTickets for help on using tickets.