Forum Replies Created
-
AuthorPosts
-
Michael
ParticipantLooks 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->retrieve->entryCategories( $entryID ) ); var_dump($entry); $categories = $entry->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.
Michael
ParticipantIt is indeed fixed.
Once again, thank you for the amazing support.
Michael
ParticipantNo difference. It still crops the image.
Michael
Participanthttp://carletonplace.tv/business-directory/?cn-s=&cn-cat=233&cn-pg=1
Archimedes Systems Consulting Inc
The admin side uses the image:
http://carletonplace.tv/wp-content/uploads/connections-images/archimedes-systems-consulting-inc/Archimedes_final7-e3899864f40d1a77530da4a512d2bcc2.jpgbut the public side uses:
http://carletonplace.tv/wp-content/uploads/connections-images/archimedes-systems-consulting-inc/Archimedes_final7-51aedbf00638897a9a653707f3710aba.jpgMichael
ParticipantHere are the screenshots.
Attachments:
You must be logged in to view attached files.Michael
ParticipantExcellent. That does the trick.
Michael
ParticipantIt 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']Michael
ParticipantThat did the trick.
Michael
ParticipantOk 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.
Michael
ParticipantNo worries and good to hear it’s resolved.
BTW, your support for connections pro is excellent. Keep it up :)
-
AuthorPosts
