?
avatar ChrisDo84
ChrisDo84
2 Apr 2015

Steps to reproduce the issue

I'm writing a component and use the Build-In functions getForm() and loadFormData() to load data from the tables.
I'm using UUIDs as primaray keys for my tables to a void a guessing of IDs stored in the database. Unfortunately Joomla is expecting that IDs are always numeric:

I had to change a line in the file
/libraries/legacy/model/admin.php Line 858
if ($pk > 0)

should be
if (!is_null($pk))

Please confirm and change in the next version.
The behavior seems to be the same.

Expected result

Allow alpha-numeric primary keys

Actual result

System information (as much as possible)

Additional comments

avatar ChrisDo84 ChrisDo84 - open - 2 Apr 2015
avatar ChrisDo84 ChrisDo84 - change - 2 Apr 2015
Labels Removed: ?
avatar bertmert
bertmert - comment - 3 Apr 2015
!is_null($pk)

is always true because of line 855

$pk = (!empty($pk)) ? $pk : (int) $this->getState($this->getName() . '.id');

Why don't you use your own method getItem in your component model? You can override the parent method there.

avatar zero-24 zero-24 - change - 3 Apr 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 3 Apr 2015
Status New Information Required
avatar ChrisDo84
ChrisDo84 - comment - 3 Apr 2015

Okay,
I didn't thought about it :-)
This could be a solution, too.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6637.
avatar brianteeman brianteeman - change - 23 Apr 2015
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2015-04-23 00:19:04
Closed_By brianteeman
Labels Removed: ?
avatar brianteeman brianteeman - close - 23 Apr 2015

Add a Comment

Login with GitHub to post a comment