? Failure
Pull Request for # 7840

User tests: Successful: Unsuccessful:

avatar roland-d
roland-d
12 Dec 2015

This is a redo of PR #7840 made by @ryandemmer

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 roland-d roland-d - open - 12 Dec 2015
avatar roland-d roland-d - change - 12 Dec 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Dec 2015
Labels Added: ?
avatar roland-d roland-d - change - 12 Dec 2015
Rel_Number 0 7840
Relation Type Pull Request for
avatar brianteeman brianteeman - test_item - 19 Feb 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 19 Feb 2016

I have tested this item :white_check_mark: successfully on aefbee5


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

avatar brianteeman brianteeman - change - 1 Mar 2016
Category Plugins
avatar gwsdesk
gwsdesk - comment - 16 Mar 2016

When I add the code to the xml my ISIS template code is lost when I go to "Add article" in Joomla 3.5-RC4 (which is an update from 3.4.8 --> J3.5-Beta 1/2/3/4)-RC3/4

isis-missing

avatar joomla-cms-bot
joomla-cms-bot - comment - 16 Mar 2016

This PR has received new commits.

CC: @brianteeman


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

avatar roland-d
roland-d - comment - 16 Mar 2016

@gwsdesk Not sure where you added the XML code in the template but in the instructions it is suggested to put it in the article.xml. However what you see seems to indicate the patch is not in place as this is what happens without the patch.

avatar gwsdesk
gwsdesk - comment - 16 Mar 2016

Roland,
The code is perfectly well in place. See
http://screencast.com/t/OJEz9rUmsDG as proof. It is not placed in the template at all as you can see from the screencast. Nicely in the file as instructed but with the result as shown

On 3/16/2016 2:25 PM, RolandD wrote:

@gwsdesk https://github.com/gwsdesk Not sure where you added the XML
code in the template but in the instructions it is suggested to put it
in the article.xml. However what you see seems to indicate the patch
is not in place as this is what happens without the patch.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8657 (comment)

avatar wilsonge
wilsonge - comment - 16 Mar 2016

Leo can you please turn up error reporting to development - I'm sure there is another fatal error somewhere - and need to see where :) thanks!

avatar brianteeman
brianteeman - comment - 13 Apr 2016

@gwsdesk can you reply to @wilsonge question please


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

avatar brianteeman brianteeman - test_item - 13 Apr 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 13 Apr 2016

I have tested this item :white_check_mark: successfully on e2b2586

Retested with current staging and current JCE release (2.5.16) confirmed fatal error
Applied patch and all good


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

avatar brianteeman brianteeman - change - 13 Apr 2016
Easy No Yes
avatar justinherrin justinherrin - test_item - 28 Apr 2016 - Tested unsuccessfully
avatar justinherrin
justinherrin - comment - 28 Apr 2016

I have tested this item :red_circle: unsuccessfully on e2b2586

I am receiving a Fatal Error when trying to save a new article.

Fatal error: Call to undefined method JApplicationAdministrator::getParams() in /Applications/MAMP/htdocs/j3_githubtesting/libraries/cms/form/rule/captcha.php on line 38

Steps I took...

  • Installed latest version of JCE (2.5.16)
  • Assigned JCE to be my accounts editor
  • Added your "Test Captcha" XML code to the article.xml file
  • Tried to create a new article, received Fatal Error
  • Applied your patch
  • Was able to open the new article edit page
  • Tried to save (or save & close) the new article, received Fatal Error listed above
    This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8657.
avatar joomla-cms-bot
joomla-cms-bot - comment - 30 Apr 2016

This PR has received new commits.

CC: @brianteeman, @justinherrin


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

avatar roland-d
roland-d - comment - 30 Apr 2016

@justinherrin That was a good test, I was able to check it and reproduce it. The latest change should solve the issue you found.

avatar justinherrin justinherrin - test_item - 30 Apr 2016 - Tested successfully
avatar justinherrin
justinherrin - comment - 30 Apr 2016

I have tested this item :white_check_mark: successfully on 324dde0

Much better now :smile:


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

avatar laoneo laoneo - test_item - 6 May 2016 - Tested successfully
avatar laoneo
laoneo - comment - 6 May 2016

I have tested this item :white_check_mark: successfully on 324dde0

Tested it without JCE. Just put the XML

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

inside the attribs fields, for example after line 610 in the article.xml file.


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

avatar brianteeman brianteeman - change - 6 May 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 6 May 2016

Rtc


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

avatar joomla-cms-bot joomla-cms-bot - change - 6 May 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 6 May 2016
Milestone Added:
avatar wilsonge
wilsonge - comment - 6 May 2016

Maintainers. Please hold on merging this until I talk to Roland about this tomorrow. Thanks

avatar joomla-cms-bot
joomla-cms-bot - comment - 7 May 2016

This PR has received new commits.

CC: @brianteeman, @justinherrin, @laoneo


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

avatar wilsonge
wilsonge - comment - 7 May 2016

Much better now! Thanks!

avatar Kubik-Rubik
Kubik-Rubik - comment - 8 May 2016

Thank you @roland-d!

avatar Kubik-Rubik Kubik-Rubik - change - 8 May 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-05-08 11:37:06
Closed_By Kubik-Rubik
avatar Kubik-Rubik Kubik-Rubik - close - 8 May 2016
avatar Kubik-Rubik Kubik-Rubik - merge - 8 May 2016
avatar joomla-cms-bot joomla-cms-bot - close - 8 May 2016
avatar joomla-cms-bot joomla-cms-bot - change - 8 May 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment