Bug #31350
closed
Clicking Export button in list module causes a fatal error
Added by Uschi Renziehausen about 13 years ago.
Updated about 7 years ago.
Category:
Backend User Interface
Description
If only a single table is shown in list module and you click on the export icon in the docheader you get the following fatal error:
#1: PHP Catchable Fatal Error: Argument 2 passed to t3lib_iconWorks::getSpriteIconForRecord() must be an array, null given, called in X:\t3web\t3core\typo3_src-4.6.0\typo3\sysext\impexp\app\index.php on line 823 and defined in E:\t3web\t3core\typo3_src-4.6.0\t3lib\class.t3lib_iconworks.php line 722.
- Status changed from New to Needs Feedback
Hi Uschi,
I couldn't reproduce the issue on a local test install. Maybe this is due to an extension. What type of record were you trying to export?
822: $rec = t3lib_BEfunc::getRecordWSOL('pages', $rParts[1]);
823: $tblList .= 'Table "' . $tName . '" from ' . t3lib_iconworks::getSpriteIconForRecord('pages', $rec) .
So getRecordWSOL() returns NULL.
Comment of getRecordWSOL() says: @return array Returns the row if found, otherwise nothing.
I wonder why it returns nothing. Is it a non-existing page??
This might well be. So I would say the fix is simply to wrap a test around $tblList so that it skips the record if nothing was returned by t3lib_BEfunc::getRecordWSOL(). I would go with:
if (isset($row) && is_array($row))
Hi Francois :-)
I tried to export be users located in the rootpage (id=0). This does neither work in the introduction package nor in my installation. Exporting data from other pages works fine.
Kind regards, Uschi
- Status changed from Needs Feedback to Accepted
- Assignee set to Francois Suter
- Target version set to 4.5.8
- TYPO3 Version changed from 4.6 to 4.5
Hi Uschi,
Thanks for the details, I could reproduce the issue. Actually it happens since the new skinning API was introduced, i.e. since TYPO3 4.4, but I guess we'll correct it only for 4.5 upwards.
Actually Markus' remark is still relevant as it could lead to the same error and the proposed fix should also apply to your problem. I should be able to come up with a patch quickly.
OK, it's a bit more complicated than I thought and actually different from Markus' scenario, because the root page requires special handling.
The export process is not the same when you start from the page tree or from the list view. Just excluding the page does not produce a good result, since the T3D file cannot be imported anymore.
More later. Have to go now.
- Status changed from Accepted to Under Review
Patch set 1 of change Ia5c46044f5040472846f3e7fb4adbf203e5e1e6a has been pushed to the review server.
It is available at http://review.typo3.org/6551
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF