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

Changing captcha language does not work #9985

Closed
VILLAN3LL3 opened this issue Mar 10, 2021 · 2 comments
Closed

Changing captcha language does not work #9985

VILLAN3LL3 opened this issue Mar 10, 2021 · 2 comments
Assignees
Labels
LTS-FIXED-9.2.5 Fixed in PrimeNG LTS 9.2.5 LTS-FIXED-10.1.0 Fixed in PrimeNG LTS 10.1.0 Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@VILLAN3LL3
Copy link

I'm submitting a ... (check one with "x")

[x ] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
The initialization of the captcha with the supplied language works. But if the language changes, the captcha is not re-rendered and remains in the original language.

Expected behavior
If the language changes the captcha should change the language, too.

Minimal reproduction of the problem with instructions
Template:

<p-captcha
        #captcha
        [siteKey]="captchaKey"
        theme="dark"
        [language]="(language$ | async) || 'de'"
        (onResponse)="doSomething($event)"
      ></p-captcha>

.ts file:

language$: Observable<string>;

What is the motivation / use case for changing the behavior?
Multilanguage app

Please tell us about your environment:
We tried it with several operation systems, ides and browsers

  • Angular version: 5.X
    11.x

  • PrimeNG version: 5.X
    11.2.0

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
    all

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    typescript 4.1.2

@yigitfindikli yigitfindikli self-assigned this Mar 11, 2021
@yigitfindikli yigitfindikli added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Type: Bug Issue contains a bug related to a specific component. Something about the component is not working labels Mar 11, 2021
@yigitfindikli yigitfindikli added this to the 11.3.1 milestone Mar 11, 2021
@yigitfindikli yigitfindikli added LTS-FIXED-10.1.0 Fixed in PrimeNG LTS 10.1.0 LTS-FIXED-9.2.5 Fixed in PrimeNG LTS 9.2.5 and removed LTS-PORTABLE labels Mar 15, 2021
@jsanz1209
Copy link

As a result of this fix, I now get the following error:

ERROR Error: reCAPTCHA has already been rendered in this element
at recaptcha__es.js:55
at Captcha.init (primeng-captcha.js:46)
at Captcha.ngAfterViewInit (primeng-captcha.js:36)

The captcha is working on, but it breaks javascript code

@mcrtricolor
Copy link

I'm having the same issue with the same error on console but worse. When i set a language i can't even see the captcha nor render the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-FIXED-9.2.5 Fixed in PrimeNG LTS 9.2.5 LTS-FIXED-10.1.0 Fixed in PrimeNG LTS 10.1.0 Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

4 participants