WordPress.org

Support

Support » Plugins and Hacks » [Resolved] WP Post Formats doesnt work

[Resolved] WP Post Formats doesnt work

  • here s a list of errors i got:

    Notice: Undefined index: language in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 47

    Notice: Undefined index: in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 47

    Notice: Undefined index: language in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 48

    Notice: Undefined index: in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 48

    Notice: Undefined index: language in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 49

    Notice: Undefined index: in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 49

    Notice: Undefined index: language in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 50

    Notice: Undefined index: in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 50

    Notice: Undefined index: language in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 51

    Notice: Undefined index: language in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 57

    Notice: Undefined index: in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php on line 57

    Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_hooks.php:47) in /Applications/MAMP/htdocs/wp-content/plugins/qtranslate/qtranslate_core.php on line 71

Viewing 5 replies - 1 through 5 (of 5 total)
  • Gary Bairead
    Member

    @gary-barrett

    All of those errors are coming from the qtranslate plugin.

    Plugin Author Ben Casey
    Member

    @casben79

    @jrkmrzk

    Did you get this problem solved?

    As Gary mentioned, the errors are actually coming from the qtranslate plugin and it would seem that you are running wordpress in debug mode.

    If you find the following line in wp-config:
    define( 'WP_DEBUG' , true );

    and change it to:
    define( 'WP_DEBUG' , false );

    The above errors should not be displayed.

    Cheers
    Ben

    hi, thanks for an answer. The problem is already solved. it was, as usually, just a problem of letters :), and the problem of qTranlate settings. Instead of “cs” in Settings>Languages>Language Code i had “Cs”.

    And of course, i ve the WP_DEBUG on, to turn it off doesnt solve anything:), sometimes i need to touch the PHP and i wanna see if it causes any problems.

    Cheers
    Jirka

    Plugin Author Ben Casey
    Member

    @casben79

    Undefined index is basically php saying this:

    I’ve been told to look for something, but it doesn’t exist.

    I actually downloaded qtranslate to have look at this:

    Line 47 of qtranslate_hooks.php:

    $locale[] = $q_config['locale'][$q_config['language']].".utf8";

    Would avoid undefined index to be written like this:

    $locale[] = isset( $q_config['locale'][$q_config['language']].".utf8" ) ? $q_config['locale'][$q_config['language']].".utf8" : false ;

    which says: if ( $q_config['locale'][$q_config['language']].".utf8" ) exists, use that otherwise $locale[] is false

    This can add a lot of extra code sometimes, but means avoiding the above mess of PHP errors.

    The final one: Warning: Cannot modify header information is sent because wordpress is trying to output some content after the program has already output the Notice Errors. No Notices in this case would mean no Warning.

    I hope this helps.

    Cheers
    Ben

    Gary Bairead
    Member

    @gary-barrett

    It’s mentioned in the 3.1 sticky that qtranslate isn’t compatible.

    http://wordpress.org/support/topic/troubleshooting-wordpress-31-master-list

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] WP Post Formats doesnt work’ is closed to new replies.