Closed (fixed)
Project:
CAPTCHA
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Jun 2015 at 17:24 UTC
Updated:
7 May 2021 at 05:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
m1r1k commentedComment #2
m1r1k commentedAnd now with required files :)
Comment #3
berdirYou don't need both a menu link and a local task, IMHO, just a local task should be enough.
Comment #8
elachlan commentedCould you re-roll the patch with only the local task?
Comment #9
berdirComment #10
ddrozdik commentedI have updated the patch.
Comment #11
berdirThis is not the same, the old call was about checking if there are languages that do RTL, this will never be TRUE now.
You shouldn't create a new request, just have it injected by adding Request $request to the buildForm() method.
Comment #12
ddrozdik commentedOK, I have updated the patch and added more modifications. Currently page works correctly.
Comment #13
ddrozdik commentedComment #15
naveenvalechaComment #16
ddrozdik commentedTest again.
Comment #17
ddrozdik commentedComment #18
naveenvalechasame here inject the @language_manager service.
Please inject the @kernel service.
same as above. please inject the @kernel service
Edit : oops please ignore 2,3 those are static methods so no need to inject the service.
Comment #19
ddrozdik commented@naveenvalecha your are right. I have update the patch.
Comment #20
naveenvalechaComment #21
hass commentedThis should be a render array (the upgrade path from theme_image()
render array
Since Drupal 7 we should not use md5 - use sha2 only.
Comment #22
ddrozdik commenteditem #3 will be fixed in this issue https://www.drupal.org/node/2486113
Comment #23
elachlan commentedCould you re-roll the patch with the fixes please?
Comment #24
naveenvalechaStraight reroll after #2486113: Replace md5 with sha256 hashes
Comment #26
elachlan commentedComment #28
pavelculacov commentedError
Drupal\Core\Config\UnsupportedDataTypeConfigException: Invalid data type for config element image_captcha.settings:image_captcha_fonts_preview_map_cache.3438abc85ac58eaab01cd741b1c3f9bb5dd3b9be3c079b1a7851884135608b2f in Drupal\Core\Config\StorableConfigBase->validateValue() (line 160
Comment #29
pavelculacov commentedProblem is in this method
$form['image_captcha_font_settings'] = $this->settingsDotSection();
Comment #30
harald_ commentedHi, that is unfortunately not fixed. Please reopen this issue.
The settings page cannot be accessed via the backend, the error message appears as described by Regnoy.
Comment #31
anybody@Maintainer, @Regnoy & harald_ have you tried the latest dev? Does the problem still exist there?
If everything is OK in dev, lets please create a new stable release
If it's not OK, could the maintainer please re-open the issue?
Comment #32
anybody@elachlan / Maintainer: I just checked this myself. The current dev does not work, the image captcha settings form does not appear in the navigation / tabs. We'll need a follow-up patch. Please re-open this issue to have the still existing problem / context.
Comment #33
anybodyAs temporary workaround you can set the values using devel config editor: /devel/config/image_captcha
Comment #34
elachlan commentedComment #35
couturier commentedComment #36
yogeshchaugule8 commentedI've created a patch by using existing available configurations. Following issues are updated in patch :
Comment #37
jernejbeg commentedPatch fix_image_captcha_settings-2501699-36.patch does not apply. Marking this as Needs work.
Comment #38
rpayanmComment #39
rpayanmComment #40
anybodyHi @rpayanm - could you please provide an interdiff? You posted a patch without any comment, so we can't understand, what changed. Thank you!
Comment #41
anybodyI tried the patch in #38 and found the following issues:
on the settings page.
Anyway I can confirm that the patch works and creates a configuration page, which is much better than none... but the 1st and 2nd point should be fixed first to prevent broken captcha.
I'd vote for a first "working" solution and follow-up improvements to at least have the Drupal 7 status.
Thank you all very much!
Comment #42
rahulrasgon commentedComment #43
rahulrasgon commentedPlease review the patch.
Following issues are updated in patch :
image_captcha_fontsstores the file path in the config, and on form we are rendering the hash value as options.This warning was due to incorrect library name used.
Thanks
Comment #44
anybodyWhao @rahulrasgon GREAT work!
Fixes the mentioned problems in #41.
One thing I didn't see before is the part of the patches from #36 on, which remove the protected method and replace them by a functional function. I can't see a good reason for that in Drupal 8 / 9 and it should be reverted.
Thanks a lot for your effort! Really looking forward to this!
Perhaps we can soon have maintainer feedback on this? @elachlan?
Comment #45
sanjayk commentedComment #46
sanjayk commentedSorry now I am busy some other task will resume later.
Comment #47
inaetaru commentedI'm sorry, but #43 breaks compatibility with Drupal 9. It uses
file_scan_directoryin_image_captcha_get_available_fonts_from_directories(instead of original$this->fileSystem->scanDirectoryingetAvailableFontsFromDirectories), but the method is deprecated in Drupal 8 and removed in Drupal 9.Anyway, thanks a lot for all your work!
Comment #48
berdirComment #49
sanjayk commented@berdir as per #47 have replace depreciated function and creating a new patch for D9.
Comment #50
sanjayk commented@Berdir Please ignore #49 patch. I have fixed the and uploading new patch and interdiff.
Comment #51
Anonymous (not verified) commentedI have tested this and the patch in #50 is working for me.
Comment #52
anybodyUsing #50 for nearly three months now and it adds back the important image captcha form missing since 7.x so I'd definitely vote to finally review and commit it.
One could discuss to put _image_captcha_get_font_uri into a class or similar but let's be honest, this is now missing since years at all, situation won't get worse ;)
Comment #53
nmatja commentedI have tested the fork update. Listed updates are working for me.
Comment #54
anybodyRTBC for the reasons given in #52. Anyway there's still space for improvement and additional tests, if someone would like to take that little but important project. :)
Any Captcha maintainer in this issue to finalize RTBC and commit this?
Thank you all!
Comment #55
japerry50 looked good to me as well. Committed!
Comment #57
anybodyWhao this is important news after years without proper configuration for Captcha image!
We should now focus on improvements and tests for that functionality as follow-up. Thank you very very much for commiting this @japerry!