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

Addon Upload appears brokem

Just tried to upload a new addon, looks like a path issue.

Search first

Check out the Documentation! We are always looking for new content and pull requests.

Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    YEAH! A new hgtonight-addon! :dance:

  • AdrianAdrian Wandering Spirit Montreal MVP

    I can confirm it's borked, will pass along to the powers that be :)

  • jobbatamjobbatam Batam New

    waiting :chuffed:

  • AdrianAdrian Wandering Spirit Montreal MVP

    me too :)

  • LincLinc Detroit Admin
    edited July 2015

    Are you all waiting on me to do it? Kinda defeats the point of open source if it's still 1 guy's job to do the work. I don't even see indication anyone's isolated the problem to a single scenario; I had to go test it myself to know if all uploading was broken or if it's just new addons. C'mon now.

  • LincLinc Detroit Admin

    I just did a massive refactor on the community repo (spacening etc) so if you're gonna play in there, pull first.

  • LincLinc Detroit Admin

    @jobbatam said:
    waiting :chuffed:

    For divine intervention? :anguished:

  • AdrianAdrian Wandering Spirit Montreal MVP

    I tried a new add-on and it failed. I will turn on debug and see it gives us anything useful.

  • LincLinc Detroit Admin

    @Adrian said:
    I tried a new add-on and it failed.

    But the key is that existing addons continue to allow uploads for new versions. That means it isn't the upload mechanism / server, it's something about the pathing in the code for new addons. If only there was another code base where we'd changed how to determine upload directories in the last year... :awesome:

  • AdrianAdrian Wandering Spirit Montreal MVP
    edited July 2015

    @linc, here is the error I got with debug on:

    Undefined variable: Addon in /var/www/frontend-9c047cb90355e5/applications/dashboard/models/class.updatemodel.php line 161

    I only had a new plugin, I did not try an existing one. I will dig a bit deeper.

  • AdrianAdrian Wandering Spirit Montreal MVP
    edited July 2015

    I'm stumped. Existing addon works. New ones don't. Maybe someone see's something I'm not.

  • hgtonighthgtonight ∞ · New Moderator

    Is this running the exact same code as the community repo?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • LincLinc Detroit Admin

    Repo is at:

    commit 232b1ec50c37b84cdbc4d2e3d1c65f291d898f83
    Merge: fe5e8f3 3e5a1bc
    Author: Lincoln Russell <lincoln@icrontic.com>
    Date:   Tue Jun 9 15:07:42 2015 -0400
    
        Merge pull request #30 from hgtonight/hotfix/no-more-forking
    
        Remove github fork ribbon
    
  • hgtonighthgtonight ∞ · New Moderator

    @Linc said:
    Repo is at:

    commit 232b1ec50c37b84cdbc4d2e3d1c65f291d898f83
    Merge: fe5e8f3 3e5a1bc
    Author: Lincoln Russell <lincoln@icrontic.com>
    Date:   Tue Jun 9 15:07:42 2015 -0400
    
        Merge pull request #30 from hgtonight/hotfix/no-more-forking
        
        Remove github fork ribbon
    

    As a side note, it would be great if the commit hash were buried in the footer somewhere. I assume this would have to be a deployment script?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • LincLinc Detroit Admin

    @hgtonight I'm not 100% certain, but I think SaveToConfig('Repo.Community.Head', file_get_contents( PATH_ROOT.'/.git/refs/heads/master'); on utility/update would be close enough. If @Tim is feeling super generous and wants to tell me a sane way to hook into the pusher I'm all ears, but that's the closest I can do from product land (and we'd just have to remember to utility/update on deploys).

  • BleistivtBleistivt Moderator

    I still can't upload new addons (getting the same error like in the first post). This might be something you need to fix on your side, since the addon repo is working locally.

  • hgtonighthgtonight ∞ · New Moderator

    It looks like it has to do with my parse readme code and its naive handling of paths. :bawling:

    @Bleistivt You should be able to upload if you fill in a description in the upload form.

    I will work on a patch, but I am not sure how to check if a URL returns a valid zip. I also don't have a great way to test this. :S

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • BleistivtBleistivt Moderator

    Aaaah that explains it! :D

    I am not sure how to check if a URL returns a valid zip

    Is the check needed? It looks like _GetInfoZip just returns false if it fails to open the path.

  • hgtonighthgtonight ∞ · New Moderator
    edited July 2015

    @Bleistivt said:
    Aaaah that explains it! :D

    Is the check needed? It looks like _GetInfoZip just returns false if it fails to open the path.

    Modify the call to not throw the error will fix this issue, but it won't let us read the zip file, right?

    Making the entire feature useless :(

    EDIT - It looks like UpdateModel::AnalyzeAddon takes the path as is and passes it to UpdateModel::_GetInfoZip. PR here: https://github.com/vanilla/community/pull/33

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.