Bug 277661

Summary: facebook exporter incompatible with Firefox 4 (solution: use .html extension not .php)
Product: [Applications] digikam Reporter: Richard Neill <kde>
Component: Plugin-WebService-FacebookAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: crash CC: caulier.gilles, dirk.kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In: 2.0.0

Description Richard Neill 2011-07-12 22:20:33 UTC
Version:           1.9.0 (using KDE 4.6.3) 
OS:                Linux

If I export from Digikam to Facebook, then the first time I do this, KIPI creates a local temporary file   /tmp/xxx.php  and launches the default web browser. This is supposed to trigger that web browser to sign into facebook and install the KIPI import/export app.

If the kde-system-default browser is Firefox 3.x, this works. It also works fine with Konqueror. However, for Firefox 4, it is broken.

Firefox 4 throws the user a message saying it doesn't know how to open files of type PHP.  While this is irritating, it's technically correct: a file:// URL with a local file ending .php  has no web-server to inform firefox of the right Mime-type. So Firefox asks the user what to do with it, and (of course, refuses to open it with itself).

The workaround would be for digikam to generate a file ending in .html

Reproducible: Always

Steps to Reproduce:
1. Start afresh with a new facebook account (or at least without the kipi import/export app installed), and have kde's default browser be firefox.

2. Export some photos to facebook with digikam. 

3. Firefox will refuse to open the local file.

Actual Results:  
Firefox puts up a prompt saying "You have chosen to open xxx.php..... what should Firefox do with this file". 

Expected Results:  
Firefox should open the file and then process it.  Although Firefox is being apparently stupid here, I believe that Firefox is correct, albeit pedantic.



The file that digikam generates is an HTML file. Use the .html extension for it, rather than .php.

A simple test case is:

  echo "hello" > /tmp/test.php
  firefox file:///tmp/test.php

which fails (but works if it's /tmp/test.html).

I'm filing this under "crash" severity because the effect is to totally break the system, even though, technically it doesn't segfault.
Comment 1 caulier.gilles 2011-07-13 04:46:41 UTC
targeted to 2.0.0 release. 1.9.0 is not maintained anymore and 2.0.0 is in the way.

Gilles Caulier
Comment 2 Dirk Tilger 2011-07-14 07:11:32 UTC
Richard, I think there is something awkward going on at your machine. Could you please instead of opening that PHP file, save it and attach it to this bug report?
Comment 3 Richard Neill 2011-07-14 16:33:55 UTC
This is really odd - I can't now reproduce the problem.

Firefox still doesn't know how to open a local file with the .php extension (following the simple test above).

However, the digikam/kipi import-export process now does works in firefox.
Comment 4 Dirk Tilger 2011-07-18 16:05:23 UTC
Ok, closing this ticket as the bug cannot be reliably reproduced. 
Please reopen if you find a reliable procedure.