I have Pods and WPML installed, and I have SitePress Multilingual CMS extension installed for WPML, and I have many custom post types which I've added using Pods.

Recently when I was checking the website after adding ?lang=ar to the end of the URL to check how everything looks (I haven't translated anything yet), I got a PHP Notice, it was repeated 46 times above the header, and it said:

Notice: Invalid object kind: _pods_field in /my/website/path/wp-content/plugins/sitepress-multilingual-cms/inc/template-functions.php on line 194

When I checked line 194 in template-functions.php, I found the following:

$post_types = array_keys((array) $wp_post_types);
$taxonomies = array_keys((array) $wp_taxonomies);
$element_types = array_merge($post_types, $taxonomies);
$element_types[] = 'comment';

if (!in_array($element_type, $element_types)) {
    trigger_error(sprintf(__('Invalid object kind: %s', 'sitepress'), $element_type), E_USER_NOTICE);
    return null;

I know it's just a PHP Notice that can be ignored, but I've found that the translated version of the website loads in 5X the time that the normal site takes, and I think that these 46 errors are the reason why it's so slow. I've tried removing all widgets, removing the navigation menu, clearing Pods cache, and nothing seems to work.


I've already fixed it. I simply had to go to WPML > Languages, and uncheck "Adjust IDs for multilingual functionality" which dramatically increased the performance of the translated version of the website, and I no longer get a PHP notice.

Not the answer you're looking for? Browse other questions tagged or ask your own question.