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.
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.
2
Comments
YEAH! A new hgtonight-addon! :dance:
I can confirm it's borked, will pass along to the powers that be
waiting
me too
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.
I just did a massive refactor on the community repo (spacening etc) so if you're gonna play in there, pull first.
For divine intervention?
I tried a new add-on and it failed. I will turn on debug and see it gives us anything useful.
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...
@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.
I'm stumped. Existing addon works. New ones don't. Maybe someone see's something I'm not.
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.
Repo is at:
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.
@hgtonight I'm not 100% certain, but I think
SaveToConfig('Repo.Community.Head', file_get_contents( PATH_ROOT.'/.git/refs/heads/master');
onutility/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).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.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
It looks like it has to do with my parse readme code and its naive handling of paths.
@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.
Aaaah that explains it!
Is the check needed? It looks like _GetInfoZip just returns false if it fails to open the path.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
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.