XWiki.org JIRA

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
XWiki Platform
  • XWiki Platform
  • XWIKI-6678

Office viewer issues

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 3.0
  • Fix Version/s: 3.1, 3.0.1
  • Component/s: Office
  • Labels:
    None
  • Tests:
    Unit
  • Difficulty:
    Unknown
  • Similar issues:
    XWIKI-7656Office Viewer plugin does not work with spaces in the attachments filename
    XWIKI-8851Add the ability to do a fake office import using the office viewer
    XWIKI-5967Pictures from Office Viewer macro displaying a presentation not in exported PDF
    XWIKI-5897Office Viewer Macro fails for ppt files on pages with dashes
    XWIKI-1290Improve RTF output in Open Office & MS Word
    XWIKI-8764Add a FAQ link when adding an office document
    XWIKI-8093LibreOffice 3.5 not supported by Office Importer
    XWIKI-8241Small UI isue on Office Importer page
    XWIKI-5785Office Preview of Powerpoints should allow to switch slides using buttons
    XWIKI-3288Office Import ("File" tab) doesn't work in IE6

Description

Office viewer macro display issue.
Trying to view a powerpoint presentation:

{{office attachment="haaswin.ppt" filterStyles="false"/}}

Gives a black box with arrows and a spinner as if it is loading but nothing ever shows. The ppt is small, about 300k and 9 pages.

Also, xls files are rendered but the top links for each sheet shows question marks next to them as the links are broken.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Microsoft Excel
    Book1.xls
    08/Jun/11 17:09
    14 kB
    daniel j

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. XRENDERING-117 Fragment links with no markers are badly converted to wiki syntax

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct and has been pushed to production. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
  • Commits
Hide
Permalink
Marius Dumitru Florea added a comment - 04/Jun/11 09:41

Hi Daniel, is there any exception logged on the server when you view the page with the:

{{office attachment="haaswin.ppt" filterStyles="false"/}}

What happens when you import the haaswin.ppt file using the "Add > Page from Office" menu? If you open the haaswin.ppt file with Open/LibreOffice does "File > Preview in web browser" work?

Regarding the xsl files, what kind of links do you have at the top? Are they absolute or relative URLs? Can you give an example?

Can you attach to this issue a sample ppt and xls file that I can use to reproduce the issue locally?

Show
Marius Dumitru Florea added a comment - 04/Jun/11 09:41 Hi Daniel, is there any exception logged on the server when you view the page with the: {{office attachment="haaswin.ppt" filterStyles="false"/}} What happens when you import the haaswin.ppt file using the "Add > Page from Office" menu? If you open the haaswin.ppt file with Open/LibreOffice does "File > Preview in web browser" work? Regarding the xsl files, what kind of links do you have at the top? Are they absolute or relative URLs? Can you give an example? Can you attach to this issue a sample ppt and xls file that I can use to reproduce the issue locally?
Hide
Permalink
daniel j added a comment - 06/Jun/11 17:54

I can't see any exceptions or anything in the log.

I can open the document fine on the server with open office (3.1.1). If I import the ppt it gives me a new page with the same black view with a spinner. There's also 11 jpgs attached with 0 size that show nothing.

Excel sheet broken link example
http://haaseesoft:8081/xwiki/bin/create/Machine+Knowledge/%23table0?parent=Machine+Knowledge.CNC+IO+map

Show
daniel j added a comment - 06/Jun/11 17:54 I can't see any exceptions or anything in the log. I can open the document fine on the server with open office (3.1.1). If I import the ppt it gives me a new page with the same black view with a spinner. There's also 11 jpgs attached with 0 size that show nothing. Excel sheet broken link example http://haaseesoft:8081/xwiki/bin/create/Machine+Knowledge/%23table0?parent=Machine+Knowledge.CNC+IO+map
Hide
Permalink
Marius Dumitru Florea added a comment - 06/Jun/11 21:59

So does "File > Preview in web browser" menu work when you open your ppt file in OpenOffice? The fact that slide images generated by OpenOffice have 0 size clearly indicates that something wrong happens during the import. In order to find if the problem is on our side or on OpenOffice side I would need a sample ppt file that reproduces the problem. Do you have this problem with any ppt file?

Regarding the excel sheet,

http://haaseesoft:8081/xwiki/bin/create/Machine+Knowledge/%23table0?parent=Machine+Knowledge.CNC+IO+map

is the URL you see in the wiki syntax after you import the xls file, right? What is the URL in the excel file?

Show
Marius Dumitru Florea added a comment - 06/Jun/11 21:59 So does "File > Preview in web browser" menu work when you open your ppt file in OpenOffice? The fact that slide images generated by OpenOffice have 0 size clearly indicates that something wrong happens during the import. In order to find if the problem is on our side or on OpenOffice side I would need a sample ppt file that reproduces the problem. Do you have this problem with any ppt file? Regarding the excel sheet, http://haaseesoft:8081/xwiki/bin/create/Machine+Knowledge/%23table0?parent=Machine+Knowledge.CNC+IO+map is the URL you see in the wiki syntax after you import the xls file, right? What is the URL in the excel file?
Hide
Permalink
daniel j added a comment - 06/Jun/11 22:46

I have tried several ppt files, they all do the same thing. The web preview seems to be working.

The links are autogenerated,they don't exist in the excel sheet. The seem to be shortcuts down to the generated sheets, sort of like a TOC.

Show
daniel j added a comment - 06/Jun/11 22:46 I have tried several ppt files, they all do the same thing. The web preview seems to be working. The links are autogenerated,they don't exist in the excel sheet. The seem to be shortcuts down to the generated sheets, sort of like a TOC.
Hide
Permalink
Marius Dumitru Florea added a comment - 07/Jun/11 08:00

Please follow this steps:

  1. Create a new page with this content:
    {{groovy}}
    import java.io.InputStream;
    import java.util.Map;
    import java.util.Collections;
    
    import org.apache.commons.lang.StringUtils;
    import org.xwiki.officeimporter.openoffice.OpenOfficeManager;
    
    import com.xpn.xwiki.web.Utils;
    
    if (request.convert) {
      String officeFileName = request.getParameter("attachment");
      InputStream officeFileStream = doc.getAttachment(officeFileName).getAttachment().getContentInputStream(xcontext.getContext());
      Map<String, InputStream> inputStreams = Collections.singletonMap(officeFileName, officeFileStream);
      String outputFileName = StringUtils.substringBeforeLast(officeFileName, ".") + ".html";
      Map<String, byte[]> artifacts = Utils.getComponent(OpenOfficeManager.class).getConverter().convert(inputStreams, officeFileName, outputFileName);
      print "= Artifact / Size =\n\n";
      for(Map.Entry<String, byte[]> entry : artifacts) {
        print "* " + entry.getKey() + " : " + entry.getValue().length + "\n";
      }
    } else {
      print "Add convert=1&attachment=your.ppt to the query string to trigger the conversion";
    }
    {{/groovy}}
    
  2. Attach your ppt file to this new page
  3. Add convert=1&attachment=your.ppt to the query string of the view URL. E.g.:
    http://<server>/xwiki/bin/view/Spage/Page?convert=1&attachment=test.ppt
    

Do all *.jpg artifacts have 0 size? Can you try with a newer version of OpenOffice?

Show
Marius Dumitru Florea added a comment - 07/Jun/11 08:00 Please follow this steps: Create a new page with this content: {{groovy}} import java.io.InputStream; import java.util.Map; import java.util.Collections; import org.apache.commons.lang.StringUtils; import org.xwiki.officeimporter.openoffice.OpenOfficeManager; import com.xpn.xwiki.web.Utils; if (request.convert) { String officeFileName = request.getParameter("attachment"); InputStream officeFileStream = doc.getAttachment(officeFileName).getAttachment().getContentInputStream(xcontext.getContext()); Map<String, InputStream> inputStreams = Collections.singletonMap(officeFileName, officeFileStream); String outputFileName = StringUtils.substringBeforeLast(officeFileName, ".") + ".html"; Map<String, byte[]> artifacts = Utils.getComponent(OpenOfficeManager.class).getConverter().convert(inputStreams, officeFileName, outputFileName); print "= Artifact / Size =\n\n"; for(Map.Entry<String, byte[]> entry : artifacts) { print "* " + entry.getKey() + " : " + entry.getValue().length + "\n"; } } else { print "Add convert=1&attachment=your.ppt to the query string to trigger the conversion"; } {{/groovy}} Attach your ppt file to this new page Add convert=1&attachment=your.ppt to the query string of the view URL. E.g.: http://<server>/xwiki/bin/view/Spage/Page?convert=1&attachment=test.ppt Do all *.jpg artifacts have 0 size? Can you try with a newer version of OpenOffice?
Hide
Permalink
daniel j added a comment - 07/Jun/11 20:06

Ok, the script showed 0 for all jpgs. I then upgraded to the latest Open office and it showed a non zero size.
But all inline ppts were still not working. But if I deleted the attached ppt an uploaded it again it started working, I assume that was a caching issue and the main issue were old oo version. Thanks for the help.

Show
daniel j added a comment - 07/Jun/11 20:06 Ok, the script showed 0 for all jpgs. I then upgraded to the latest Open office and it showed a non zero size. But all inline ppts were still not working. But if I deleted the attached ppt an uploaded it again it started working, I assume that was a caching issue and the main issue were old oo version. Thanks for the help.
Hide
Permalink
daniel j added a comment - 07/Jun/11 20:15

Now that it is working I noticed that the inline viewer is skipping the last slide of all the ppts. The test page you provided seems to be creating 30 jpgs (0-29) but the viewer only shows 29.

Show
daniel j added a comment - 07/Jun/11 20:15 Now that it is working I noticed that the inline viewer is skipping the last slide of all the ppts. The test page you provided seems to be creating 30 jpgs (0-29) but the viewer only shows 29.
Hide
Permalink
Marius Dumitru Florea added a comment - 08/Jun/11 14:52

Thanks Daniel for catching this. I'm surprised no one else noticed it before.. I'm going to fix it for 3.1 final and 3.0.1. What about the excel issue, do you still have it after the Office upgrade?

Show
Marius Dumitru Florea added a comment - 08/Jun/11 14:52 Thanks Daniel for catching this. I'm surprised no one else noticed it before.. I'm going to fix it for 3.1 final and 3.0.1. What about the excel issue, do you still have it after the Office upgrade?
Hide
Permalink
daniel j added a comment - 08/Jun/11 17:09

Broken links with multiple sheets

Show
daniel j added a comment - 08/Jun/11 17:09 Broken links with multiple sheets
Hide
Permalink
daniel j added a comment - 08/Jun/11 17:10

That is still there after the upgrade. I attached a minimal example which duplicates the issue on my setup.

Show
daniel j added a comment - 08/Jun/11 17:10 That is still there after the upgrade. I attached a minimal example which duplicates the issue on my setup.
Hide
Permalink
Marius Dumitru Florea added a comment - 08/Jun/11 18:50

Thanks Daniel. The attached excel file helped me spot XRENDERING-117. I'll close this issue. You can follow XRENDERING-117 for the excel import fix.

Show
Marius Dumitru Florea added a comment - 08/Jun/11 18:50 Thanks Daniel. The attached excel file helped me spot XRENDERING-117 . I'll close this issue. You can follow XRENDERING-117 for the excel import fix.

People

  • Assignee:
    Marius Dumitru Florea
    Reporter:
    daniel j
Vote (0)
Watch (0)

Dates

  • Created:
    03/Jun/11 23:39
    Updated:
    08/Jun/11 18:51
    Resolved:
    08/Jun/11 18:51
    Date of First Response:
    04/Jun/11 9:41 AM
  • Atlassian JIRA (v5.2.6#849-sha1:560c048)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for XWiki. Try JIRA - bug tracking software for your team.