<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>396286</bug_id>
          
          <creation_ts>2018-07-07 20:56:21 +0000</creation_ts>
          <short_desc>KF5 ofximporter &quot;Map account&quot; fails on MS Windows</short_desc>
          <delta_ts>2020-06-05 04:05:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kmymoney</product>
          <component>importer</component>
          <version>git (master)</version>
          <rep_platform>Microsoft Windows</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jeff">jeffjl.kde</reporter>
          <assigned_to name="KMyMoney Devel Mailing List">kmymoney-devel</assigned_to>
          <cc>kmymoney</cc>
    
    <cc>me</cc>
    
    <cc>ralf.habacker</cc>
          
          <cf_commitlink>https://commits.kde.org/kmymoney/d8052a698b736ddc0b9af6287ae698194cf0f10d</cf_commitlink>
          <cf_versionfixedin>5.1.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>1</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1765808</commentid>
    <comment_count>0</comment_count>
    <who name="Jeff">jeffjl.kde</who>
    <bug_when>2018-07-07 20:56:21 +0000</bug_when>
    <thetext>I have a couple of problems with ofxpartner.cpp on a craft-mingw-Qt5.11-windows build.

First, the &quot;get&quot; function of the OfxHttpRequest constructor does not work. Maybe because KIO::copy does not work on Windows. Maybe KIO::copy doesn&apos;t work because of QUrl problems on Windows (see problem #2, below). Or maybe this has been overlooked because if you have an old ofx-bank-index.xml file laying around, KMM will use that file even if it fails to fetch a new one.

I hacked around that issue by just commenting out the &quot;if(type.toLower() == QStringLiteral(&quot;get&quot;))&quot; section around ofxpartner.cpp line 297 and always using the &quot;post&quot; code. A full fix would just remove the &quot;type&quot; parameter from that function (it was unused in KMM4).

I have not been able to figure out a &quot;clean&quot; solution to the second problem. It has to do with QUrl paths. I can not find a combination of QUrl, QFile, QDir, QFileInfo calls that will construct a file name that succeeds with QFile::open in the slotOfxConnected() method. Even though QUrl.isLocalFile() returns &quot;true&quot;, the file path either does not include the drive letter, e.g. &quot;/users/jeff/ofx-bank-index.xml&quot;, or includes the drive letter looking like a network name, e.g. &quot;//c/users/jeff/ofx-bank-index.xml&quot;. QFile fails to open either of those. This may only be a problem because my KMM program is on D: and my app folder is on C:. If they were on the same drive, maybe the &quot;/users/jeff&quot; path would work.

If I just hack in a string replacement to change the &quot;//c/&quot; to &quot;c:/&quot; to pass to QFile::open(), then KMM will fetch a new ofx-bank-index.xml and everything&apos;s good from there (assuming the &quot;get&quot; fix is in). 

The &quot;static QString directory&quot; member variable is correctly &quot;C:/users/jeff&quot; at the troublesome spot. It just gets lost in the QUrl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918130</commentid>
    <comment_count>1</comment_count>
    <who name="citapinc">kmymoney</who>
    <bug_when>2020-03-25 14:23:13 +0000</bug_when>
    <thetext>I did some digging into this issue and found that when I got to &quot;http://www.ofxhome.com/api.php&quot; or &quot;http://www.ofxhome.com/api.php?all=yes&quot; I get a blank screen instead of results.

However if I go to &quot;http://www.ofxhome.com/api.php?dump=yes&quot; I do get an XML result back.

Therefore the answer might be as easy as changing the URL from &quot;http://www.ofxhome.com/api.php?all=yes&quot; to &quot;http://www.ofxhome.com/api.php?dump=yes&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918330</commentid>
    <comment_count>2</comment_count>
    <who name="Thomas Baumgart">tbaumgart</who>
    <bug_when>2020-03-26 15:05:09 +0000</bug_when>
    <thetext>citapinc: take your browser and load the &apos;empty&apos; page from &quot;http://www.ofxhome.com/api.php?all=yes&quot;. Then direct your browser to show you the source code of the page and you will notice, that it not empty at all.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918336</commentid>
    <comment_count>3</comment_count>
    <who name="Thomas Baumgart">thb</who>
    <bug_when>2020-03-26 15:37:37 +0000</bug_when>
    <thetext>Git commit 1989a4296d070c9ad962578815ab4fa169f61706 by Thomas Baumgart.
Committed on 26/03/2020 at 15:36.
Pushed by tbaumgart into branch &apos;5.0&apos;.

Fix local filename on windows for ofx banking
FIXED-IN: 5.0.9

M  +43   -24   kmymoney/plugins/ofx/import/ofxpartner.cpp
M  +17   -17   kmymoney/plugins/ofx/import/ofxpartner.h

https://commits.kde.org/kmymoney/1989a4296d070c9ad962578815ab4fa169f61706</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918518</commentid>
    <comment_count>4</comment_count>
    <who name="citapinc">kmymoney</who>
    <bug_when>2020-03-27 20:30:20 +0000</bug_when>
    <thetext>Thank you Thomas for addressing this issue.

I went to the nightly build, downloaded the Windows .EXE for 5.0.9 and installed it.  However the nightly build doesn&apos;t include kbanking or ofximporter.

Where can I go to download the latest Windows compiled version that includes the new ofximporter so I can beta test it for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919033</commentid>
    <comment_count>5</comment_count>
    <who name="Thomas Baumgart">thb</who>
    <bug_when>2020-03-30 17:17:25 +0000</bug_when>
    <thetext>Git commit d8052a698b736ddc0b9af6287ae698194cf0f10d by Thomas Baumgart.
Committed on 30/03/2020 at 17:16.
Pushed by tbaumgart into branch &apos;5.0&apos;.

Reconstruct url based on modified filename

This should resolve the issue that the URL is invalid on windows
systems.

This amends commit 1989a4296d070c9ad962578815ab4fa169f61706

M  +1    -1    kmymoney/plugins/ofx/import/ofxpartner.cpp

https://commits.kde.org/kmymoney/d8052a698b736ddc0b9af6287ae698194cf0f10d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919907</commentid>
    <comment_count>6</comment_count>
    <who name="Thomas Baumgart">thb</who>
    <bug_when>2020-04-03 16:54:30 +0000</bug_when>
    <thetext>Git commit 59a56c94761ecd17b9fd42e7270fbd8b9eee8245 by Thomas Baumgart.
Committed on 03/04/2020 at 16:53.
Pushed by tbaumgart into branch &apos;5.0&apos;.

Add a leading slash in front of the drive letter

This amends commit d8052a698b736ddc0b9af6287ae698194cf0f10d and finally
fixes the problem.

M  +1    -1    kmymoney/plugins/ofx/import/ofxpartner.cpp

https://commits.kde.org/kmymoney/59a56c94761ecd17b9fd42e7270fbd8b9eee8245</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1928360</commentid>
    <comment_count>7</comment_count>
    <who name="Thomas Baumgart">tbaumgart</who>
    <bug_when>2020-05-09 04:49:03 +0000</bug_when>
    <thetext>*** Bug 413386 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>