BBPress Cantchoos : Replies Created

Forum Replies Created

Viewing 5 posts - 11 through 15 (of 15 total)
  • Author
    Posts
  • in reply to: Manual Link #473266
    cantchoos
    Participant

    Steven: that’s the weird thing. I have not made any modifications to your code until now.

    That’s why I wanted to start with a fresh copy and latest version. I confirmed it’s not my code by doing this.

    I know it’s a hack but what could cause this? Where are you naturally assigning this variable?

    Maybe others that have this same issue will benefit..

    in reply to: Manual Link #473263
    cantchoos
    Participant

    Steven:

    I just noticed there was a space at the end of the variable and the method was treating it like a string instead of an integer id:

    “662 ”
    

    After adding this code everything started working:

    $result   = $instance->retrieve->entry( (int)trim(self::$entryID) );
    

    this might be overkill and im a noob at PHP but this fixed it for me.. Can you please confirm my fix to be true?

    in reply to: Manual Link #473262
    cantchoos
    Participant

    Steven:

    var_dump($result) returns bool(false)

    var_dump($entryID) returns varstring(5) “662 ”

    I’m in my database and ID 662 definitely exists.

    I copied the site i was working in and reinstalled all connections related plugins to ensure there was nothing else modified. I am only running the base plugin, link, and your default template.

    Please advise.

    in reply to: Manual Link #473251
    cantchoos
    Participant

    Thanks again for your extremely quick reply. So I have manually debugged with my limited set of skills to this point:

    private static function setCurrentEntry() {
    
            // Grab an instance of the Connections object.
            $instance = Connections_Directory();
    
            $result   = $instance->retrieve->entry( self::$entryID );
    
    
    
            if ( FALSE !== $result ) {
                die("currentEntry assigned");
                self::$currentEntry = new cnOutput( $result );
            }
            else {
                die("currentEntry not assigned");
            }
        }
    

    self::$entryID is not null and is a real connections entry however it seems the result is returning FALSE

    What are my steps for debugging further than this? I need to figure out why the retrieve entry method is returning nothing yet the record ID is clearly there..

    Please advise.

    in reply to: Manual Link #473239
    cantchoos
    Participant

    Hi again,

    Sorry it’s been a while since I tried this but unfortunately this doesn’t seem to help.

    After doing what you said I now see in the connections manage admin area that it is linked to the correct user. However on the site it still does not allow my user to modify their own record.

    I have both the edit and add entry permissions selected for that user’s role.
    However they do not see “Edit my directory entry” in the list. They just see “Add my directory entry” like they are doing a brand new one.

    Please advise. :) Thanks again!

    What do you think I should try next?

Viewing 5 posts - 11 through 15 (of 15 total)