? Pending
Referenced as Pull Request for: # 8657

User tests: Successful: Unsuccessful:

avatar ryandemmer
ryandemmer
9 Sep 2015

It is possible, under certain circumstances (for example when JForm::getFieldset is called), for JFormFieldCaptcha to be initiated in the Joomla Administration. This causes a fatal error as JFactory::getApplication()->getParams() (called on line 94), is not available in JApplicationAdministrator.

Line 88-89 added in this PR ends the setup process in this case.

I don't know of a use case for captcha in the Joomla Admin, but if there is one, then

JFactory::getApplication()->getParams()->get('captcha', JFactory::getConfig()->get('captcha'));

needs to be altered accordingly.

Testing

This is difficult to test as the error occurs in few circumstances, but was noticed in JCalPro following a recent JCE update which included a system plugin that uses JForm::getFieldset to get a list of all JFormField elements loaded. When editing a JCalPro Event, the form can include a captcha field in the front-end. When editing the Event in JCalPro in the Joomla Admin, the captcha field is not used, but JForm::getFieldset will still initiate it, resulting in the error described above.

A test could be created using the Joomla Article Manager by adding the following field to /administrator/components/com_content/models/forms/article.xml:

<fieldset
            name="captcha"
            label="Test Captcha"
        >
            <field
                name="captcha"
                type="captcha"
                label="Test Captcha"
                description="Test Captcha"
                validate="captcha"
            />
        </fieldset>

Then creating or editing an article with the latest version of JCE installed.

avatar ryandemmer ryandemmer - open - 9 Sep 2015
avatar ryandemmer ryandemmer - change - 9 Sep 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Sep 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 17 Sep 2015
Category Libraries
avatar zero-24 zero-24 - change - 17 Sep 2015
Easy No Yes
avatar Klipper Klipper - test_item - 12 Dec 2015 - Tested unsuccessfully
avatar Klipper
Klipper - comment - 12 Dec 2015

I have tested this item :red_circle: unsuccessfully on 0943aff

@test I could reproduce the issue, but there's no patch available....


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7840.

avatar roland-d
roland-d - comment - 12 Dec 2015

Closing this as we have a new PR #8657

avatar roland-d roland-d - change - 12 Dec 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-12-12 15:16:15
Closed_By roland-d
avatar roland-d roland-d - close - 12 Dec 2015

Add a Comment

Login with GitHub to post a comment