WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

closed as off-topic by Pieter Goosen, birgire, Johannes Pille, Wyck, mrwweb Sep 8 '14 at 0:38

This question appears to be off-topic. The users who voted to close gave these specific reasons:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

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.

share|improve this answer
Yeah, that is a big performance killer! – Scott Kingsley Clark Jun 10 '14 at 14:42

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