Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002721TestLinkReportspublic2009-07-13 16:042011-03-16 22:19
ReporterReaper 
Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
StatusfeedbackResolutionopen 
PlatformOSOS Version
Product Version1.8.3 
Fixed in Version 
Summary0002721: The different URL for images (UPLOADED ON FCKEDITOR) of Test Report with the format of HTML and MS Word
DescriptionLots of users have mentioned the problem of can not display the images of HTML or MS Word or both, and somebody gives some methods to try to solve it.

But today when I save the MS Word in the same dir of upload dir in Server and the images are visable in word(2003 and 2007), but I find out that the URL for images for images of HTML is different from MS Word: (assume the images upload URL is "lib/result/testlink_upload" and save the doc in the dir "lib/result")
    HTML is: http://Server_ip_address:port/lib/results/testlink_upload/$image_name [^]
    MS Word is:file:///C:\Program [^] Files\Apache Software Foundation\Apach2.2\htdocs\testlink\lib\result\testlink_upload\$image_name.

This will not be useful to see the images when save the MS Word in the computer of Client though the images are visable in HTML.

So anyboy can explain this and tell me how to settle it when using in Client.
TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Fileszip file icon fix-2721.zip [^] (20,382 bytes) 2010-10-15 14:11

- Relationships
duplicate of 0002647closedfman Testplan printout into MS-Word is without images. 

-  Notes
(0007532)
mhavlat (reporter)
2009-07-14 03:47

That's msword problem.
Check:
http://www.west-wind.com/Weblog/posts/356.aspx [^]
http://www.west-wind.com/WebLog/posts/1178.aspx [^]
http://www.csidata.com/custserv/onlinehelp/vbsdocs/vbs9.htm [^]

Can you try to add VBSCRIPT to end of generated document?
<SCRIPT LANGUAGE="VBScript">
<!--
   For Each oField In ActiveDocument.Fields
      If oField.Type = wdFieldIncludePicture Then
          oField.LinkFormat.SavePictureWithDocument = True
      End If
   Next
-->
</SCRIPT>

I'm not sure if msword can handle if vba script is added at the end of html (so images are already loaded) or can be used <body> trigger event onLoad().
The first case: edit lib/functions/print.inc.php:
function renderEof()
{
    return "\n</body>\n</html>";
}

Let me know your result. I'm linux users ... so I cannot test it.
(0011921)
mehrich (reporter)
2010-10-15 14:11

I don't think that this is a msword problem. The same problem is visible with OpenOffice Writer.

The main cause is the relative paths for images uploaded with fckeditor.

I have attached a fix.
With that fix the fields which can contain embedded images are modified before printing so that the relative paths are converted to absolute paths to the images.

As part of the solution I had to split the function get_home_url() in configCheck.php in 2 parts: get_home_url() and get_server_url() because for the absolute paths I need only the server url.

@developers: the attached fix contains already the decribed second fix in the issue 3804 (note 0011919) which also concerns images in reports.
(0013675)
tino (reporter)
2011-02-18 16:40

the attached fix is replacing src=" with src="http://www.example.com [^]
but if any image is stilt linked with the full domain path this fix cause:

src="http://www.example.comhttp://www.example.com/image.jpg [^]

You can prevent this by replacing src="/ with src="http://www.example.com/ [^] (slash at the end). You can find my "Quick & Dirty" (but working) Solution in the Forum: http://www.teamst.org/forum/viewtopic.php?f=11&t=3583#p11221 [^]

Regards Tino

- Issue History
Date Modified Username Field Change
2009-07-13 16:04 Reaper New Issue
2009-07-14 03:47 mhavlat Note Added: 0007532
2009-07-14 03:47 mhavlat Status new => feedback
2009-07-14 03:47 mhavlat Severity major => tweak
2009-07-14 03:52 mhavlat Relationship added duplicate of 0002647
2010-10-15 14:11 mehrich Note Added: 0011921
2010-10-15 14:11 mehrich File Added: fix-2721.zip
2010-11-06 14:44 fman Summary The different URL for images of Test Report with the format of HTML and MS Word => The different URL for images (UPLOADED ON FCKEDITOR) of Test Report with the format of HTML and MS Word
2011-02-18 16:40 tino Note Added: 0013675



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker