HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Bugs in Importing Procedure (v

edited March 2012 in Feedback

Two bugs I have had to personally fix to import phpbb2 data into vanilla forums.

First: class.upload.php
Fatal error when attempting to move uploaded file.

Line 211: $Target = PATH_LOCAL_UPLOADS.'/'.$Parsed['Name'];
Modified: $Target = $Parsed['Name'];

Second: class.importmodel.php
Query Failure when updating count on run "9". (Discussion Comments)

Patch: Add to Line 466:
if(strtolower($Aggregate) == "sum"){ $Result = "update :_$ParentTable JOIN ( SELECT $ChildJoinColumn, SUM($ChildColumnName) AS ccsum FROM :_$ChildTable GROUP BY $ChildJoinColumn ) AS t2 ON :_$ParentTable.$ParentJoinColumn = t2.$ChildJoinColumn SET :_$ParentTable.$ParentJoinColumn=t2.ccsum "; return $Result; }

Hope this helps, didnt find your repo so couldnt issue bug.

Also, unable to post in developers forum.



  • Options
    UnderDogUnderDog MVP
    edited March 2012

    Thank you so much for the issues and especially the solutions (patches)

    You're right about not finding the repo. It's here by the way:


    ( The importer plugin has another repo: https://github.com/lincolnwebs/VanillaPorter/issues )

    Posting in the developers forum requires extra permissions, which I'm sure will be given in time.

    There was an error rendering this rich post.

  • Options

    Just wanted to say thanks for the fix. The class.upload.php-patch fixed the move file-error when trying to import from file on a local (Windows) machine!

  • Options

    Actually, the fix for class.upload.php above is only a partial fix. It will fix the issue if you only use one environment to host Vanilla forums, but it won't fix the issue if you have multiple (in my case, I develop on both a Win7 pc with Xampp and a Mac with Xampp and it is hosted on a Linux server). In this case, the real fix is to put the fix in the Parse($Name) function around line 128 (in Vanilla Instead of using "PATH_LOCAL_UPLOADS", do the same str_replace on it that you do on $Name. That way both variables will match no matter what operating system you are using.

  • Options
    UnderDogUnderDog MVP
    edited July 2012

    Awesome! I'll mention @Todd for that last fix, so he can have it changed in Vanilla 2.1 (pretty please, todd?) It's issue 1351 on gitHub.

    There was an error rendering this rich post.

Sign In or Register to comment.