Topic-icon Bug when facebook social login is not set up

Active Subscriptions:

None
2 years 5 months ago #67632 by CyrusXxX
If you enable Facebook (not bussiness one) social login plugin but do not set it up for example insert dummy app and secret key and go to jfbc acounts page and click on Connect with Facebook you will get 404 IMPLODE(): ARGUMENT #2 ($ARRAY) MUST BE OF TYPE ?ARRAY, STRING GIVEN error.

Thank you!
The topic has been locked.
Support Specialist
2 years 5 months ago #67634 by mel
Hmm. That's not the behavior I'm seeing on Joomla 4.0.4 on my test site.

If I have the Facebook jfbconnect plugin enabled:
* With an empty app id / secret key, no Facebook app shows up on the front-end (as expected)
* With a dummy app id/secret key like you suggest, a link for the Facebook app shows up in the accounts page. When I click on Connect with Facebook, I get directed to a Facebook page and have an error "Invalid App ID
The provided app ID does not look like a valid app ID."

Can you turn on debug system in the Global Configuration area and send me the Callstack that appears when you get that error?

-Melissa
The topic has been locked.
Active Subscriptions:

None
2 years 5 months ago #67639 by CyrusXxX
Hello Mel, in attachment you will find error log related to this.


Thank you! 

File Attachment:

File Name: error.txt
File Size:19 KB
Attachments:
The topic has been locked.
Support Specialist
2 years 5 months ago #67646 by mel
Make this code change and you should be good.

In administrator/components/com_jfbconnect/assets/facebook-api/base_facebook.php, at line 1477, replace
$query = '?' . implode($retained_params, '&');
with
$query = '?' . implode('&', $retained_params);

In PHP 8.0 and later, the order of the arguments for the implode statement is strict and requires the glue to be first. Prior to that, the parameters could be passed in either order. You're running 8.0.12 now...

Checking this fix in for the next bug fix release.

-Melissa
The topic has been locked.
Active Subscriptions:

None
2 years 5 months ago #67649 by CyrusXxX
Hello Mel now it works like a charm.

I confirm that it works.

Thank you and sorry a lot happened from my begining with this project and php8 was one of them :)
The topic has been locked.
Support Specialist
2 years 5 months ago #67650 by mel
No worries. It's a necessary change on our end. More and more sites will start moving to PHP 8.
The following user(s) said Thank You: CyrusXxX
The topic has been locked.