Jump to content

[Solved] Error after upgrade - Blog Module 2.4.0 to 2.4.5


prestoav
 Share

Recommended Posts

Hi everyone,

PW version 3.0.123

I've recently tried to upgrade the Blog module in an installation from 2.4.0 to 2.4.5 and now get the following errors when trying to visit Blog > Posts in admin:

Fatal Error: Uncaught Error: Call to a member function count() on null in /MYSITE/site/modules/ProcessBlog/ProcessBlog.module:1299
Stack trace:
#0 /MYSITE/site/modules/ProcessBlog/ProcessBlog.module(1421): ProcessWire\ProcessBlog->renderItemsSummaries(Object(ProcessWire\PageArray))
#1 /MYSITE/site/modules/ProcessBlog/ProcessBlog.module(1989): ProcessWire\ProcessBlog->renderItemsList(Object(ProcessWire\PageArray))
#2 /MYSITE/wire/core/Wire.php(380): ProcessWire\ProcessBlog->___executePosts()
#3 /MYSITE/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___executePosts', Array)
#4 /MYSITE/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessBlog), 'executePosts', Array)
#5 /MYSITE/wire/core/ProcessController.php(333): ProcessWire\Wire->__call('executePosts', Array)
#6 /MYSITE/wire/core/Wire.php(380): ProcessWire (line 1299 of /MYSITE/site/modules/ProcessBlog/ProcessBlog.module)

This error message was shown because: you are logged in as a Superuser. Error has been logged.

I can see posts in Blog > Dashboard and all seems to work still on the front end.

Anyone else seen this or know of a fix?

Link to comment
Share on other sites

16 minutes ago, Jan Romero said:

Does your template have a page-reference field called blog_tags?

Hi Jan and thanks for replying.

I just checked the site and there is no field in the template with that name. There is one in the site, added by the module, but it is not in use in any template or assigned to any template in PW.

Link to comment
Share on other sites

2 hours ago, prestoav said:

Call to a member function count() on null in /MYSITE/site/modules/ProcessBlog/ProcessBlog.module:1299

This tries to count the items in blog_tags and fails because the field isn’t available. I’m not familiar with the module, but it appears to assume all blog posts (?) to have that field, so just adding the field to the relevant template should fix this particular error.

Link to comment
Share on other sites

4 minutes ago, Jan Romero said:

This tries to count the items in blog_tags and fails because the field isn’t available. I’m not familiar with the module, but it appears to assume all blog posts (?) to have that field, so just adding the field to the relevant template should fix this particular error.

Yup, you were spot on Jan, thank you. The blog_tag field had been removed form the template in PW. Once restored the admin started working again. I'll mark this solved and raise a bug report for the module.

Thanks again.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...