Bug #31350

Clicking Export button in list module causes a fatal error

Added by Uschi Renziehausen almost 10 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Must have
Category:
Backend User Interface
Target version:
Start date:
2011-10-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

#1

Updated by Francois Suter almost 10 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?

#2

Updated by Markus Klein almost 10 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??

#3

Updated by Francois Suter almost 10 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))

#4

Updated by Uschi Renziehausen almost 10 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

#5

Updated by Francois Suter almost 10 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.

#6

Updated by Francois Suter almost 10 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.

#7

Updated by Mr. Hudson almost 10 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

#8

Updated by Francois Suter almost 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#9

Updated by Riccardo De Contardi almost 4 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF