Support Forum

Fatal error: Call to a member function check_connection()

30 Answers

New Answer

MP Mr Papa
Mr Papa
Member

and I assume, no change?  didnt really expect so, but was hoping… is one case where the $wpdb object would not be valid…

you might also have display errors turned off in your php ini like one really should for production sites…

still looking, but a bit stymied how the $wpdb object wouldnt exist..

PB Paul Browning
Paul Browning
Member

Done as requested but no change.

I can’t seem to send any PMs now as it won’t auto complete.

Regards

Paul

MP Mr Papa
Mr Papa
Member

I am still at a loss as to what is going on here…  and why just the two of you are having this issue…

upon further research, this check connection is only used when we are trying to generate an error and log it..  so we are definitely in a some odd state here…

For now, to remove the error, I would suggest going to forum – options – global settings and disable logging…  that should at least remove the error…

also, any errors displayed on forum – toolbox – error log?

RY Ryan
Ryan
Member

I haven’t had the connection error today, but I have had the following:

[04-Oct-2015 16:08:35 UTC] PHP Warning – Creating default object from empty value – file: /simple-press/sp-startup/site/sp-site-support-functions.php – line: 686 – function: sp_check_for_updates

[04-Oct-2015 16:08:35 UTC] PHP Warning: Creating default object from empty value in /home/HOSTACCOUNT/public_html/wp-content/plugins/simple-press/sp-startup/site/sp-site-support-functions.php on line 686
[04-Oct-2015 16:08:35 UTC] PHP Warning – Creating default object from empty value – file: /simple-press/sp-startup/site/sp-site-support-functions.php – line: 686 – function: spHandleShutdown

MP Mr Papa
Mr Papa
Member

nah, those are harmless notices (not errors) and unrelated… in fact, those three have already been dealt with in the next version…

RY Ryan
Ryan
Member

Mr Papa said
nah, those are harmless notices (not errors) and unrelated… in fact, those three have already been dealt with in the next version…

Well, the changes you asked me to do seem to have so far fixed the check_connection error, if it doesn’t happen over the next few days then it has fixed it for me at least.

MP Mr Papa
Mr Papa
Member

okay, thanks for update… for next release, I have added some extra checks (shouldnt be necessary, but alas) to make sure the wp db is actually active before making the check… since this can only happen when an error is about to be logged, wont have any impact on normal site operation….

RY Ryan
Ryan
Member

Mr Papa said
okay, thanks for update… for next release, I have added some extra checks (shouldnt be necessary, but alas) to make sure the wp db is actually active before making the check… since this can only happen when an error is about to be logged, wont have any impact on normal site operation….

Awesome, any chance you have an ETA for next release? I am getting 3 lots of that new error twice daily. (I know its not harming anything obvious but it still an error line). I like my error_log’s being clean 😀

PB Paul Browning
Paul Browning
Member

Okay,

not fixed for me but I don’t know any coding whereas you both seem to be the experts. Will the next update fix it?

Regards

Paul

MP Mr Papa
Mr Papa
Member

not fixed for me

did you make the options change I requested in post #18???  no code changes required… just checking a box in the options…

no ETA on next version at this time…

RY Ryan
Ryan
Member

Nope, it isn’t fixed 🙁

It happened 2 days ago, after 4 days of not happening. :/

RY Ryan
Ryan
Member

Mr Papa said
This is with error logging turned off?

Nope, error logging is turned on for good reason, to spot and log errors.

It’s an error somewhere since 4.3/4.3’s compatible version onwards.

MP Mr Papa
Mr Papa
Member

Well,  as covered in this topic, it’s an a issue when reporting an error… For some reason in the case of the two reports here, the wp db object does not exist…

The suggested fix for now is turn off error logging… In next version we will add a check for the object before Justin though the wp db object should always exist….

RY Ryan
Ryan
Member

Also, “Limit forum display to within WP loop” makes a problem for me, if I go to a topic say at:

https://www.website.com/forum/section/post and then click or just hover my mouse about my wordpress’s navigation to the page “Forum” it shows https://www.website.com/forum/section/post when it should be https://www.website.com/forum/

So obviously, I’ve disabled that.