Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Aron van der Valk

Bug Report: ACF Google Map column causes TypeError in Admin Columns Pro 7.0.4


Bug Report: ACF Google Map column causes TypeError in Admin Columns Pro 7.0.4

Plugin version: Admin Columns Pro 7.0.4
ACF version: (add your version)
WordPress version: (add your version)
PHP version: (add your version)

Description

When using an ACF Google Map field as an admin column, a fatal error occurs when viewing the post list. The error
happens regardless of whether the field has a value or is empty.

Error message

Fatal error: Uncaught TypeError: AC\Formatter\EmptyValue::format(): Argument #1 ($value) must be of type          
  AC\Type\Value, string given, called in .../admin-columns-pro/admin-columns/classes/Formatter/TableRender.php on   
  line 51

Steps to reproduce

1. Create an ACF field group with a Google Map field
2. Assign it to a custom post type
3. In Admin Columns settings, add the Google Map field as a column
4. View the post list in wp-admin

Root cause

The format() method in addons/acf/classes/Value/Formatter/Maps.php (line 25) returns a string instead of a Value object:

return sprintf('%s', $url, $label);

Should be:

return $value->with_value(sprintf('%s', $url, $label));

Workaround

Remove the Google Map field from Admin Columns configuration until fixed.

1 week, 2 days ago
Aron van der Valk

Admin Columns Pro version: 6.7.0.2
WordPress version: 6.9
PHP version: 8.1

1 week, 2 days ago
Tobias Schutter
Developer

Hi, thanks for the detailed bug report. We have identified the issue and implemented the fix, which will be included in version 7.0.5.

1 week, 1 day ago

You must be logged in to reply to this topic.