-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: portal-2.0.0, portal-3.0.0
-
Fix Version/s: portal-2.0.1, portal-3.0.1
-
Component/s: Liferay Faces Portal / Demos / Tests
-
Labels:None
Steps to Reproduce
1. Add the following properties to the $LIFERAY_HOME/portal-ext.properties file:
captcha.engine.impl=com.liferay.captcha.recaptcha.ReCaptchaImpl captcha.engine.recaptcha.key.private=<value-of-the-data-sitekey> captcha.engine.recaptcha.key.public=<value-of-the-secret-key>
2. Start Liferay Portal 7.0
3. Deploy the portal-showcase-portlet to $LIFERAY_HOME/deploy
4. Add the Portal Showcase to a portal page
5. Reload the portal page
6. Navigate to the following URL:
http://localhost:8080/web/guest/portal-showcase/-/portal-tag/portal/captcha/general
7. Click on the "I'm not a robot" checkbox
8. Click on the Submit button
Expected Results
The informational message "You entered the correct text verification code." is displayed.
Actual Results
If the "I'm not a robot" text was displayed in step#7, then the informational message "No value was entered for the non-required captcha" is displayed.
Otherwise, if the "I'm not a robot" text was not displayed in step#7, then a ClassNotFoundException for "com.liferay.portal.captcha.recaptchaReCaptchaImpl" will appear in the server logs, or the following stacktrace:
java.lang.NullPointerException at com.liferay.portal.captcha.CaptchaImpl.isEnabled(CaptchaImpl.java:80) at com.liferay.portal.kernel.captcha.CaptchaUtil.isEnabled(CaptchaUtil.java:64) at com.liferay.faces.portal.component.captcha.Captcha.isRequired(Captcha.java:66) at com.liferay.faces.showcase.component.field.Field.getStyleClass(Field.java:69) at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:2407) at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeBegin(GroupRenderer.java:76) at com.liferay.faces.util.render.DelegatingRendererBase.encodeBegin(DelegatingRendererBase.java:97) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:865) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:302) at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114) at com.liferay.faces.util.render.DelegatingRendererBase.encodeChildren(DelegatingRendererBase.java:120) at com.liferay.faces.showcase.component.example.internal.ExampleRenderer.encodeChildren(ExampleRenderer.java:133) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) at javax.faces.render.Renderer.encodeChildren(Renderer.java:176) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304) at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:114) at com.liferay.faces.util.render.DelegatingRendererBase.encodeChildren(DelegatingRendererBase.java:120) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)