-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Not sure if it is a problem at all, but I saw these two error messages while doing Simply Static export today (2023-05-05):
riskprofiler-wordpress-1 | [05-May-2023 19:12:23 UTC] PHP Fatal error: Uncaught Error: Call to undefined function _e() in /var/www/html/site/assets/themes/fw-child/template/scenarios/control-bar.php:4
riskprofiler-wordpress-1 | Stack trace:
riskprofiler-wordpress-1 | #0 {main}
riskprofiler-wordpress-1 | thrown in /var/www/html/site/assets/themes/fw-child/template/scenarios/control-bar.php on line 4
riskprofiler-wordpress-1 | [05-May-2023 19:12:23 UTC] PHP Fatal error: Uncaught Error: Call to undefined function _e() in /var/www/html/site/assets/themes/fw-child/template/scenarios/control-sort.php:16
riskprofiler-wordpress-1 | Stack trace:
riskprofiler-wordpress-1 | #0 {main}
riskprofiler-wordpress-1 | thrown in /var/www/html/site/assets/themes/fw-child/template/scenarios/control-sort.php on line 16
Fortunately, it does not seem to affect the static site export at all, and the exported pages look normal.
The solution seems to be to add require_once ( $parse_uri[0] . 'wp-load.php' ); (which Phil already did in control-sort.php, but commented out); see also https://stackoverflow.com/questions/51953428/fatal-error-call-to-undefined-function-e-in-wordpress-plugin-error
Probably this is a non-issue because it looks like both control-bar.php and control-sort.php are not meant to be run standalone, but rather, PHP segments that are included by other PHP scripts.
Documenting this here in case we need this info in the future.
Metadata
Metadata
Assignees
Labels
No labels