Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.1.1, address, cache, code snippets, postal-code
- This topic has 3 replies, 2 voices, and was last updated 8 years, 9 months ago by
Steven Zahm.
-
AuthorPosts
-
09/10/2014 at 9:37 am #303415
AlpineWeb Design
ParticipantFor some reason when we imported the csv it did not import the first zero of the zip code for ALL entries – unfortunately this was not noticed right away. So in the effort of being efficient we went into the database and added the zero using phpmyadmin – when I log into wordpress and into connections I can see that the value is now correct. However it is not showing on the web?
http://mainelakeschamber.com/membership/name/ace-insurance/What are we missing?
CJ
09/10/2014 at 10:12 am #303423Steven Zahm
KeymasterMy best guess is you manually updated the
*_connections_addresses
table, yes? The problem is the address data is also cached in the*_connections
table. That cached data is what is used for display. This is done to ensure as few db queries as possible. The actual*_connections_addresses
table is only used when editing the entry and searches. Unfortunately there is no way to bulk update this cache.What could be done, is disable the use of the address cache but that does mean an extra db query per entry shown on the page. Depending on the host this time is actually fairly minute probably in the realm of .005 seconds.
To disable the cache, install the Code Snippets plugin.
Add a new snippet with the following code:
function cn_disable_output_cache( $cached ) { return FALSE; } function cn_enable_output_cache() { remove_filter( 'cn_address_cached', 'cn_disable_output_cache' ); //remove_filter( 'cn_phone_cached', 'cn_disable_output_cache' ); //remove_filter( 'cn_email_cached', 'cn_disable_output_cache' ); //remove_filter( 'cn_messenger_cached', 'cn_disable_output_cache' ); //remove_filter( 'cn_social_network_cached', 'cn_disable_output_cache' ); //remove_filter( 'cn_link_cached', 'cn_disable_output_cache' ); //remove_filter( 'cn_date_cached', 'cn_disable_output_cache' ); } add_filter( 'cn_address_cached', 'cn_disable_output_cache' ); //add_filter( 'cn_phone_cached', 'cn_disable_output_cache' ); //add_filter( 'cn_email_cached', 'cn_disable_output_cache' ); //add_filter( 'cn_messenger_cached', 'cn_disable_output_cache' ); //add_filter( 'cn_social_network_cached', 'cn_disable_output_cache' ); //add_filter( 'cn_link_cached', 'cn_disable_output_cache' ); //add_filter( 'cn_date_cached', 'cn_disable_output_cache' ); add_action( 'cn_update-entry', 'cn_enable_output_cache'); add_action( 'cn_save-entry', 'cn_enable_output_cache');
Save and activate the new snippet.
If you need to to disable any other caches, just uncomment the related filters.
Hope that helps!
09/10/2014 at 10:21 am #303426AlpineWeb Design
ParticipantThat worked perfectly and yes that is how we did it – I assume there is no way to clear the cache or edit the cache.
CJ
09/10/2014 at 10:40 am #303436Steven Zahm
KeymasterSorry no … this cache in only updated when the entry is edited in the admin.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.