Home›Support›English Support›[Resolved] ACFML; Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, float give...
[Resolved] ACFML; Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, float give...
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing an 'Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, float given' error in ACFML, it might be due to a Google Map field storing latitude and longitude as float values, which our hashing algorithm was not handling properly.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
ACFML; Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, float given
Symptoms:
ACFML; Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, float given
Questions:
Can you help me reopen my chat with Carlos or continue the support here?
What could be causing the 'Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, float given' error in ACFML?
Option 1: Turn off the Keep repeater and flexible sub-fields in the same order as the default language option and update the post -> seems to work fine.
While Option 2 doesn't (throws 503 error as noted in other chat). The proposed change was supposed to be included in the latest version but not sure why it doesn't and runs into the said 503 error.
Anyways, I'm checking with the relevant team and 'll escalate the issue based on the information I receive.
I am trying to reproduce the problem in a fresh sandbox site by:
- Copying your theme.
- Adding related configs from your wp-config.php file in sandbox's wp-config.php.
- Installing and setting up WPML, WPML ST, ACF and ACFML.
- Importing all posts, post types, taxonomies, ACF field groups and etc.
But surprisingly, even the post types have been created, and after importing posts, I am not seeing any of your theme defined post type having a place to (even) add a new post - see attached.
So can you please log into this sandbox (hidden link - one click login) and setup things accordingly? Then try to reproduce the problem please.
Also let me know any special steps needed to enable add new posts under those post types, as well as, importing existing posts from your site.
Our team investigated the issue and found that the issue happens because there's a Google Map field, that stores the latitude and longitude as float values. Our hashing algorithm was not handling floats.
Hope with that you've now caught all possible data types in the hashing function.
Kind Regards,
Jann
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.