Fixed custom field menuitem warning#38457
Conversation
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
|
I have tested this item ✅ successfully on a066d43 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38457. |
|
For my education can you please explain the changes regarding use statements. Previously I was told that if its used only once in the file then it should be and not But you have changed this in the file |
|
I have tested this item ✅ successfully on a066d43 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38457. |
|
Sorry but this is not the correct fix. The custom field should work the same as the standard fields see https://docs.joomla.org/Menuitem_form_field_type As you can see I missed adding the published option and just used the default
Removing the ability to select an unpublished menu item severely limits the usability of this field ie you can not create links in advance of publishing the menu item |
|
I have tested this item 🔴 unsuccessfully on a066d43 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38457. |
For me you always add namespaces to the list of use statements, so you have a complete overview of the namespaces you include.
I am not aware of such rule nor do I understand why it should be that way. The only time you could use the full path is when you have a naming conflict but even then namespaces can be aliased. If it is a rule, then it should be reverted.
Fine, I am going to revert the custom field and we can apply proper fixes and get it ready for 4.3. |
|
There are over 50 instances of in fact almost all of those are for field plugins just like this one |
|
but if you want to change that and always use namespaces then that is fine by me but then dont you also need to remove |
|
The problem must be in the parent groupedlistfield and not here as if you are using the usergroup list field then the exact same testing instructions do not produce the error |
|
actually I misread part of this and you missed it in my comment I read it as this pr removed the ability to SELECT an unpublished menu item which is what I said was desired.
I see now that the check is only for the output of the link |
Pull Request for Issue #38244
Summary of Changes
This PR fixes a few issues with the menu item field:
Testing Instructions
List Of Menu Items (menuitem)Single Articleand select the new created articleAttempted to read property title on nullActual result BEFORE applying this Pull Request
A warning
Attempted to read property title on nullwhen menu item is not availableExpected result AFTER applying this Pull Request
No warning is displayed and no link is displayed
Documentation Changes Required
None