• Hi everybody,

    I’am using WordPress 3.2.1 and Wordbooker 2.09. Everytime I want to publish a post with wordbooker appears the following error:

    Warning: substr() expects parameter 1 to be string, array given in /users/spanien/www/blog/wp-content/plugins/wordbooker/wordbooker.php on line 1272
    
     Warning: Cannot modify header information - headers already sent by (output started at /users/spanien/www/blog/wp-content/plugins/wordbooker/wordbooker.php:1272) in /users/spanien/www/blog/wp-includes/pluggable.php on line 934

    Can anybody help me? Some weeks ago, everthing works fine.It’s a very good plugin and it would be nice, when i can use it again.

    regards
    DerJoe

    http://ww.wp.xz.cn/extend/plugins/wordbooker/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author Steve

    (@steveatty)

    First of all its a PHP warning NOT an error – but I will look into it because I’m at a complete loss as to how you’ve got an array in existence there unless you’ve done something funky with images which is breaking my logic. Can you post your support information from the Wordbooker Options page.

    Secondly – you’ve got your PHP set to dump warning and error messages to the screen. This is NOT recommended in live environments – as documented in the php.ini file:

    ; Print out errors (as a part of the output).  For production web sites,
    ; you're strongly encouraged to turn this feature off, and use error logging
    ; instead (see below).  Keeping display_errors enabled on a production web site
    ; may reveal security information to end users, such as file paths on your Web
    ; server, your database schema or other information.
    Plugin Author Steve

    (@steveatty)

    You know WPgooglerankingbooster – its spamming scum like you that are ruining the internet experience for millions of people.

    Thread Starter DerJoe

    (@derjoe)

    Hi, thanks for your help ๐Ÿ˜‰

    Here are the support information:

    Wordbooker: 2.0.9
    Wordbooker ID: 254577506873
    Wordbooker Schema: 2.4
    WordPress: 3.2.1
    Table prefix: wp_
    PHP: 5.3.8
    PHP Memory Usage (MB): 39
    JSON Encode: PHP
    JSON Decode: PHP
    Curl Status: cURL ist verfรผgbar und kann auf Facebook zugreifen. Alles ist OK.
    JSON Version: 1.2.1
    SimpleXML library: 0.1 (provided by PHP)
    HTTP Output Character Encoding: pass
    Internal PHP Character Encoding: UTF-8
    MySQL: MySQL Native Driver (need MySQL version 4.0 or greater)
    Database character_set_client : utf8
    Database character_set_connection : utf8
    Database character_set_database : latin1
    Database character_set_filesystem : binary
    Database character_set_results : utf8
    Database character_set_server : latin1
    Database character_set_system : utf8
    Database character_sets_dir : /usr/local/mysql/share/charsets/
    Database collation_connection : utf8_general_ci
    Database collation_database : latin1_swedish_ci
    Database collation_server : latin1_swedish_ci
    Server : Apache/2.2
    Aktivierte Plugins:
    Count Per Day ( 3.1 )
    DMSGuestbook ( 1.17.1 )
    DMSGuestbook widget ( 2.50 )
    Exclude Pages from Navigation ( 1.92 )
    Get Recent Comments ( 2.0.6 )
    Lightbox 2 ( 2.9.2 )
    PRO Player ( 4.7.9.1 )
    Random Text ( 0.2.9 )
    Countdown Widget ( 2.4.4 )
    WordPress Database Backup ( 2.2.3 )
    WP-PageNavi ( 2.81 )
    WP-PostRatings ( 1.62 )
    WP-SimpleViewer ( 2.2.0 )
    WP Word Count ( 1.4 )

    To the second one: i have “define(‘WP_DEBUG’, false);” in my wordpress config.php already. Normaly their should come no warning like this right?

    Thx for your help

    Best regards
    DerJoe

    Plugin Author Steve

    (@steveatty)

    You need to edit you php.ini file and make sure:

    display_errors = off

    is set.

    If you can’t do it there then add:

    @ini_set( ‘display_errors’, 0 );

    to your wp-config.php file.

    I’ll look into the issue now I’ve got the list of plugins.

    Thread Starter DerJoe

    (@derjoe)

    I published 3 articles some hours ago and got the warning again. I pressed the back button in my browser and looked on facebbok. All three articles appeared there.

    So it seems to work even if there are the php warnings. May help to find the problem.

    greetings
    DerJoe

    Plugin Author Steve

    (@steveatty)

    It wont help me find the problem – the problem is that one of your plugins, or something you are doing in your posts, is making my code end up with an array when it should only have a set of strings.

    I’ve told you how to suppress the warning being displayed to the screen – warnings are just that : they are PHP saying there is a non fatal problem.

    Can you post a link to one of the posts that you published when you got the error?

    Thread Starter DerJoe

    (@derjoe)

    Here is a link to one of the Posts

    http://quer-durch-australien.de.vu/?p=3776

    Thread Starter DerJoe

    (@derjoe)

    Btw: PHP warnings are disabled now ๐Ÿ˜‰

    Plugin Author Steve

    (@steveatty)

    OK this is surreal because there seems to be nothing odd in there.

    Can you open wordbooker.php and find line 1272 which should be this:

    if (stristr(substr($imgsrc, 0, 8), '://') ===false) {

    and above it add:

    var_dump($imgsrc);

    Then publish another post – it will dump stuff into the screen : can you then copy and past what it dumps into here.

    Thread Starter DerJoe

    (@derjoe)

    The variable dump contains the following:

    array(3) { ["_wordbooker_options"]=> array(1) { [0]=> string(721) "a:16:{s:20:"wordbooker_noncename";s:10:"91f01976a8";s:26:"wordbooker_publish_default";s:2:"on";s:25:"wordbooker_primary_target";s:18:"PW:100002369731857";s:23:"wordbooker_primary_type";s:1:"1";s:25:"wordbooker_primary_active";s:2:"on";s:25:"wordbooker_extract_length";s:3:"256";s:21:"wordbooker_actionlink";s:3:"300";s:20:"wordbooker_attribute";s:21:"Neuer Artikel im Blog";s:29:"wordbooker_status_update_text";s:7:"%title%";s:27:"wordbooker_like_button_post";s:1:"2";s:28:"wordbooker_share_button_post";s:1:"2";s:22:"wordbooker_comment_get";s:2:"on";s:31:"wordbooker_publish_page_default";s:0:"";s:31:"wordbooker_publish_post_default";s:2:"on";s:22:"wordbooker_post_edited";s:3:"yes";s:19:"wordbooker_new_post";s:1:"1";}" } ["_edit_last"]=> array(1) { [0]=> string(1) "1" } ["_edit_lock"]=> array(1) { [0]=> string(12) "1325585890:1" } }

    Plugin Author Steve

    (@steveatty)

    That should NOT be there – thats why its blowing up. If you put that var_dump in there correctly then it should contain a list if post images.

    And I cannot see how that variable can ever contain that data.

    Can you remove that var_dump and change the code so it looks like this:

    $images = array();
    	if (is_array($pulled_images)) {
    		var_dump($pulled_images);
    		foreach ($pulled_images as $imgsrc) {
    			if ($imgsrc) {
    				if (stristr(substr($imgsrc, 0, 8), '://') ===false
    Thread Starter DerJoe

    (@derjoe)

    When i changed it, the blog doesnt load anything. Just a white screen insted of my staretpage.

    I turned the errors in the config.php on and it appears the following on loading my blog:

    Parse error: syntax error, unexpected T_VARIABLE in /wp-content/plugins/wordbooker/wordbooker.php on line 1275

    Plugin Author Steve

    (@steveatty)

    The last line got truncated – it should be:

    if (stristr(substr($imgsrc, 0, 8), '://') ===false) {

    Thread Starter DerJoe

    (@derjoe)

    Ok, now it woked. The following appeard on publishing:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Plugin Author Steve

    (@steveatty)

    Lets take this over to:

    http://wordbooker.tty.org.uk/supportforums/

    Where you wont get long posts edited by moderators.

Viewing 15 replies - 1 through 15 (of 20 total)

The topic ‘[Plugin: Wordbooker] Error on publish’ is closed to new replies.