Bug #31350
closedClicking Export button in list module causes a fatal error
100%
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.
Updated by Francois Suter about 13 years ago
- 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?
Updated by Markus Klein about 13 years ago
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??
Updated by Francois Suter about 13 years ago
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))
Updated by Uschi Renziehausen about 13 years ago
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
Updated by Francois Suter about 13 years ago
- 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.
Updated by Francois Suter about 13 years ago
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.
Updated by Mr. Hudson about 13 years ago
- 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
Updated by Francois Suter about 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ad18a7531813113c01bd1546395cb56f2b570dc7.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed