WordPress.org

Ready to get started?Download WordPress

Forums

WP Post Formats
[resolved] WP Post Formats doesnt work (6 posts)

  1. jrkmrzk
    Member
    Posted 3 years ago #

    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

  2. Gary Bairead
    Member
    Posted 3 years ago #

    All of those errors are coming from the qtranslate plugin.

  3. Ben Casey
    Member
    Plugin Author

    Posted 3 years ago #

    @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

  4. jrkmrzk
    Member
    Posted 3 years ago #

    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

  5. Ben Casey
    Member
    Plugin Author

    Posted 3 years ago #

    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

  6. Gary Bairead
    Member
    Posted 3 years ago #

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

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic