? ? Success
Duplicate of # 13500

User tests: Successful: Unsuccessful:

avatar Harmageddon
Harmageddon
20 May 2017

Original report by user ernebenan on joomla-bugs.de: http://www.joomla-bugs.de/forum/index.php/topic,734.0.html

Summary of Changes

The JModelAdmin::canEditState method requires one non-optional argument $record. As the parent method does not use the argument, it could be omitted, but PHP (at least starting from 7.0) throws a warning:

Warning: Missing argument 1 for JModelAdmin::canEditState(), called in /administrator/components/com_content/models/article.php on line 211 and defined in/libraries/legacy/model/admin.php on line 680

(PHP 7.0)

respectively an exception

Too few arguments to function JModelAdmin::canEditState(), 0 passed in /administrator/components/com_content/models/article.php on line 211 and exactly 1 expected

(PHP 7.1)

Testing Instructions

  • Requirements:
    • PHP 7.1 (to get the exception)
    • Backend template: Hathor (because Isis processes the ordering request via AJAX, so you won't see the error)
  • Navigate to "Content - Featured Articles".
  • Order by "Ordering".
  • Try to change the ordering of the articles, e.g. moving one up or down.

Expected result

  • Re-ordering should work without any errors.

Actual result

  • On PHP 7.1, the action fails with the previously mentioned exception.

Solution

  • Apply this patch and test again.
avatar Harmageddon Harmageddon - open - 20 May 2017
avatar Harmageddon Harmageddon - change - 20 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 May 2017
Category Administration com_content
avatar Quy
Quy - comment - 20 May 2017

Duplicate #13500. Please test and mark your result here:
https://issues.joomla.org/tracker/joomla-cms/13500

avatar franz-wohlkoenig franz-wohlkoenig - change - 20 May 2017
Status Pending Duplicate Report
Closed_Date 0000-00-00 00:00:00 2017-05-20 15:47:13
Closed_By franz-wohlkoenig
Rel_Number 13500
Relation Type Duplicate of
avatar joomla-cms-bot joomla-cms-bot - close - 20 May 2017
avatar joomla-cms-bot joomla-cms-bot - close - 20 May 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 20 May 2017

closed as Duplicate Report #13500


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

avatar joomla-cms-bot
joomla-cms-bot - comment - 20 May 2017
avatar Harmageddon
Harmageddon - comment - 22 May 2017

If #13500 is merged before this one here, I'd agree to close this one. However, as #13500 is a bit more complex and thus might break something else, I'd like to re-open this PR here, because it fixes a bug existing in 3.7.1 and current staging.
Users with PHP 7.1 and Joomla! 3.7.0/1/upcoming 2 can't manually change the order of articles anymore. #13500 might require some more testing and in the case, that will hopefully not be happening, that it breaks something and needs to be reverted, the bug mentioned here would be re-introduced. I'd prefer to keep PRs fixing bugs separate from those improving code with no intended effect.

avatar rdeutz rdeutz - change - 22 May 2017
Status Duplicate Report New
Closed_Date 2017-05-20 15:47:13
Closed_By franz-wohlkoenig
Labels Added: ?
avatar rdeutz rdeutz - change - 22 May 2017
Status New Pending
avatar rdeutz rdeutz - reopen - 22 May 2017
avatar rdeutz rdeutz - reopen - 22 May 2017
avatar rdeutz
rdeutz - comment - 22 May 2017

reopened on request of @Harmageddon

avatar gwsdesk
gwsdesk - comment - 23 May 2017

Please see this post on the Joomla 3.7.0 FAQ related to the Hathor template https://docs.joomla.org/J3.x:Hathor_admin_template_has_not_been_updated_to_work_with_the_new_features

avatar brianteeman
brianteeman - comment - 23 May 2017

@gwsdesk using hathor in this case is just as a quick demo of the problem

avatar gwsdesk
gwsdesk - comment - 23 May 2017

@brianteeman understood but in 3.7.2 we have no more Hathor to select from ;-)

avatar brianteeman
brianteeman - comment - 23 May 2017

@gwsdesk i guess you are using a different version of joomla to me than - hathor has not been removed

avatar gwsdesk
gwsdesk - comment - 23 May 2017

@brianteeman I was looking at the wrong open tab sorry for that. I can test this and post back

avatar sandstorm871 sandstorm871 - test_item - 23 Jun 2017 - Tested successfully
avatar sandstorm871
sandstorm871 - comment - 23 Jun 2017

I have tested this item successfully on 5365b3b

Not sure who uses Hathor, but I tested this successfully ;)

Without applied patch, I see an "0 - An Error Has Occured"
After Patch, ordering works as expected

@pete-rossetti - Wanna do the 2nd test


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 23 Jun 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 23 Jun 2017

I have tested this item successfully on 5365b3b


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Jun 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 23 Jun 2017

RTC after two successful tests.

avatar zero-24 zero-24 - change - 23 Jun 2017
Milestone Added:
avatar rdeutz rdeutz - change - 5 Jul 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-07-05 15:57:56
Closed_By rdeutz
avatar rdeutz rdeutz - close - 5 Jul 2017
avatar rdeutz rdeutz - merge - 5 Jul 2017

Add a Comment

Login with GitHub to post a comment