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.
- This topic has 14 replies, 2 voices, and was last updated 12 years, 9 months ago by
Steven Zahm.
-
AuthorPosts
-
10/01/2013 at 11:17 am #270436
SWS
GuestWe’ve downloaded the basic plugin for the first time and started to us it.
We’ve had to make direct/mass updates to the tables (e.g. changing all phone numbers to work numbers) as this was quicker than doing it manually.
These changes aren’t appearing on the website. I assume this is because the website shows the information from the cached columns in the main table.How can I either:
1) rebuild the cache records.
2) Switch from the cache columns to use the actual data.I don’t want to mess around with the data too much yet so I haven’t done things like deleting all the content from the cache columns.
Thanks.
10/01/2013 at 1:57 pm #270456Steven Zahm
Keymaster@ SWS
Will, there’s not an easy solution for this…
Try this… open the
class.output.phpfile. Do a search forBlock(. In each instance that you see, $cached = TRUE ) {on the same line; changeTRUEtoFALSE. There should be only 8 instances. Save and upload overwriting the original. Now Connections will never use the cached data from the main table. Doing this will definitely cause much more db usage.Deleting the cache columns will not have any effect other than nothing will be shown for that data.
You could also try force updating every single entry…
You need to be on 0.7.9+ for this to work:
add_action( 'cn-loaded', 'cnBulkUpdate' ); function cnBulkUpdate() { $results = $connections->retrieve->entries(); foreach ( $results as $row ) { $entry = new cnEntry( $row ); $entry->update(); } }Dropping this in the theme’s functions.php file should do it.
A few words of caution…
I didn’t test the code, but there’s no reason it should not work.
IMPORTANT: Put your site in maint mode and sure no others are on the site before you add this code because it will run on every page load. That would be bad.
I would test with a single broken entry first to make sure it’s all good; like so:
add_action( 'cn-loaded', 'cnBulkUpdate' ); function cnBulkUpdate() { // X == the entry ID to update. $results = $connections->retrieve->entries( array( 'id' => X ) ); foreach ( $results as $row ) { $entry = new cnEntry( $row ); $entry->update(); } }I would also suggest increasing the PHP memory and max exec time. What you have set now should be perfectly fine; but why chance it, right?
After you test on a couple and you’re satisfied that it worked. Go ahead and do them all. Don’t worry about excluding the ones you tested on.
Let me know how it goes.
10/03/2013 at 10:57 am #270608SWS
GuestHi,
thanks for the response.
I update from 0.7.9.1 to 0.7.9.2 before I started.
I then tried the code in the functions.php file firstly as I don’t really want to make changes to the plugin (which I lose when I update it).
I changed the X to an ID number from my list but it didn’t update. Even using the other code to update all of them didn’t update any records.
10/03/2013 at 1:54 pm #270621Steven Zahm
Keymaster@ SWS
Darn, yeah, that’s right. A simply update would flush the cache. Apologies for sending done the wrong road.
Can I get a temp admin account? I’d like to test another method.
10/04/2013 at 11:40 am #270682SWS
GuestI would like to but I’ve been advised that I can’t for various reasons.
Hopefully you have your own test area too.
10/04/2013 at 4:13 pm #270711Tim
GuestHi,
I’ve replicated the error in my test environment and tried the code too.
I can give you access.Can you give me an email address to send the user/password for the temp admin account or should I post it here?
10/05/2013 at 9:48 am #270766Steven Zahm
KeymasterSend the info to me using the Contact link at the bottom of the page. Thanks!
10/05/2013 at 11:51 am #270769Tim
GuestEmail sent.
10/11/2013 at 12:35 pm #271201Tim
GuestHi,
Any progress?
10/23/2013 at 11:56 am #272163Josh
GuestThanks! Your very first suggestion worked great for me. (Search for “Block(” in the class.output.php file.
I needed to apply my database changes to the website linksfor each entry (added http:// to all instances in the database) so I found the “getLinkBlock(” function and set $cache = FALSE. Reloaded the page and the changes took effect. I then returned it back to $cache = TRUE to return to regular caching. That way, future updates to the plugin will not affect the functionality of the site, at least in that regard.
We’re back in business. Thanks a bunch!
-
AuthorPosts
- You must be logged in to reply to this topic.
