Git Product home page Git Product logo

Comments (8)

adamwojs avatar adamwojs commented on June 25, 2024

Thank you for reporting @YohannsMonnier. I will take a closer look on this issue tomorrow and let you know 😉

from ezplatform-form-builder-recaptcha-field.

YohannsMonnier avatar YohannsMonnier commented on June 25, 2024

For the Solr Issue, I think it is due to the fact that the form is called in the solr indexer, and this field in the form generate an error because there is no user request , thus no way to get it from the requestStack

return $this->useLocaleFromRequest
            ? $this->requestStack->getCurrentRequest()->getLocale()
            : $this->defaultLocale;

This is generating the error message

[Error] Call to a member function getLocale() on null

from ezplatform-form-builder-recaptcha-field.

YohannsMonnier avatar YohannsMonnier commented on June 25, 2024

Dear @adamwojs the 2nd problem was due to proxy settings.

We still have the problem for indexing content that has a form with this Recaptcha Field.

Do you have an idea for a workaround for indexing ?

Yohann

from ezplatform-form-builder-recaptcha-field.

adamwojs avatar adamwojs commented on June 25, 2024

Self-note: to reproduce the issue locale_from_request options needs to be enabled e.g.

ewz_recaptcha:
    // ...
    locale_from_request: true

from ezplatform-form-builder-recaptcha-field.

YohannsMonnier avatar YohannsMonnier commented on June 25, 2024

@adamwojs if we deactivate "locale_from_request: true" we do not have the reindex bug, but the display in front is not translated to the current langage (here we have french).

Yohann

from ezplatform-form-builder-recaptcha-field.

adamwojs avatar adamwojs commented on June 25, 2024

I have some idea how to solve it but I will need some time. You can override ewz recaptcha.locale.resolver definition to

    # FIXME: workaround for https://github.com/adamwojs/ezplatform-form-builder-recaptcha-field/issues/1
    ewz_recaptcha.locale.resolver:
        class: EWZ\Bundle\RecaptchaBundle\Locale\LocaleResolver
        public: false
        arguments:
            - '%ewz_recaptcha.locale_key%'
            - '@=constant("PHP_SAPI") !== "cli" && parameter("ewz_recaptcha.locale_from_request")'
            - '@request_stack'

as very ugly workaround If you are in hurry. Expression passed as second argument will disable using locale from request if current execution env. is CLI

from ezplatform-form-builder-recaptcha-field.

YohannsMonnier avatar YohannsMonnier commented on June 25, 2024

@adamwojs

We were in a situation where we needed Recaptcha in production, but in the mean time -> solr indexation was frozen because of this bug

Thank you so much for this quick workaround !

from ezplatform-form-builder-recaptcha-field.

YohannsMonnier avatar YohannsMonnier commented on June 25, 2024

Dear Adam, beside from the proposed workaround, do you have any how we could fix this definitely ?

Thank you very much,
Yohann

from ezplatform-form-builder-recaptcha-field.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.