WordPress.org

Ready to get started?Download WordPress

Forums

Theme My Login
[resolved] WPBook conflict with Theme My Login (9 posts)

  1. johneckman
    Member
    Posted 3 years ago #

    Hey Jeff - I'm the primary developer of WPBook, and trying to track down a conflict users of both WPBook and Theme My Login have.

    Basically I'm using the wpbook_parse_request() function to catch page requests containing certain key-value pairs, and respond to those with very specifically constructed pages for certain Facebook functionality.

    The problem occurs when my plugin catches one of those requests, and has already output some content before your plugin starts trying to do a cookie check.

    In theme-my-login/includes/login-actions.php, these lines:

    $instance = wdbj_tml_get_var('request_instance');
    $action = wdbj_tml_get_var('request_action');
    
    //Set a cookie now to see if they are supported by the browser.
    setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
    if ( SITECOOKIEPATH != COOKIEPATH )
        setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);

    (Lines 3-9 in current version)

    Trigger an error because WordPress can't modify the headers after output has already started.

    I'm not certain how to avoid the error, but would welcome any suggestions you have.

    You can see the functions from WPBook in the wpbook.php file, in this function (may not make sense out of context):

    function wpbook_parse_request($wp) {
      if (array_key_exists('wpbook', $wp->query_vars)){
        if($wp->query_vars['wpbook'] == 'update_profile_boxes') {
    // cut for clarity
        }
        if($wp->query_vars['wpbook'] == 'catch_permissions') {  // do something with infinite session key
          $my_session_key = $_GET['fb_sig_session_key'];
          echo "<p>Your session key is $my_session_key.</p>";
          echo "<p>Please copy that into the appropriate place in WPBook settings</p>";
        }
      }
    }

    http://wordpress.org/extend/plugins/theme-my-login/

  2. Jeff Farthing
    Member
    Plugin Author

    Posted 3 years ago #

    I take it that that function is attached to the "parse_request" action?

  3. johneckman
    Member
    Posted 3 years ago #

    @jeff - yes, precisely.

  4. Jeff Farthing
    Member
    Plugin Author

    Posted 3 years ago #

    So, you're just echoing that at the top of the page? That doesn't really make sense...

  5. johneckman
    Member
    Posted 3 years ago #

    Ok, well I've eliminated (just checked it in - will be in the next release) the use of parse_request for that one particular action, but I'm not sure whether this removes all the potential conflicts.

    Guess I'll try installing theme-my-login on a test blog and see what other issues turn up

  6. Jeff Farthing
    Member
    Plugin Author

    Posted 3 years ago #

    Let me know.

  7. asshu
    Member
    Posted 3 years ago #

    I would like to know how Johneckman solved the problem .

  8. Brooke Dukes
    Member
    Posted 3 years ago #

    Asshu,
    What version of WPBook are you using? I think the problem users were having should be fixed in 2.0.9.2. What is the conflict you are having. This tread was originally used for a discussion between the developers of WPBook and Theme My Login. Maybe open up a new tread with your particular problem and post a link to this tread.

  9. asshu
    Member
    Posted 3 years ago #

    Thanks for your reply .
    I will start a new topic with the details.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic