Forum feed doesn't display in SSL mode

Hi. I first raised this here:

 

https://www.boonex.com/forums/topic/Forum-Feed-in-Groups-never-displays.htm

 

however have done enough testing to confirm this is a bug in 7.2.1 when SSL is enabled.

 

The forum feed simply does not work when SSL is fully enabled over the site in header.inc.php. The rest of the site works fine from what I can see except for this block (which is also in Groups).

 

This is not a major problem, since I can remove the block to avoid it, but it is a bug nonetheless.

 

At the moment I have the site using non-SSL and it's working fine but I won't put it on-line without SSL.

 

I've provided AlexT with credentials to the site which I'll keep for a period of time if you need to trouble-shoot in any way.

Quote · 6 Jan 2016

interesting, i will look into this later.

so much to do....
Quote · 6 Jan 2016

Edit inc/utils.inc.php @line 1180

curl_setopt($rConnect, CURLOPT_TIMEOUT, 10);
curl_setopt($rConnect, CURLOPT_URL, $sFileUrl);
curl_setopt($rConnect, CURLOPT_HEADER, 0);
curl_setopt($rConnect, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($rConnect, CURLOPT_SSL_VERIFYPEER, 0);
if (!ini_get('open_basedir'))
curl_setopt($rConnect, CURLOPT_FOLLOWLOCATION, 1);

Add that white line, that should fix it.

 

Peace!

 

EDIT: What cert you have on your site? is it self-signed?

so much to do....
Quote · 6 Jan 2016

Hi Prashank. Thanks for this, I've implemented, tested, all is working as expected.

I really appreciate this as this problem is one of the milestones holding the site back from going on-line.

One last thing to "fix" now and all will be well.

 

Edit inc/utils.inc.php @line 1180

curl_setopt($rConnect, CURLOPT_TIMEOUT, 10);
curl_setopt($rConnect, CURLOPT_URL, $sFileUrl);
curl_setopt($rConnect, CURLOPT_HEADER, 0);
curl_setopt($rConnect, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($rConnect, CURLOPT_SSL_VERIFYPEER, 0);
if (!ini_get('open_basedir'))
curl_setopt($rConnect, CURLOPT_FOLLOWLOCATION, 1);

Add that white line, that should fix it.

 

Peace!

 

EDIT: What cert you have on your site? is it self-signed?


It's a valid certificate by a certificate authority, it's not self-signed.

Quote · 6 Jan 2016

 

It's a valid certificate by a certificate authority, it's not self-signed.

i think you need to update your OS root certs, on ubuntu these are located at /etc/ssl/certs. You will have to look around for updating certs for your OS. cUrl by default uses system certs.

so much to do....
Quote · 6 Jan 2016

Hi Prashank,

I would think the same thing however the server is running the latest CentOS 7.2 (just released/updated to) so it's very unlikely the root certs are old/outdated, and confirmed by:

-r--r--r-- 1 root root 359773 Jan  5 22:50 /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
-r--r--r-- 1 root root 266702 Jan  5 22:50 /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem

ie. only a couple of days old from Red Hat.

 

I agree there's a problem but no idea where it would come from if the OS CA certs are the latest.

 

 

It's a valid certificate by a certificate authority, it's not self-signed.

i think you need to update your OS root certs, on ubuntu these are located at /etc/ssl/certs. You will have to look around for updating certs for your OS. cUrl by default uses system certs.

 

Quote · 6 Jan 2016

In the upcoming version we included stand-alone root cert, so in the case if it isn't found in the system it can be used, we modified bx_file_get_contents the following way:

https://github.com/boonex/dolphin.pro/blob/cabc21f6a26766c5bab1a72672ffcc3a34e17974/inc/utils.inc.php#L1176

Also you need the certificate:

https://github.com/boonex/dolphin.pro/blob/cabc21f6a26766c5bab1a72672ffcc3a34e17974/plugins/curl/cacert.pem

Rules → http://www.boonex.com/terms
Quote · 11 Jan 2016

Hi Alex. Thank you for this update.

I removed the earlier mod to disable the SSL check, I modified the bx_file_get_contents line, I created the curl directory and downloaded the cacert.pem, tested the block and works fine.

Really good to get this one finally fixed right. Thanks.


Quick note though, now the "Location block" doesn't display - the one with the Google map, would I need to be changing more things as the Git commit was related to another ticket? - because of this problem the page never stops loading.

Note the other fix of disabling the SSL check showed both feed and location blocks successfully.

 

When I re-add the "CURLOPT_SSL_VERIFYPEER, 0" (with the below changes) both blocks display successfully.

 

In the upcoming version we included stand-alone root cert, so in the case if it isn't found in the system it can be used, we modified bx_file_get_contents the following way:

https://github.com/boonex/dolphin.pro/blob/cabc21f6a26766c5bab1a72672ffcc3a34e17974/inc/utils.inc.php#L1176

Also you need the certificate:

https://github.com/boonex/dolphin.pro/blob/cabc21f6a26766c5bab1a72672ffcc3a34e17974/plugins/curl/cacert.pem

 

Quote · 12 Jan 2016

It shouldn't be related, it maybe some other problem.  

CURLOPT_SSL_VERIFYPEER helps in the case if self signed or expired SSL certificates are used somewhere, including remote URLs.

Quick note though, now the "Location block" doesn't display - the one with the Google map, would I need to be changing more things as the Git commit was related to another ticket? - because of this problem the page never stops loading.

 

Rules → http://www.boonex.com/terms
Quote · 16 Jan 2016

Hi Alex. Ok, I'll raise another bug on this one then. Thanks.

 

It shouldn't be related, it maybe some other problem.  

CURLOPT_SSL_VERIFYPEER helps in the case if self signed or expired SSL certificates are used somewhere, including remote URLs.

Quick note though, now the "Location block" doesn't display - the one with the Google map, would I need to be changing more things as the Git commit was related to another ticket? - because of this problem the page never stops loading.

 

 

Quote · 16 Jan 2016

I tried all these things and yet, my Forum Feed block is just loading forever. 

Anything I can post here to help someone help me?

Quote · 3 Mar 2019

I just wanted to confirm that this is not working for me either on a site using 7.3.4 and SSL.  The forum feed block on the home page and on the Group's Home page doesn't load; you get the spinning icon that never ends.  I haven't looked into the code yet.

Geeks, making the world a better place
Quote · 4 Mar 2019

Sometimes servers block requests to itself. In this case it can be fixed if you add the following record in your /etc/hosts file:

127.0.0.1 your-domain.com

replace your-domain.com with your real domain.

But this change require root access to the server.

Rules → http://www.boonex.com/terms
Quote · 5 Mar 2019

 

Sometimes servers blocks requests to itself. In this case it can be fixed if you add the following record in your /etc/hosts file:

127.0.0.1 your-domain.com

replace your-domain.com with your real domain.

But this change require root access to the server.

While I can't speak for the other person, this is not the case for me. I think the function needs to be examined again; I will do that when I have time.  I am upgrading a site from 7.1.6 to 7.3.4 so I have a lot of work to finalise things and will look at this later.

Geeks, making the world a better place
Quote · 5 Mar 2019

I can confirm that this is still a known issue.

Quote · 30 Jan 2020

Hello callum!

 

Did you apply the fix with 127.0.0.1 IP like AlexT said? It helps in most similar cases.

Quote · 30 Jan 2020

Yeah just tried this but no change :-(

This issue I have is that the forum block in the group I've created only shows the first post and no others in the feed.

Quote · 1 Feb 2020

Please provide me your Dolphin URL and admin access via PM.

Quote · 1 Feb 2020

Hi Leonid - I misinterpreted the function of the feed block. The feed block shows the forum topics. However, it does not show the recent posts from those topics (like the homepage block does). Is there a way to create that feature for all the topics in the group?

Quote · 2 Feb 2020

Hello callum!

 

The group forum contains one topic. So no need the same view as in Homepage.

Quote · 3 Feb 2020
Quote · 3 Feb 2020

Hmm. I’m able to create several topics in my groups forum but their is no block/feature to show recent posts to those topics.

Quote · 5 Feb 2020

Hello callum!

 

Yes, I meant the sub-forum, instead of the topic. So the block on the homepage uses the RSS URL like 

?action=rss_all


The block in the Groups page depends form the method getBlockCode_ForumFeed with the defined URL like:

$sRssId = 'forum|' . $this->_oConfig->getUri() . '|' . rawurlencode($this->aDataEntry[$this->_oDb->_sFieldUri]);

which is transformed to somehting like:

?ID=forum|groups|Lane-Cove-Sustainability-Action-Group&member=1

 

So you need to redeclare this method in modules/boonex/groups/classes/BxGroupsPageView.php with the new $sRssId variable and action like rss_forum.

Quote · 13 Feb 2020

I recently updated my SSL cert and following Prashank25's helped me resolved the issue of my forum posts not loading on my home page. Thank you geek_girl for directing me back to this post. You're a star.

Quote · 23 Jun 2020

Thanks @geek_girl for directing me back to this post.... the fix worked... again!

Quote · 15 Apr 2021
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.