? Success
Pull Request for # 9253

User tests: Successful: Unsuccessful:

avatar flash1452
flash1452
2 Mar 2016

Pull Request for Issue #9253 .

Summary of Changes

$result redefined with a default value.

Testing Instructions

Enable all errors reporting in php.
Add "exit()" to the end of the onContentAfterSave() method (this is for watching the error)
In the front-end, add a menu item "propose an article".
In the front-end do log as an user which can add article.
When the article is submitted, the following error is displayed:
Notice: Undefined variable: result in /home/plambotte/Public/projets/web/joomla3dev/component-factory/plugins/content/joomla/joomla.php on line 93

After the changes the error are no longer seen.

avatar flash1452 flash1452 - open - 2 Mar 2016
avatar flash1452 flash1452 - change - 2 Mar 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Mar 2016
Labels Added: ?
avatar shubhamnba2009
shubhamnba2009 - comment - 2 Mar 2016

From where can i enable all errors in PHP and where can i find the method onContentAfterSave().
Thanks in advance for helping.

avatar flash1452
flash1452 - comment - 2 Mar 2016

onContentAfterSave() is a method in plugins/content/joomla/joomla.php file.

avatar brianteeman brianteeman - change - 2 Mar 2016
Rel_Number 0 9253
Relation Type Pull Request for
avatar flash1452
flash1452 - comment - 4 Mar 2016

@brianteeman Please test the PR.

avatar RonakParmar
RonakParmar - comment - 16 Mar 2016

Hi,

In testing instruction, mentioned that "In the front-end, add a menu item "propose an article"."
"propose an article" means I have to select "Create Article" of "Article" in menu item, correct?
If yes, then I have created a menu item and submitted an article, but without applying this patch, I got blank page, no notice or error.
I have configure Error Reporting to "Maximum".

Here is my system information:
Joomla! Version: Joomla! 3.4.8 Stable [ Ember ] 24-December-2015 19:30 GMT
Joomla! Platform Version: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
PHP Version: 5.4.45-3+deb.sury.org~precise+1


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

avatar brianteeman brianteeman - change - 13 Apr 2016
Category Plugins
avatar faynt0 faynt0 - test_item - 2 Aug 2016 - Tested successfully
avatar faynt0
faynt0 - comment - 2 Aug 2016

I have tested this item successfully on c177c67

Was able to reproduce the error of the undefinded variable.
Applied patch and error did not re-appear.

Tested for @icampus


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

avatar toxic2302 toxic2302 - test_item - 2 Aug 2016 - Tested successfully
avatar toxic2302
toxic2302 - comment - 2 Aug 2016

I have tested this item successfully on c177c67

I followed your test instructions and was able to reproduce the error. However "exit()" shows me a blank page so I've added a "var_dump()" before the exit. Now I can see this error.
After installing the patch everything is fine. I have also checked the php logs from my local server. ;)

@icampus


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

avatar brianteeman brianteeman - change - 2 Aug 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 2 Aug 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 2 Aug 2016
Category Plugins Plugins Front End
avatar joomla-cms-bot joomla-cms-bot - change - 2 Aug 2016
Labels Added: ?
avatar rdeutz
rdeutz - comment - 14 Aug 2016

Not sure because PHPCS should complain, do we need an empty line before foreach?

avatar mbabker
mbabker - comment - 14 Aug 2016

Yes. if/for/foreach/do/while should all have a blank line before them.

avatar zero-24
zero-24 - comment - 14 Aug 2016

@rdeutz please merge i can prepare a PR for fixing that.

avatar rdeutz rdeutz - change - 14 Aug 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-08-14 16:11:00
Closed_By rdeutz
avatar rdeutz rdeutz - close - 14 Aug 2016
avatar rdeutz rdeutz - merge - 14 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - close - 14 Aug 2016
avatar joomla-cms-bot joomla-cms-bot - change - 14 Aug 2016
Labels Removed: ?
avatar rdeutz
rdeutz - comment - 14 Aug 2016

done counting on @zero-24 to clean it up.

avatar zero-24
zero-24 - comment - 14 Aug 2016

Add a Comment

Login with GitHub to post a comment