WordPress.org

Ready to get started?Download WordPress

Forums

the_post() is not being properly filled in for me in Chinese (1 post)

  1. mike503
    Member
    Posted 7 years ago #

    This seemed to be working fine before, I did recently upgrade to 2.2, and I'm not sure if it's related to that.

    I did not need to define the DB_COLLATE/etc. nor did I need to convert the MySQL tables and columns to utf8 (but I have now, just in case) and it was working before.

    Anyway, $post is not being defined for the Chinese site, but the same exact code running for the English version (literally the same code, just a couple if's in wp-config.php to tell it to use a different database and define('WPLANG'...)) it populates just fine. What is odd is a var_dump($wp_query) shows that it is finding the right post ($wp_query->queried_object_id) - I can basically hack my own loop out of it by doing this on single.php:

    $post = get_post($wp_query->queried_object_id);
    $authordata = get_userdata($post->post_author);

    However, I am afraid that this is a poor hack that could break at any time. Has anyone else seen any issues like this?

    (BTW, I turned on error_reporting(E_ALL) to look for any variables I might have missed defining and my god, WordPress has a lot of Notices being generated for a variety of reasons)

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 7 years ago by mike503
  • This topic is not a support question
  • WordPress version: 2.2

Tags

No tags yet.