Closed (fixed)
Project:
CAPTCHA
Version:
8.x-1.x-dev
Component:
Image Captcha (image_captcha)
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2015 at 19:32 UTC
Updated:
10 Jul 2023 at 08:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
svipsa commentedHey, Cool idea. Let's do it!
Comment #3
afi13 commentedThis makes sense. I'd be happy to review and test any patches made for this functionality.
Comment #4
rsvelko commented+1 for this feature.
The https://www.drupal.org/project/image_captcha_refresh module has already usage of 7435 and 0 open bugs. The code is small and seems easy to review and merge into captcha.
So +1 for this.
Comment #5
rsvelko commented@DmitryDrozdik: when creating the new merge patch :
- maybe u will need to stop using form_alter and put the form api code into the normal captcha module's form generator function
- when its a separate module it maybe checks if captcha module is installed - now when u merge it - remove that check cause it will be the captcha module checking itself if enabled...
Comment #6
seorususI encourage it
Comment #7
alexander.ilivanov commented+1 for that.
Comment #8
anpolimus+1
Comment #9
ddrozdik commented#2501699: Fix Image CAPTCHA settings form is blocker for now.
Comment #10
iVanilla commentedHi.
Could you develop a version of Drupal 8?
Thanks.
Comment #11
aswathyajish commentedPlease develop a D8 version of this.
Comment #12
ddrozdik commentedok. I am working on this.
Comment #13
RavindraSingh commentedHave you developed some dev version of this module in D8? If yes, I can contribute in that with you.
Comment #14
RavindraSingh commentedI had ported this module in Drupal 8. but as i had a discussion with @ddrozdik, He suggested to add the feature to captcha module. So here is the first working image refresh patch with Captcha 8.x-1.x branch.
This works good.
I am waiting for the captcha module maintainer if they approve this feature should be a CAPTCHA, after that I am happy to improve the below mentioned tasks -
Comment #15
RavindraSingh commentedComment #16
RavindraSingh commentedFor #5, We are not using form alter in new patch. I am trying to fix this from image_captcha module only.
Comment #18
naveenvalechaThat's the nice feature. +1 to be included into captcha.
Here are some more nits other than mentioned in #14
This library is using the jquery so make it dependent on the core/jquery
Add new line at EOF
Move this use statement at top ofthe file.
Remove the deprecated function.
Extra spacing.
Add new line at EOF
Add new line at EOF
We need a security token here to prevent the CSRF
Remove extra lines
Make the comment more explanatory.
Inject the database connection into controller.
use the Url component class instead.
Comment #19
RavindraSingh commentedThank you @naveenvalecha, As mentioned in my last comment I will improve these issue after only if CAPTCHA module maintainer agrees on adding the feature into Drupal 8.
Comment #20
RavindraSingh commentedWill pass the baseURL from Drupal setting.
Comment #21
naveenvalechaAs a co-maintainer of the module. +1 from my end. pinged to wundo & elachlan about the same. Let's improve it and get this dang in.
Comment #22
wundo commentedI don't have time to work on this right now, but I'd love to have this committed to both D7 and D8 branches.
Assuming we have a good test coverage for this feature, +1.
Also, I'd make this part of the API itself, not only Image Captcha. I know some challenges implement their on "refresh" (e.g. Recaptcha), but it would be great to have this feature as challenge agnostic as possible (and allow individual challenges to suppress the standard behaviour)
Comment #23
wundo commentedComment #24
ddrozdik commentedI agree that make sense to do this as part of API. I will try to find some time to do this.
Regarding D7 branch, my module is used on many sites and migration this functionality into Captcha module will make lot's of regressions.
Comment #25
elachlan commentedI like the idea of it. I think instead of a button we should use some sort of an icon. It avoids need for translation.
Comment #26
bpresles commentedFind attached an updated version of the patch
Comment #28
bpresles commentedI didn't manage to run the unit test on my dev environment (for an unknown reason, there is no "captcha" group listed by phpunit (while all my other contrib modules with tests are listed). So I try posting a possible fix and we'll see if the test pass.
Comment #29
sakural commentedI find these patch i can't use,
it return error that i can't apply normally.
so i create one, matbe it can help someoneelse.
thanks.
Comment #30
gg24 commentedHi,
I have re-rolled the patch for 8.x-1.x and I have resolved the syntax issues as well. Please review the patch.
Thanks!
Comment #32
gg24 commentedComment #33
navneet0693 commentedNew lines :-)
Little of more adjustments will be required in image_captcha.libraries.yml for tests to pass. 'all' category doesn't exists
to
Comment #34
navneet0693 commentedComment #35
gg24 commentedMade changes as per suggestion above. Please review the patch.
Thanks!
Comment #36
navneet0693 commentedFinding it little bit irrelevant to context of class
Exception class not declared above. or you can use
\ExceptionUsing StringTranslationTait, $this->t()
++ to all who worked upon this.
Comment #37
gg24 commentedHi @navneet0693,
I have made the suggested changes. Please review the patch attached.
Thanks!
Comment #38
navneet0693 commentedThis should be all, good to go!
Comment #40
wundo commentedComment #41
Ice-D commentedUpdated the module via composer, now I'm getting
There indeed is no Controller of that name. But it's mentioned in image_captcha.settings.yml. What happened?
Comment #42
greenskunkThe patch does contain the controller BUT I can not get the patch to cleanly apply.
I've added the patch via composer and directly and both fail against the current dev.
The patch does work to add the CaptchaImageRefresh controller
Is anyone else having this problem?
Comment #43
Ice-D commentedYes, I couldn't apply the patch either. Looking at the commit in #39, the CaptchaImageRefresh controller and a bunch of other related files seem to be missing. It would be great if one of the maintainers could take a quick look.
Comment #44
elachlan commentedThis broke the tests.
Comment #46
elachlan commentedTests are now passing.
Comment #48
Abhinaw commentedHi All, hope doing good. DO we have image_captcha Refresh modules ?
Comment #49
Abhinaw commentedComment #50
DAMIANC _ commented