Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0010783mantisbttoolspublic2010-02-22 14:34
Reporterchermucsnis Assigned Todhx  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
PlatformWindowsOS2003 ServerOS VersionSP3
Product Versiongit trunk 
Target Version1.2.0 
Summary0010783: Excel export not working
Description

When clicking in the Excel Export link in the View Issues page, the web server returns a 404 - Page not Found error.

However, in the Apache error log file, we can see the real cause:

[Wed Jul 29 13:42:37 2009] [error] [client 192.XXX.XXX.X] PHP Fatal error: Cannot use object of type BugData as array in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\mantis\excel_xml_export.php on line 97, referer: http://XXXXXX.XXXXXX.XX.XX/mantis/view_all_bug_page.php

Steps To Reproduce

Just try to execute the Excel Export from the View Issues page.

Tagspatch

Relationships

duplicate of 0010615 closedrombert API Failure 
has duplicate 0011016 closedvboctor Excel Export broken 
has duplicate 0012068 closed Roadmap and inherited versions of a project 

Activities

hjshih

hjshih

2009-07-30 22:02

reporter   ~0022624

I also meet the same problem. I installed 1.2.0rc1 version on Windows XP.
Any configuration or patch needs to update?

tobar

tobar

2009-07-30 22:48

reporter   ~0022625

change line 97 to:

echo $t_function( $t_row->$t_column );

hjshih

hjshih

2009-07-31 00:05

reporter   ~0022626

It works! Thanks to tobar.

chermucsnis

chermucsnis

2009-07-31 10:23

reporter   ~0022636

Yes, I also confirm that this change solves the problem.

Thanks a lot tobar!

geostsi

geostsi

2009-08-25 09:46

reporter   ~0022811

Last edited: 2009-08-25 09:51

After change the line 97 to

-> echo $t_function( $t_row->$t_column );

I have another error on line 94

-> Fatal error: Cannot use object of type BugData as array in C:\Inetpub\MANTIS\excel_xml_export.php on line 94

When i do not Change the line 97 (hold: echo $t_function( $t_row[$t_column] );) Excel opens but with an error > with log entry

XML-PARSEFEHLER: Fehlender Ende-Tag
Der Fehler tritt bei oder nach diesem Element-Stack auf:
<ss:Workbook>
<ss:Worksheet>
<ss:Table>
<ss:Row>

I also having this when I export an Issue from this Bugtracker..

xyz123

xyz123

2009-11-04 01:16

reporter   ~0023562

Many thanks tobar, changing line 97 worked perfectly for me. Now I have Excel export for Mantis.

geostsi, I wonder if your problem is buffer overflow due to too many rows to export - which causes the php script to abort somewhere. I encounter this problem with csv export. I don't know why but I can't do more than 2000 rows. I know that php aborts at the end of function filter_get_bug_rows (core/filter_api.php), somewhere in the for loop between lines 1953-1957.

I have now to apply a limit on number of bug rows for csv export (although I don't have this problem with Excel).

geostsi

geostsi

2009-11-04 02:28

reporter   ~0023564

Its always the same problem when i export only 5 rows.
For the moment i ignore the excel export and use the csv export.

vboctor

vboctor

2009-11-04 22:50

manager   ~0023578

@geostsi, the export is working fine for me on my dev instance and on this bug tracker. Which MantisBT version are you using? You might want to get the latest version of this file from git repository at:

http://git.mantisbt.org/?p=mantisbt.git;a=blob_plain;f=excel_xml_export.php;hb=master-1.2.x

dhx

dhx

2009-11-05 02:37

reporter   ~0023583

Thanks for reporting. This was fixed by Robert a short while ago in 0010615. Please check out the latest version of the 1.2.x branch to get this patch (or it'll be in the next release).

If you want to backport Robert's fix, this is it here:
http://git.mantisbt.org/?p=mantisbt.git;a=commit;h=2d5e01443e2715096f2eed41b6bbca3da60d2487

This ticket is now marked as a duplicate of 0010615