Bug #31350

Clicking Export button in list module causes a fatal error

Added by Uschi Renziehausen about 8 years ago. Updated about 2 years ago.

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

100%

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.

Associated revisions

Revision ad18a753 (diff)
Added by Francois Suter about 8 years ago

[BUGFIX] Fatal error when exporting from root

An uncaught exception happens when trying to export records from a
singe table view in List mode on the page tree root. This is due to
the tree root being handled as a normal page record.

With this patch the tree root is handled as it should. Some cleanup
(CGL) is also applied.

Change-Id: Ia5c46044f5040472846f3e7fb4adbf203e5e1e6a
Fixes: #31350
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/6551
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Georg Ringer
Reviewed-by: Steffen Ritter
Reviewed-by: Francois Suter
Tested-by: Francois Suter

Revision 08e70e79 (diff)
Added by Francois Suter almost 8 years ago

[BUGFIX] Fatal error when exporting from root

An uncaught exception happens when trying to export records from a
singe table view in List mode on the page tree root. This is due to
the tree root being handled as a normal page record.

With this patch the tree root is handled as it should. Some cleanup
(CGL) is also applied.

Change-Id: I39fb872dd87d4f758695bbcb1607028506227fc6
Fixes: #31350
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/6791
Reviewed-by: Oliver Hader
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer

Revision 5bccb231 (diff)
Added by Francois Suter almost 8 years ago

[BUGFIX] Fatal error when exporting from root

An uncaught exception happens when trying to export records from a
singe table view in List mode on the page tree root. This is due to
the tree root being handled as a normal page record.

With this patch the tree root is handled as it should. Some cleanup
(CGL) is also applied.

Change-Id: I87b60cb098a2e8b9dcb407be6f69bd31ea2ddd9e
Fixes: #31350
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/6793
Reviewed-by: Oliver Hader
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer

History

#1 Updated by Francois Suter about 8 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 about 8 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 about 8 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 about 8 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 about 8 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 about 8 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 about 8 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 about 8 years ago

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

#9 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF