I receive daily emails with the subject “your site is experiencing a technical issue” but the website works normally.
I’m also having the same error on 4 other websites with the same configuration but in different hostings
Specifically, the following error is indicated:
An error of type E_ERROR was caused in line 4 of the file /wp-content/themes/bricks/searchform.php. Messaggio di errore: Uncaught Error: Using $this when not in object context in /wp-content/themes/bricks/searchform.php:4
I’m having the same issue on wp-login.php page when I use the rename login page functionnality (brute force settings) in All In One Security plugin.
When accessing the non-existing default login page (wp-login.php), it looks like Bricks launches its default 404 template instead of mine and crashes on search form.
Do you use the rename login option in AIOS?
Which page is causing the crash?
Détails de l’erreur
======================
Une erreur de type E_ERROR a été causée dans la ligne 4 du fichier /home/blabla/www/wp-content/themes/bricks/searchform.php. Message d’erreur : Uncaught Error: Using $this when not in object context in /home/blabla/www/wp-content/themes/bricks/searchform.php:4
Stack trace:
#0 /home/blabla/www/wp-includes/general-template.php(308): require()
#1 /home/blabla/www/wp-content/themes/bricks/404.php(11): get_search_form(Array)
#2 /home/blabla/www/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-process-renamed-login-page.php(272): include('/home/ampdupuyh...')
#3 /home/blabla/www/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-process-renamed-login-page.php(184): AIOWPSecurity_Process_Renamed_Login_Page::aiowps_set_404()
#4 /home/blabla/www/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-wp-loaded-tasks.php(21): AIOWPSecurity_Process_Renamed_Login_Page::renamed_login_init_tasks()
#5 /home/blabla/www/wp-content/plugins/all-in-one-wp-security-and-firewall/wp-security-core.php(555): AIOWPSecurity_WP_Loaded_Tasks->__construct()
#6 /home/blabla/www/wp-
Yes, I changed the login page url (as I always did with any other website) and actually “trimmed” a part of the AIOS plugin error as I thought it wasn’t important.
This is the full text of the error received via email:
An error of type E_ERROR was caused in line 4 of the file /wp-content/themes/bricks/searchform.php. Messaggio di errore: Uncaught Error: Using $this when not in object context in /wp-content/themes/bricks/searchform.php:4
And it started happening just before Christmas when I updated a lot of my sites (Bricks+AIOS).
But as I updated Bricks and AIOS at the same time and received these error emails a few days ago, I can’t tell which one is to blame
That said, I don’t have any issue with non-Bricks sites.
For instance, with my Oxygen sites, if I try to access wp-login, I have the right 404 template displayed and no error.
I tested a site in V1.6, no problem, then updated to 1.6.1, issue appeared (no other change).
And it seems that fatal error comes from seach form, any idea @timmse?
Note:
Accessing /wp-login/ is OK and triggers the right 404 template (mine) with no error.
Accessing /wp-login.php crashes the site with Bricks 404 template.
Note 2: Before update, accessing /wp-login.php didn’t crash, but still triggered Bricks 404 template instead of user template.
Fatal error: Uncaught Error: Using $this when not in object context in /home/sites/22b/9/98f67fbaa3/something.ie/wp-content/themes/bricks/searchform.php:4