View Single Post
Old 25th April 2013, 00:28
electronixcraft electronixcraft is offline
Junior Member
Join Date: Apr 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default THis is not working due to this bug FS#2431 - APS list update failed.

I think there is a bug in
In line 223:
preg_match_all("/\<a href=\"(.+)\/\" class=\"vendor\"/i", $vendor_page, $matches);
You take the href from the result page, which was Something probably changed with listing, because that page returns the links as relative, so taking out the relative part of the url is not enough.

I made a fast dirty hack on my side, just modify the formatVendorCallback to return '/all-app/'.$array_item.'.atom?vendor='.$array_item.'&pageSi ze=100'; and it is almost ok.

But something still buggy, because the download of some packages simply fail with this error:
"[INTERFACE]: APS crawler: String could not be parsed as XML"
Maybe the package's atom feed is missing or something, but you can easily avoid that by check the returned page for xml validity, by adding this line

if (!simplexml_load_string($xml)) continue;

to the inner "for" loop where you fetch the packages. (Probably would be better to exception check with simpleXMLElement, but I didnt want to mess so much with that code, just want a working aps installer )

Now, I can list and install packages without an issue

Last edited by till; 28th April 2013 at 19:48. Reason: removed big fonts
Reply With Quote