Bug 643833

Summary: okular fails to load XPS files
Product: [Fedora] Fedora Reporter: Ron Petrick <rpetrick>
Component: kdegraphicsAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: jreznik, kevin, ltinkl, rdieter, rnovacek, ry, smparrish, than, thomasj
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kdegraphics-4.5.2-4.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-04 23:34:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Sample xps file none

Description Ron Petrick 2010-10-18 09:15:37 UTC
Description of problem:

Okular fails to load XPS files in Fedora 14 with the error:

okular(2727)/okular (app) Okular::Document::openDocument: No plugin for mimetype '"application/zip"'.

The same files view without problem in Fedora 13.

Version-Release number of selected component (if applicable):

4.5.2-2.fc14

How reproducible:

Every time.

Additional info:

I have the latest version of kdegraphics installed from kde-testing in both F13 (4.5.2-0.2.fc13) and F14 (4.5.2-2.fc14).

Comment 1 Rex Dieter 2010-10-18 17:00:52 UTC
can you provide a sample test-case?

Comment 2 Ron Petrick 2010-10-19 12:53:15 UTC
Created attachment 454341 [details]
Sample xps file

Attached a sample xps document which is viewable in okular under F13 but not F14.

Comment 3 Rex Dieter 2010-10-19 15:32:41 UTC
confirmed, f13 fine, f14 not, as reported. :(

Comment 4 Rex Dieter 2010-10-19 16:17:41 UTC
Seems to be something changed in shared-mime-info that induces that failure.

The diff between f13's and f14's shared-mime-info wrt xps mimetype:

--- smi071      2010-10-19 11:16:44.560797126 -0500
+++ smi080   2010-10-19 11:18:09.716797135 -0500
@@ -1,8 +1,10 @@
-  <mime-type type="application/vnd.ms-xpsdocument">
+  <mime-type type="application/oxps">
     <comment>XPS document</comment>
     <acronym>XPS</acronym>
-    <expanded-acronym>XML Paper Specification</expanded-acronym>
+    <expanded-acronym>Open XML Paper Specification</expanded-acronym>
     <sub-class-of type="application/zip"/>
     <generic-icon name="x-office-document"/>
+    <glob pattern="*.oxps"/>
     <glob pattern="*.xps"/>
+    <alias type="application/vnd.ms-xpsdocument"/>
   </mime-type>


Reverting to f13's mimetype definition makes it work again.  Still investigating.

Comment 5 Rex Dieter 2010-10-19 16:32:32 UTC
OK, here's a conversation I had in #okular irc , 

[11:04] <rdieter> any clues where to look seeing this error:   okular(2727)/okular (app) Okular::Document::openDocument: No plugin for
[11:04] <rdieter> mimetype '"application/zip"'.
[11:04] <rdieter> seeing this on one box trying to open an xps file
[11:05] <rdieter> (it opens fine on another box, so I'm trying to track down what the difference is)
[11:05] <rdieter> fine:  fedora 13, qt-4.6.3, kdegraphics-4.5.2.    not fine:  fedora 14, qt-4.7.0, kdegraphics-4.5.2
[11:06] <pinotree> kmimetypefinder thatfile
[11:07] <rdieter> ah, ok, sec
[11:08] <rdieter> kmimetypefinder test.xps   =>  application/oxps
[11:08] <rdieter> on the non-working f14 box anyway (I'll have to reboot to test the other).
[11:09] <rdieter> is application/oxps kosher ?
[11:09] <pinotree> no
[11:10] <rdieter> seems to be part of shared-mime-info-0.80
[11:11] <rdieter> includes... <sub-class-of type="application/zip"/>
[11:11] <pinotree> does it provide any alias?
[11:12] <rdieter> yes, <alias type="application/vnd.ms-xpsdocument"/>
[11:12] <rdieter> I can paste the whole xps definition if you like
[11:14] <rdieter> http://fpaste.org/pqJJ/
[11:20] <rdieter> here's a diff from working shared-mime-info-0.71 and 0.80 of that mimetype
[11:21] <rdieter> (replacing the 0.80 mimetype with the 0.71 made it work again)
[11:21] <rdieter> http://fpaste.org/uggo/
[11:35] <rdieter> ok, quick-n-dirty, seems adding application/oxps mimetype to services/libokularGenerator_xps.desktop helps
[11:35] <rdieter> not sure if that's a worthy long-term solution or not
[11:35] <rdieter> (I'd venture not, I'd guess that application/vnd.ms-xpsdocument *should* still work)
[11:37] <rdieter> pinotree: I can file a bug if you think it's worth tracking... ?
[11:37] <pinotree> well, the alias should work
[11:37] <pinotree> can you please ping me back again in ~3h or so?
[11:38] <rdieter> pinotree: ok

Comment 6 Fedora Update System 2010-10-19 17:03:59 UTC
kdegraphics-4.5.2-3.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/kdegraphics-4.5.2-3.fc14

Comment 7 Fedora Update System 2010-10-20 03:09:11 UTC
kdegraphics-4.5.2-3.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kdegraphics'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/kdegraphics-4.5.2-3.fc14

Comment 8 Ron Petrick 2010-10-20 10:00:51 UTC
There's a small typo in the MimeType line of libokularGenerator_xps.desktop in kdegraphics-4.5.2-3.fc14. Currently, it reads:

MimeType=appliation/oxps;application/vnd.ms-xpsdocument;

The first mime type should read "application/oxps" (a "c" is missing). After making this change okular works on the XPS files I tested.

Comment 9 Rex Dieter 2010-10-20 13:07:27 UTC
arg. :)

Comment 10 Fedora Update System 2010-10-28 06:23:27 UTC
kdegraphics-4.5.2-4.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kdegraphics'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/kdegraphics-4.5.2-4.fc14

Comment 11 Fedora Update System 2010-11-04 23:34:20 UTC
kdegraphics-4.5.2-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.