Topic-icon [9.0.244 Bug] Social Registration page CAPTCHA

Active Subscriptions:

None
Hi guys,
PHP 7.4.33 + Joomla 4.2.6 + JFBConnect 9.0.215

Joomla standard Registration page is working by grabbing the CAPTCHA from this setting:
- Joomla > System > Users > Manage > User Options > Captcha: ... where, if "Global" is selected, it will follow the
---. Joomla > System > Global Configuration > Site > Captcha: ... setting

JFBC showing CAPTCHA during Socials Registration should grab that setting following exactly the same way:
- Joomla > System > Users > Manage > User Options > Captcha: ...
--- where, when it will be set as "Global", it will follow the Global Configuration

BUG - While right now JFBC Social page Registration is grabbing it directly from Joomla Global Configuration.

For sure, it is not an urgent fix, but it is a "bug" that should be fixed on next release.
Please, Can you confirm and add it in your "to do" ?
The topic has been locked.
Support Specialist
1 year 2 months ago #68445 by alzander
Sorry for the delay. We're going to have to investigate this further. The issue may be a bug, but it's also one that's likely going to be hard to directly work around and use the "User Options" setting.

For our registration page, we load the joomla registration form xml file from components/com_users/models/forms/registration.xml
That XML file describes all the fields that should be shown during registration, including the captcha field.

That field is a built-in Joomla field and when it's loaded to display on a page, it goes through the hierarchy like you show for the captcha setting:
- Global
-- <component>

So, when displayed in the com_users component, it looks at the settings as follows:
- Global
-- com_users captcha setting

In JFBConnect, it looks at the settings like:
- Global
-- com_jfbconnect captcha setting

However, JFBConnect doesn't have a captcha setting, so the Global value is used.

We could add a captcha setting to JFBConnect, but that's one more setting for just that one page.. which isn't something we'd like to do. However, I'm not sure how to trick Joomla into looking at the com_users captcha setting when loading that form from another component either.. and that could open a can of worms to make sure no other issues during registration are introduced.

Bottom line - I can confirm your behavior you describe above, but it's a less easy fix that it may sound like. Hopefully the above explains why.

Can you let me know how you're using the Global setting differently than the User setting? That may help us understand the necessity of being able to override it in JFBConnect to properly investigate further.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
6 months 2 weeks ago - 6 months 2 weeks ago #68642 by joomleb
Hi Alex,
finally, after more than 8 months we are back to discuss about this CAPTCHA issue.
So, in first of all at the time we are writing we are now on Joomla 4.3.4 and the Joomla 5 is near the corner.

"...Can you let me know how you're using the Global setting differently than the User setting?..." = Sure.
Please, read carefully this discussion I had on HikaShop with Nicolas for an annoing Spam Attack we suffered: www.hikashop.com/forum/checkout/905915-u...egistration-bug.html

At the end, the solution included also the Aimy Captcha Less Form Guard installation that we set for the
-- com_users captcha setting
not for the
- Global setting
A hard Captcha forcing just for the Registration process.

So, I got that is a developing annoing issue for you, but is one of those small things that make big differences.
For me could be good both solutions:
- Global
-- com_users captcha setting
OR 
- Global
-- com_jfbconnect captcha setting
What is important is to don't follow directly the Global setting.

I remain available
Last edit: 6 months 2 weeks ago by joomleb.
The topic has been locked.
Support Specialist
6 months 2 weeks ago #68662 by mel
Alex summarized this for me so that I could try to come up with an implementation change. ( I haven't been following the thread closely) - basically, my understanding is the JFBConnect login register view should display the com_users captcha setting first. If there's nothing set for there, then fall back to use the global configuration captcha setting.

With how our login/register form is generated, it would not be trivial to add a JFBConnect setting for captcha. I have been working on trying to find an easy solution to this code-wise to follow com_users first.

In /components/com_jfbconnect/views/loginregister/view.html.php after line 196, you can add the following two lines before the display statement
$captchaValue = ComponentHelper::getParams('com_users')->get('captcha', Factory::getApplication()->get('captcha', null));
Factory::getApplication()->set('captcha', $captchaValue);

On my test site:
* I set com_users to reCaptcha and global configuration to reCaptcha invisible.
On the front-end:
* I visited a registration page and the captcha showed (com_users)
* I visited the login register view for JFBConnect and the captcha showed (like com_users).
* I logged in and visited an edit contact view. The captcha was hidden. (Global config setting)

Obviously this needs to be tested more, but if you want to check it out, feel free.

-Melissa
The topic has been locked.
Active Subscriptions:

None
6 months 2 weeks ago - 6 months 2 weeks ago #68675 by joomleb
Hi Mel,
it sounds good.
To be sure I don't incour into copy and paste semantic errors (I'm traveling and I'm using phone and tablet, I'm not used to...), Please, can you add here a copy of the modified view.html.php file ?
So I will use it for testings...
Last edit: 6 months 2 weeks ago by joomleb.
The topic has been locked.
Support Specialist
6 months 1 week ago #68679 by mel
Attached is the file. Just remove the .txt extension at the end of the filename (the forum won't let me directly attach php files).

 

File Attachment:

File Name: view.html.php.txt
File Size:8 KB
Attachments:
The topic has been locked.
Active Subscriptions:

None
6 months 1 week ago #68684 by joomleb
Hi Mel,
Thank You. I update it and tested. It seems that works as expected, BUT

If I assign the Aimy Less Captcha as Captcha to the com_users: www.aimy-extensions.com/joomla/captcha-less-form-guard.html

- while it is shown as expected on the Joomla Registration page, here you can see it's countdown on the registration button in action: test1.egulp.net/registracion

- in the JFBC Special Registration page the Countdown is not applied to the Registration button

I'm going to send you the plugin by email for your internal testing
The topic has been locked.
Support Specialist
6 months 1 week ago #68689 by alzander
We don't know how that plugin works. It probably expects a specific class or id on the button itself. That's something you could ask their developers for and override our template files to provide the correct CSS to the button so their captcha can find it properly.

I hope that helps put you on the right track, but it's unlikely we'll add code to JFBConnect specifically to make this specific captcha plugin work.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
6 months 1 week ago #68692 by joomleb
Hi Alex,
"...That's something you could ask their developers for..." = this time I'm not agree, because:

- "...We don't know how that plugin works..." = This is why I sent to you the page link. It is really a simple Captcha plugin, just be sure to activate the countdown for testing (the button should be uncluckable during the countdown)... you can see it in action here test1.egulp.net/registracion
- There are different Captcha plugins that "work on Registration button"
- "...It probably expects a specific class or id on the button itself..." = We are agree, this is why I wrote here
- to check and to exclude, be sure, there are not other JFBConnect issues
- if the "specific class I'd" is confirmed, it is JFBConnetc that has to "copy" the standard Joomla Registration "class Id" button, because in the JFBC Social Registration page JFBC is grabbing the Joomla Registration Form
- it could be just one of the plenty reported issues here due to the annoying Bootstrap 2/3/4/5 and 5.2 :D
- or related to this "bad JFBC Bootstrap callings" www.sourcecoast.com/forums/jfbconnect-9-...strap-conflict#68512
The topic has been locked.
Support Specialist
6 months 4 days ago #68705 by mel
If I turn off all of my SCLogin and JFBConnect extensions on my test site, enable that plugin and set the com_users capcha to it, I do not see the countdown on the register button when I go to the com_users registration page. Is there something more to do in the plugin settings?
The topic has been locked.