Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Ann

Fatal Error when listing posts in wp-admin

Hi,

A client of ours just informed us that there is a fatal error message appearing on the posts list page in wp-admin. I’ve checked the error and it is appearing on our staging server but not on my local machine or the live site.
We are due to launch the website this week and need this issue resolved as quickly as possible.

The error I am seeing is:

Fatal error: Call to a member function format() on a non-object in *omitted*/wp-content/plugins/cac-addon-acf/classes/column/acf-field.php on line 329

Is this a known issue and is there a way I can fix it without waiting for the next plugin release?

Thanks.
Peter

7 years, 8 months ago
Tobias Schutter
Developer

Hi Ann,

It looks like the DateTime class is not returning a proper Date object in your case, this should not be able to happen, but we’ll look into it and make sure to patch it in the next update.

In the meanwhile you can replace line 329 (plugins/cac-addon-acf/classes/column/acf-field.php) with:

$value = $date ? $date->format( $this->parse_jquery_dateformat( $jquery_format ) ) : false;

7 years, 8 months ago
Paul

Hi,

Same thing here, after ACF-Pro update with errorcode:

Fatal error: Call to a member function format() on boolean in /home/inventory/public_html/wp-content/plugins/cac-addon-acf/classes/column/acf-field.php on line 329

Replacing it with your fix removes the error, but I see no results in the list.

Paul

7 years, 8 months ago
Ann

Hi Tobias,

I implemented the change you suggested but it did not fix the issue.
It did remove the error but the date is not being displayed.

The ACF field setup screenshot is below:
ACF date screenshot

And the result in wp-admin:
CAC date display

The server that the site is running on has PHP 5.4.13.

Is there anything else that could be implemented to fix this issue?

Thanks.

7 years, 8 months ago
Ann

Hi Tobias,

Some more detail on our setup:
WordPress 4.5.3
Advanced Custom Fields PRO Version 5.4.0
Admin Columns Pro Version 3.8.7
Admin Columns – Advanced Custom Fields add-on Version 1.3.5
PHP 5.4.13

Thanks,
Damien

7 years, 8 months ago
Paul

Hi,

I installed the previous version of ACF Pro pending a final solution.
At least I have my dates back :)

Paul

7 years, 8 months ago
Shaun

I used this code instead, replacing line 329, which fixed the error. Please fix this in the next version!

$date = new DateTime($value);
$value =  $date->format('d/m/Y');
7 years, 8 months ago
Stefan van den Dungen Gronovius
Developer

We just released a new version of the ACF addon for Admin Columns Pro.
By updating to the latest version, this problem should be fixed.

7 years, 8 months ago

You must be logged in to reply to this topic.