Trying to check-out item that has no checked_out property.

The support for Joomla 2.5 ended on December 31, 2014. Possible bugs in Joomla 2.5 will not be patched anymore. This forum has been closed. Please update your website to Joomla 3.x

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Locked
hadevos
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Tue Jan 22, 2013 12:24 pm

Trying to check-out item that has no checked_out property.

Post by hadevos » Sat Feb 22, 2014 12:39 pm

I needed to catch an error in a component I am creating and therefore set my own php error handler. I was surprised how many (otherwise ignored) errors I got from the Joomla 2.5.18 core when I added the following code to my component:

Code: Select all

set_error_handler( function( $errno, $errstr, $errfile, $errline, array $errcontext ) {
  JError::raiseWarning( 0, "$errstr (no. $errno) in $errfile (line: $errline)" );
} );
I think it could be a good idea to set an error handler as above, when testing new Joomla releases...

One of the errors is about checking-out items. My component uses a database table without columns 'checked_out' and 'checked_out_time'. It gives me an error no. 8 when I choose 'Save' (= task 'apply', not 'Save & close') to store an item that is put into this table.

Cause: JControllerForm::save() calls $model->checkout() on line 749, without checking if the table has a property 'checked_out', like it is done on line 714.

Same case in JController::edit() on line 461.

Locked

Return to “Joomla! 2.5 Bug Reporting”