User tests: Successful: Unsuccessful:
When ajax ordering Plugins, Modules, Content languages, we get a Notice in the php logs.
[03-Apr-2014 08:42:58 UTC] PHP Notice: Trying to get property of non-object in ROOT/libraries/legacy/model/admin.php on line 1143
It does not prevent the ordering from working fine.
This looks like coming from the fact that these tables are not concerned by content_types and therefore can't have a value for $type->type_alias
Here is a patch
As the only place typeAlias is being used is in the tags area https://github.com/infograf768/joomla-cms/blob/orderingnotice/libraries/legacy/model/admin.php#L1178 So rather than setting a $typeAlias for all scenario's - surely it would be better to move this if statement to cover the createTagsHelper function
In fact the issue is indeed also for each batch functions, each time for createTagsHelper, $tagsobserver, etc.
Please wait for testing. Thomas is working on a global pr for all these issues.
@infograf768 second PR done against your branch,
if (!this->batchSet)
to if (empty($this->batchSet))
so we don't get any notice if the property isn't setcreateTagsHelper
into a conditional which checks for !empty($this->type)
That looks much better :)
Before I merge, need to know if we keep static.
See infograf768#9
Looks OK now, need testers and comments on joomlacode. Thanks
test: The notice from the PHP error log is gone after applying the fix. Ordering still works as expected.
test. notice in my php error log stops appearing on reordering in module manager. But ordering still works. Code also looks good :)
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-04-08 13:43:52 |
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33555&start=0