Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recaptcha keys disappear if profile is reinstalled #36

Closed
wesleybl opened this issue Jul 21, 2022 · 1 comment
Closed

recaptcha keys disappear if profile is reinstalled #36

wesleybl opened this issue Jul 21, 2022 · 1 comment

Comments

@wesleybl
Copy link
Member

If you had a site with the keys configured, and you reinstall the collective.recaptcha profile, they disappear from the registry.

This makes it no longer possible to authenticate to the portal if recaptcha is on login. When accessing the login page, the error occurs:

2022-07-21T16:25:56 ERROR Zope.SiteErrorLog 1658431556.790.699408488915 http://localhost:8080/Plone/login
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.CMFCore.FSPythonScript, line 127, in __call__
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 344, in _exec
  Module script, line 15, in login
   - <FSPythonScript at /Plone/login>
   - Line 15
  Module Products.CMFFormController.FSControllerPageTemplate, line 91, in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line 32, in _call
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 237, in _exec
  Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
  Module Products.PageTemplates.PageTemplate, line 87, in pt_render
  Module zope.pagetemplate.pagetemplate, line 132, in pt_render
  Module five.pt.engine, line 98, in __call__
  Module z3c.pt.pagetemplate, line 176, in render
  Module chameleon.zpt.template, line 302, in render
  Module chameleon.template, line 215, in render
  Module chameleon.template, line 192, in render
  Module b05f017500fd6a75a2dd32f19a0e6ab0, line 1953, in render
  Module 9ba34d0332ea22bf521b9db855cc3be5, line 1320, in render_master
  Module 9ba34d0332ea22bf521b9db855cc3be5, line 615, in render_content
  Module b05f017500fd6a75a2dd32f19a0e6ab0, line 1943, in __fill_main
  Module b05f017500fd6a75a2dd32f19a0e6ab0, line 1019, in render_login
  Module collective.recaptcha.view, line 48, in image_tag
AttributeError: 'NoneType' object has no attribute 'public_key'

 - Expression: "python:context.restrictedTraverse('@@captcha').image_tag()"
 - Filename:   /Plone/skins/login_form.cpt
 - Location:   (line 167: col 58)
 - Source:     ... python:context.restrictedTraverse('@@captcha').image_tag()"/ ...
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "nothing"
 - Filename:   ... theme.sunburst.skins.sunburst_templates.main_template.pt
 - Location:   (line 91: col 76)
 - Source:     ... ne-slot="header" tal:content="nothing">
                                                 ^^^^^^^
 - Expression: "context/main_template/macros/master"
 - Filename:   /Plone/skins//login_form.cpt
 - Location:   (line 5: col 23)
 - Source:     ... etal:use-macro="context/main_template/macros/master"
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  repeat: <RepeatDict ('None',) at 0x7f411720ced0>
               template: <ImplicitAcquisitionWrapper ('login_form',) at 0x7f4117178820>
               modules: <instance ('None',) at 0x7f412ddf3c80>
               here: <ImplicitAcquisitionWrapper ('Plone',) at 0x7f41172ce050>
               wrapped_repeat: <SafeMapping ('None',) at 0x7f411725a3b0>
               user: <ImplicitAcquisitionWrapper ('None',) at 0x7f41171780a0>
               nothing: <NoneType ('None',) at 0x56108fe32560>
               root: <ImplicitAcquisitionWrapper ('Zope',) at 0x7f411751df50>
               target_language: pt_BR
               container: <ImplicitAcquisitionWrapper ('Plone',) at 0x7f41172ce050>
               default: <object ('None',) at 0x7f4133945800>
               request: <instance ('None',) at 0x7f41172ce7d0>
               traverse_subpath: <list ('None',) at 0x7f4117174690>
               loop: {...} (1)
               context: <ImplicitAcquisitionWrapper ('Plone',) at 0x7f41172ce050>
               translate: <function ('translate',) at 0x7f4117203bd0>
               macroname: master
               options: {...} (2)
@wesleybl
Copy link
Member Author

Fix in #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant