? ? Maintainers Checked Pending

User tests: Successful: Unsuccessful:

avatar HLeithner
HLeithner
24 Oct 2022

Joomla allows to use diffrent primary key names for tables. This has not be honored in the FormView::initializeView() function.

Summary of Changes

Load the primary key name from the table provided by the model and use it for the toolbar.

Testing Instructions

Check if existing edit views makes errors.
if you have a component with a diffrent primary key then 'id' test it.
Most of my components have not id as primary key and they work now^^

Actual result BEFORE applying this Pull Request

No error for existing View
Doesn't work with the new FormView with primary key different then id
Warning: Undefined property: Joomla\CMS\Object\CMSObject::$id in ROOT/libraries/src/MVC/View/FormView.php on line 147

Warning: Undefined property: Joomla\CMS\Object\CMSObject::$id in ROOT/libraries/src/MVC/View/FormView.php on line 167

Expected result AFTER applying this Pull Request

Everything works as before
No Warnings and working title and edit button for Views with diffrent primary key column name then id

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar HLeithner HLeithner - open - 24 Oct 2022
avatar HLeithner HLeithner - change - 24 Oct 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Oct 2022
Category Libraries
avatar alikon alikon - test_item - 26 Nov 2022 - Tested successfully
avatar alikon
alikon - comment - 26 Nov 2022

I have tested this item successfully on da54b0b


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

avatar viocassel viocassel - test_item - 27 Nov 2022 - Tested successfully
avatar viocassel
viocassel - comment - 27 Nov 2022

I have tested this item successfully on da54b0b


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

avatar richard67 richard67 - change - 27 Nov 2022
Status Pending Ready to Commit
Labels Added: ? Maintainers Checked
avatar richard67
richard67 - comment - 27 Nov 2022

RTC


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

avatar wilsonge wilsonge - close - 27 Nov 2022
avatar wilsonge wilsonge - merge - 27 Nov 2022
avatar wilsonge wilsonge - change - 27 Nov 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-11-27 22:58:11
Closed_By wilsonge
Labels Added: ?
avatar wilsonge
wilsonge - comment - 27 Nov 2022

Thanks!

Add a Comment

Login with GitHub to post a comment