Just tried adding a post to my blog and got just an error just by visiting the blog page:
Error thrown
Undefined constant “is_admin”
I also received an automated email via WordPress which contained these error details:
Error Details
An error of type E_ERROR was caused in line 145 of the file /home1/barbeeph/public_html/blog/wp-content/themes/wp-bl2/inc/theme_posts.php. Error message: Uncaught Error: Undefined constant “is_admin” in /home1/barbeeph/public_html/blog/wp-content/themes/wp-bl2/inc/theme_posts.php:145
Stack trace:
#0 /home1/barbeeph/public_html/blog/wp-includes/class-wp-hook.php(309): mod_gallery_image_attributes(Array)
#1 /home1/barbeeph/public_html/blog/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)
#2 /home1/barbeeph/public_html/blog/wp-includes/media.php(1091): apply_filters(‘wp_get_attachme…’, Array, Object(WP_Post), Array)
#3 /home1/barbeeph/public_html/blog/wp-admin/includes/post.php(1589): wp_get_attachment_image(‘4159’, Array)
#4 /home1/barbeeph/public_html/blog/wp-admin/includes/meta-boxes.php(1391): _wp_post_thumbnail_html(‘4159’, Object(WP_Post))
#5 /home1/barbeeph/public_html/blog/wp-admin/includes/template.php(1395): post_thumbnail_meta_box(Object(WP_Post), Array)
#6 /home1/barbeeph/public_html/blog/wp-admin/edit-form-advanced.php(681): do_meta_boxes(Object(WP_Screen), ‘side’, Object(WP_Post))
#7 /home1/barbeeph/public_html/blog/wp-admin/post.php(206): require(’/home1/barbeeph…’)
#8 {main}
thrown
I tried disabling all plug-ins and the initial error message disappeared but on the blog page my navigation is missing and only the latest post title shows.
It seems that the NextGen gallery plug in causes the error message to appear but it is not the cause of the rest of the problems.
At first I was able to see posts by accessing them from the Dashboard. But that’s stopped. So far it doesn’t seem that pages I created have been affected.
I also cannot access the post editor unless I deactivate the Classic Editor plug-in.
I noticed that Bluehost must have recently updated PHP. It’s now at 8.0.16. Last time I checked, just a few weeks ago, it was something like 7.4.
The latest version of WP is running.
This is also affecting, to some degree or another, my WP installations on my test sites.
https://bl4-test.barbeephoto.com/blog/
With the same email error message. However, I can access the post editor, though the text is “hidden.” I can highlight the area and see the text. But it doesn’t show on the post.
I was able to create a new post and it appears normal.
Not really sure where to go from here… I hadn’t touched my blog since my last post in December so I’m guessing it’s the updated php or the latest WP update. Or a combination. Weirdness prevails.