? ? Pending

User tests: Successful: Unsuccessful:

avatar phproberto
phproberto
20 Apr 2018

Summary of Changes

Technically what joomla does to set an item as checked out is to set the checked_out column to 0. If you have a proper DB schema you probably have a foreign key that connects your checkout_out column to #__users table. But joomla does not allow to do this because 0 cannot be assigned because there is no user with id 0.

So:

  • the correct checked_out column values should be NULL or values > 0.
  • values checked by joomla are 0 or values > 0

For backward compatibility we cannot change current allowed values. This pull request changes publish checked out check to accept:

  • NULL
  • 0
  • values > 0

Which should be ok to keep current behaviour but not punishing those that want to use correct foreign keys. Keep compatibility allowing correct DB schemas to be used.

Testing Instructions

After applying this patch go to articles and publish/unpublish items. Do the same for any other management you want like banners, etc. Ensure that things work as expected.

Documentation Changes Required

No changes required.

avatar phproberto phproberto - open - 20 Apr 2018
avatar phproberto phproberto - change - 20 Apr 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Apr 2018
Category Libraries
avatar alikon
alikon - comment - 20 Apr 2018

still dreaming about proper FK adoption

avatar phproberto phproberto - change - 20 Apr 2018
Labels Added: ?
avatar phproberto
phproberto - comment - 20 Apr 2018

@alikon we still will have to fix a lot of things because, for instance, the process to free items checked out sets the value to 0. But I can live with not being able to use an external component.

Just a small step.

avatar alikon
alikon - comment - 20 Apr 2018

happy to see you back...
and yes we need fo fix a lot of this things... with your help too
YES WE CAN ?

avatar infograf768
infograf768 - comment - 21 Apr 2018

I have tested this item successfully on 3c06bdc

No problem here with core. Not tested with 3rd party.


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

avatar infograf768 infograf768 - test_item - 21 Apr 2018 - Tested successfully
avatar Quy
Quy - comment - 21 Apr 2018

I have tested this item successfully on 3c06bdc


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

avatar Quy Quy - test_item - 21 Apr 2018 - Tested successfully
avatar Quy Quy - change - 21 Apr 2018
The description was changed
Status Pending Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - edited - 21 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - edited - 21 Apr 2018
avatar Quy
Quy - comment - 21 Apr 2018

RTC


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

avatar phproberto
phproberto - comment - 21 Apr 2018

Thanks for testing and commenting here!

avatar mbabker mbabker - change - 22 Apr 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-04-22 15:35:19
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 22 Apr 2018
avatar mbabker mbabker - merge - 22 Apr 2018

Add a Comment

Login with GitHub to post a comment