Roadwolf Posted May 28, 2024 Posted May 28, 2024 Yesterday I removed Comments from my main blog-post template as I was getting way too many spam comments and just figured that I didn't need comment functionality that badly. Turns out that seems to have broken the site? I am getting all sorts of errors now when I attempt to view the site, and I am baffled about how removing the comments from the template seems to have caused this. Fatal Error: Uncaught Error: Call to a member function count() on null in site/templates/_uikit.php:830 #0 site/templates/blog-post.php (60): ukBlogPost(Object(Page), Array) #1 wire/core/TemplateFile.php (328): require('/home/roadwolf/...') #2 wire/core/Wire.php (413): TemplateFile->___render() #3 wire/core/WireHooks.php (952): Wire->_callMethod('___render', Array) #4 wire/core/Wire.php (484): WireHooks->runHooks(Object(TemplateFile), 'render', Array) #5 wire/modules/PageRender.module (575): Wire->__call('render', Array) #6 wire/core/Wire.php (416): PageRender->___renderPage(Object(HookEvent)) #7 /home/r (line 830 of site/templates/_uikit.php) Returning comments to the template repaired the issue, but this seems odd. Has anyone else encountered this?
wbmnfktr Posted May 28, 2024 Posted May 28, 2024 Check what template your posts use, open the matching .php file and look for the comments field. After that comment it out or delete it and the issue should be gone.
Ivan Gretsky Posted May 30, 2024 Posted May 30, 2024 As the error message says, check site/templates/_uikit.php on line 830. This file calls for data you've removed, therefore the error. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now