View Issue Details

IDProjectCategoryView StatusLast Update
0010877mantisbtprintingpublic2012-02-28 05:07
ReporterBuga Assigned Todhx  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.0rc1 
Target Version1.2.1Fixed in Version1.2.1 
Summary0010877: Word Export causes Error Message
Description

When you want to print some issues to word you get an error message in word that some css files are missing. See the screenshot.
At least a word file is generated even with this error message

Steps To Reproduce
  1. View issues
  2. click on the print reports links
  3. click the word icon
  4. when you open the word file you get the attached error
Tagspatch
Attached Files
worderror.PNG (7,701 bytes)   
worderror.PNG (7,701 bytes)   

Relationships

has duplicate 0011017 closed Error Messages when generated .doc Report is opened 
has duplicate 0011496 closedatrol Viewing Issues in a Word Format missed with formatting 

Activities

atrol

atrol

2009-12-14 07:14

developer   ~0023906

duplicate of 0011017

lemonad

lemonad

2009-12-18 04:02

reporter   ~0023934

I've got a partial patch for this issue. Why it's only partial is because I can't reproduce all the error messages in the screen shot above.

If the user who posted the initial issue could get back with a list of plugins that are installed, I could likely fix that part too.

lemonad

lemonad

2009-12-21 05:24

reporter   ~0023937

The reason for the errors are that Word needs absolute paths to files. The C:... prefix in the screenshot is not coming from Mantis but from Word trying to resolve a relative path.

Here's a partial fix (it fixes the default.css problem). I could guesstimate a fix for the plugin_file.php error too but I'm hesitant since I can't reproduce and test it myself.

From 212e5267311fd387be521ab6f00235927880a57e Mon Sep 17 00:00:00 2001
From: Jonas Nockert jonasnockert@gmail.com
Date: Mon, 21 Dec 2009 11:17:46 +0100
Subject: [PATCH] Partial fix to 0010877.


core/html_api.php | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/html_api.php b/core/html_api.php
index 2aec873..f0bd26c 100644
--- a/core/html_api.php
+++ b/core/html_api.php
@@ -341,12 +341,12 @@ function html_title( $p_page_title = null ) {
*/
function html_css() {
$t_css_url = config_get( 'css_include_file' );

  • echo "\t", '<link rel="stylesheet" type="text/css" href="', helper_mantis_url( $t_css_url ), '" />', "\n";
  • echo "\t", '<link rel="stylesheet" type="text/css" href="', string_sanitize_url( helper_mantis_url( $t_css_url ), true ), '" />', "\n";

    Add right-to-left css if needed

    if( lang_get( 'directionality' ) == 'rtl' ) {
    $t_css_rtl_url = config_get( 'css_rtl_include_file' );

  • echo "\t", '<link rel="stylesheet" type="text/css" href="', helper_mantis_url( $t_css_rtl_url ), '" />', "\n";
  • echo "\t", '<link rel="stylesheet" type="text/css" href="', string_sanitize_url( helper_mantis_url( $t_css_rtl_url ), true ), '" />', "\n";
    }

    fix for NS 4.x css

    --
    1.6.5.3

lemonad

lemonad

2009-12-21 13:19

reporter   ~0023946

I should add that that the above patch fixes the problems we have with Word reports in our install of Mantis. We don't use any plugins that bring in additional style sheets.

squarebox

squarebox

2010-03-31 23:08

reporter   ~0024990

Last edited: 2010-03-31 23:21

Works for me in fixing like you said default.css

still run into the plugin.css file error like you mentioned, but at least it's more presentable then it was before. thanx

dhx

dhx

2010-03-31 23:32

reporter   ~0024991

Thanks for the patch and sorry for the delay in committing it. It's now fixed ready for the next release of MantisBT.

As for the SourceIntegration plugin CSS error I'll need to report it upstream.

Related Changesets

MantisBT: master-1.2.x d1d00c02

2009-12-21 05:17

lemonad

Committer: dhx


Details Diff
Fix 0010877: Word export results in missing CSS errors

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0010877
mod - core/html_api.php Diff File

MantisBT: master 9aff88b6

2009-12-21 05:17

lemonad

Committer: dhx


Details Diff
Fix 0010877: Word export results in missing CSS errors

Signed-off-by: David Hicks <hickseydr@optusnet.com.au>
Affected Issues
0010877
mod - core/html_api.php Diff File