This question about Topic Markup Language and applications: Task filed

TWiki does not Display images after converting a Word Document

TWiki version: TWiki-4.2.4, Sat, 06 Dec 2008, build 17773
MsOfficeAttachmentsAsHTMLPlugin Version: 2334
OS: Suse Linux 11.0

I have got a Word Document wich contains a JPG at the bottom of the Document.
I have created a Topic called Example.
Before attaching the file i have set * Set REPLACE_WITH_ATTACHMENT = 1
After attaching the Word Document to the Topic, the Plugin converts the Document and creates the files Test.doc, Test.doc,v, Test.html and Test.jpg

Now the only thing that i can see int the Topic is the Text that was in the Word Document but not the Image.
I already know where the Problem is, but i don't know how to fix it.
If i have a Look at the HTML Sorcecode of the Topic "Example" i can see that the Source of the JPG file is not the right one.

This is how it looks like:
<img width="325" height="183" alt="0x01 graphic" src="http://xxx.xxx.xxx.xxx/twiki//Test0.jpg"><br> 
but the right path to the Image would be:
<img width="325" height="183" alt="0x01 graphic" src="http://xxx.xxx.xxx.xxx/twiki/pub/Main/Example/Test0.jpg"><br> 

Note:

If i open the Test.html using a Browser and the direct Path the Image is displayed correctly.
http://xxx.xxx.xxx.xxx/twiki/pub/Main/Example/Test.html

Thanks for your help in advance !
That sounds like something is rewriting the HTML before it is displayed. It is unrelated to the MsOfficeAttachmentsAsHTMLPlugin. Perhaps you have another plugin installed that is doing the rewriting?

-- CrawfordCurrie - 15 Feb 2009


I've made a new clean installation of the TWiki inculding the MsOfficeAttachmentsAsHTMLPlugin on a different Server, but the results are the same.

The Plugin creates the html file with realtiv Paths to the JPG files, i think this is the Problem.
Here is an Example:
<img width="825" height="1858" alt="0x01 graphic" src="HalloWeltmitBild0.jpg"><br>

The Plugin creates an Include in my Topic looking like this:
%INCLUDE{%ATTACHURL%/Test.html}%

If i replace the variable %ATTACHMENT% with the absolut Path to the html file manually, the JPG is displayed correctly

%INCLUDE{http://192.168.200.201/twiki2/pub/Main/Example/Test.html}%

-- LuisFuncheira - 15 Feb 2009

Solved in IRC with a %PUBURL%/%INCLUDINGWEB%/%INCLUDINGTOPIC%/... as the include parameter.

-- OliverKrueger - 15 Feb 2009

Sorry, i was wrong! Replacing %ATTACHURL% with %PUBURL%/%INCLUDINGWEB%/%INCLUDINGTOPIC% in the Include does not solve the Problem. A Possible Solution: Setting absolut Paths in the HTML Source to the JPG files while converting. (Not sure if it is possible) But if the Topic for some reason would be moved, the Paths to the JPG files wouldn't be right anymore... So this solution isn't that nice.

I'am still looking for a good solution. Perhaps someone has got an idea?

-- LuisFuncheira - 15 Feb 2009

The problem is in the MsOfficeAttachmentsAsHTMLPlugin, which doesn't have any support for rewriting URLs.

See Tasks.Item8123, where this is followed up.

-- CrawfordCurrie - 20 Apr 2009

QuestionForm edit

Subject Topic Markup Language and applications
Extension MsOfficeAttachmentsAsHTMLPlugin
Version TWikiRelease04x02x03
Status Task filed
Topic revision: r7 - 20 Apr 2009, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy