Hi Support
We have noticed that on our custom Post Type "Nanny Ads" in our Production environment that the custom field wpcf-nanny-ad-expiry is not being populated consistently and correctly. A similar query on dev does not exhibit the same behaviour.
I ran the following SQL on our database to check the field contents:
SELECT p.id, p.post_title, pm.*
FROM `wp_posts` p
left join wp_postmeta pm on p.id = pm.post_id
WHERE post_type = 'nanny-ad'
and pm.meta_key in ('_cred_post_expiration_time','wpcf-nanny-ad-expiry')
order by pm.post_id, pm.meta_key
Each language pair should have both fields _cred_post_expiration_time and wpcf-nanny-ad-expiry filled with the identical timestamp value.
So for example, a user creates an Ad in English. On submission, its language duplicate is created in German. So we should have 4 records per Ad returning from the query.
I checked for custom post type Job Ad which works similary, and there we have a perfect match every time.
I cannot see any reason why it should not be working for CPT Nanny Ad perfectly every time too.
Some specific things that may be of interest:
- The Nanny Ad is created using Toolset Post Form "Post Form - New Nanny Ad (ID: 921)"
- there is a custom code snippet "preserve-ad-expiry-date", but it looks OK to me, but I'm not a PHP expert.
Could you please have a look and try to ascertain why this field is not being populated consistently?
If you need to create any Ads in our Production environment (hidden link), please give them a Title like "TEST AD, PLEASE DO NOT REPLY". Please also set "Visible for Families" field to No, so they are hidden from the families searching in Production. Also if you need to install a DB plugin, please do so temporarily.
Thanks and regards
Simon