No Code Attached Yet
avatar IUSAB
IUSAB
14 Sep 2023

Steps to reproduce the issue

Table with zerofill for ID in database with versioning.
For example ID 0012 and 0202

Expected result

History is saved and fetched correctly.

Actual result

If editing entry with ID 0202:
History is saved in table _history with $typeAlias.202
Versioning does not work because it tries to fetch $typeAlias.0202 in backend.
So no history is shown and versioning is unable to be used.

Additional comments

If the solution is "stop using zerofill stupid" ? Then I would appreciate tips on how to force fetch :item_id without zerofill in custom component model file. Thanks!

avatar IUSAB IUSAB - open - 14 Sep 2023
avatar IUSAB IUSAB - change - 14 Sep 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 14 Sep 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Sep 2023
avatar JoomlaN00b
JoomlaN00b - comment - 14 Sep 2023

Solved it for my custom component by changing my models

public function getItem($pk = null)

and adding

$item->ID = intval($item->ID);


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

avatar alikon alikon - close - 14 Sep 2023
avatar alikon
alikon - comment - 14 Sep 2023

thanks for reporting

avatar alikon alikon - change - 14 Sep 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-09-14 15:21:13
Closed_By alikon

Add a Comment

Login with GitHub to post a comment