BBPress Michael : Replies Created

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 16 total)
  • Author
    Posts
  • in reply to: Post process hook and wrong category #305045
    Michael
    Participant

    Looks like this is an issue again.

    So I have a hook that adds an action to cn_post_process_update-entry

    In the middle of the function it links to I have this code:

    <

    pre>public static function saveMarker( $entry, $update = false ) {
    global $connections, $wp_rewrite, $wpdb;
    $entryID = (int) $entry->getId();
    $entry->set( $entryID );

    echo "<pre>";
    
    print_r( $_POST );
    print_r(  $connections-&gt;retrieve-&gt;entryCategories( $entryID ) );
    
    var_dump($entry);
    
    $categories = $entry-&gt;getCategory();
    print_r($categories);
    
    die();
    ...
    

    }

    The following is what I get. Note the Post info is different from what I get with all the rest. It was working, but now it’s showing the old category information again, unless I update the entry twice.

    // _POST
    Array
    (
        [cn-action] => update_entry
        [update] => Update
        [entry_category] => Array
            (
                [0] => 9 // Category set to 9 and 10
                [1] => 10
            )
        ...
    
    
    // Output of entryCategories
    Array
    (
        [0] => stdClass Object
            (
                [term_id] => 11 // still says 11, not 9 and 10
                [name] => Markets
                [term_taxonomy_id] => 11
                [taxonomy] => category
                ...
            )
    )
    
    object(cnEntry)#62 (52) {
        ["id":"cnEntry":private]=> int(3)
        ["categories":"cnEntry":private]=>   array(1) {
            [0]=> object(stdClass)#60 (9) {
                ["term_id"]=> string(2) "11"
                ["name"]=>  string(7) "Markets"
                ...
    // $entry->getCategory(); is the same as above.
    

    I think I know the issue. Within the class.retrieve.php, the function entryCategories: you are checking for a cache of the sql to be run. It must have already run previously and then the record is updated. At the time of the hook, I’m now getting the cached results, not the new results. I think I can come up with a hack that should work in the meantime. But if anyone is using hooks, this will need to be addressed.

    I’d suggest that when you store the results and the SQL, also include a list of tables. When an update occurs, scan the cached list for the tables that were affected and remove the cached results that used those tables. This would ensure that on an update, the code will always fetch fresh results instead of cached ones.

    in reply to: Image Cropping #302788
    Michael
    Participant

    It is indeed fixed.

    Once again, thank you for the amazing support.

    in reply to: Image Cropping #302731
    Michael
    Participant

    No difference. It still crops the image.

    in reply to: Image Cropping #302700
    Michael
    Participant
    in reply to: Image Cropping #302694
    Michael
    Participant

    Here are the screenshots.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Category URL and changing categories #297672
    Michael
    Participant

    Excellent. That does the trick.

    in reply to: Category URL and changing categories #297024
    Michael
    Participant

    It doesn’t appear to.

    Just so you know how I have things set up, I have three pages right now.

    /members – This has the following shortcode:
    [connections image_fallback=logo image=siteshot force_home='true']
    This is also set as the connections home page.

    /members-new/entries
    [connections image_fallback=logo image=siteshot force_home='true']
    This will be the new connections page, but it’s not set as the homepage yet.

    /members-new
    [connections_categories show_empty=0 force_home='true']

    in reply to: Post process hook and wrong category #287937
    Michael
    Participant

    That did the trick.

    in reply to: Single Map, all businesses #283575
    Michael
    Participant

    Ok so here’s a little more background info.

    I’m looking to use Connections pro on a site where they show map information for all businesses. I’m sure I can write the plugin which reads the database to supply the map with points, it’s fairly separate from your plugin and really only reads the database.

    But one of the items is that they need some extra information in the profile of the business ( i.e. what months the business is active for, keywords or tags that can be applied to the business for searching ). This is a little more integrated, or at least I’d like it to be so they don’t go to a separate area just to add a few extra details.

    So my question is now, do you have any list of hooks, documentation or can simply whip up something quick to show me how to add in extra profile information for the entries? Like I said, I think I can do the map thing without an issue, it’s just the profile integration that I’d need some guidance with.

    in reply to: cMap, Siteshot and logo #275269
    Michael
    Participant

    No worries and good to hear it’s resolved.

    BTW, your support for connections pro is excellent. Keep it up :)

Viewing 10 posts - 1 through 10 (of 16 total)