Support » Fixing WordPress » Feed Validation Re-visited! Where does my language go?

  • Resolved Rev. Voodoo


    OK, I posted about this years ago, never have I gotten this fixed.

    Just wondering if anyone has any ideas. My feed never validates because the language goes missing

    This feed does not validate.
    line 18, column 11: language must be an ISO-639 language code: [help]

    So, back in the day I would go into the options menu and manually update it every time it went away. Then after a while I just used a mysql query to update it whenever I noticed it missing.

    Still…it keeps disappearing. So I finally made it easy on myself and added an item to my settings->reading menu

    function voodoo_rss_language_string() {
    	<input name="rss_language" type="text" id="rss_language" value="<?php form_option('rss_language'); ?>" class="regular-text" />
    	<span class="description"><?php _e('RSS supports multiple languages through the language element, which contains a short code that identifies that the natural language employed in the channel. See on this table for your <a href="">language codes</a>.'); ?></span>

    Like so. Now while this is pretty darned convenient…. I find I have to do this every time I check my feed in the validator. Anybody have any idea where the crap my language keeps going?

    Thansk folks!

Viewing 15 replies - 1 through 15 (of 21 total)
  • Moderator James Huff


    Volunteer Moderator

    Do you have define ('WPLANG', ''); in your wp-config.php file?

    Yup… is there!

    Moderator James Huff


    Volunteer Moderator

    Have you tried disabling all plugins and switching themes?

    Yup, this has happened since I first started using WP years ago

    About 5 themes ago, and many total changes in plugin usage.

    I can’t really run my site with no plugins anymore, as a lot of folks rely on the plugins for music and whatnot. And the problem can’t be predicted by me…yet anyway

    the language just goes away randomly

    Moderator James Huff


    Volunteer Moderator

    I’ve honestly never heard of this before. I’ll drop this by the list, maybe someone has heard of it before.

    That’d be cool, seems pretty rare, as I had a hell of a time figuring out how to fix it over the years when I was a novice, and didn’t know nuthin ’bout nuthin! Doesn’t really pop up in the forum, or with my google-fu

    Thanks for the effort!

    When it does go “missing”, what value is stored in the database in its place? Have you been with same host the entire time?

    it is just blanked out, nothing is stored.

    I have been with the same host the whole time. Same database. (I repair and optimize monthly)

    Have you tried re-uploading everything except wp-content from a fresh WP download in case you have a damaged older file? Any regular cron jobs running in WP? Noticed any connection with, say, a scheduled post being published?

    Yeah, I normally do a manual upgrade whenever I upgrade my WP install.
    -Just recently did a fresh upload of all files within the past 2 weeks trying to work out some various bugs

    I’m trying to look for patterns, currently my feed is still coming up valid, so it’s been valid since I started this thread which….

    I re-added the language on Friday, in the morning….

    I have made one post since then which coincides with this info from my feed:
    <lastBuildDate>Fri, 17 Sep 2010 18:23:41 +0000</lastBuildDate>

    Didn’t lose my language, so I don’t think it happens when I publish a post. I don’t use scheduled posts at all…..

    So it would be reasonably safe to assume that your files are all present & correct, yes/ That leaves the following possibilities:

    1. Something is writing to the db and wiping out the lang entry in the process.
    2. Something is interfering with a db write causing the lang entry to be wiped
    3. Something outside of WP is changing the db or causing a db write failure.

    Since you’ve changed themes & plugins, (1) seems unlikely. Would it be safe to assume that you don’t have any custom functions that you’ve ported from 1 theme to the next?

    Option (2) was made me think of cron jobs.

    Option (3): do your hosts run regular backups/housekeeping tasks?

    My first theme didn’t even have a functions.php! lol. But yeah, nothing is the same in that regard. My current functions are totally new actually, nothing in common

    As far as cron jobs, I’m not sure the best way to keep tabs on stuff…. just keep checking the feed for the lang attr to disappear and then investigate I guess?

    As for backups, etc…. I’m on godaddy, they keep backups of my files…. nothing for DB AFAIK, I run my own backups…. doesn’t seem like those are related, but I’ll test that too

    Getting some kind of timestamp on the db change would be a start…

    What if you wrote a function that was hooked into the init action that checked if the rss_language in the wp_option table was set and had a value == ‘en’? If rss_language wasn’t set or value != ‘en’, it could then send you an email.

    esmi forgot to add, only do the above if you also reset the option up, otherwise you’ll get flooded with emails.

    Either that or set a flag to say the email has been sent in last x hours and don’t send it again.

    What if you wrote a function

    lol….good idea, if I knew how!

    I’m sure I can look into that, google is my friend!

    I did want to verify it wasn’t post related, so I made another post now and reran the validator. All is well….so it seems I don’t lose the lang attr when my feed is rebuilt

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Feed Validation Re-visited! Where does my language go?’ is closed to new replies.