I initially thought it was an issue with the auth toggle, but it's actually that the API someimes returns a leading space in front of a URL, which PHP's CuRL doesn't handle itself
It wasn't actually public projects that were being listed, it just wasn't all that should have been.
There were exactly 40 pages being displayed, when there should (based on the fix) have been 72.
Gitlab returns results in a paginated format, you have to look for a next header to get the next page. The code handles that quietly in the background.
However, it seems that once in a while, Gitlab includes an extra leading space in that header value - this was being passed into PHP's CuRL which was silently refusing to connect out to an invalid URL.
I turned error_reporting and display_errors on and got absolutely nothing.
Activity
16-Apr-22 12:57
assigned to @btasker
17-Apr-22 08:07
mentioned in commit c88f2a3c1b9613da3d2e0253f1e6425dac5d0b82
Message
Fix issue with only some projects being displayed on project listing page (websites/Gitlab-Issue-Listing-Script#19)
I initially thought it was an issue with the auth toggle, but it's actually that the API someimes returns a leading space in front of a URL, which PHP's CuRL doesn't handle itself
17-Apr-22 08:14
It wasn't actually public projects that were being listed, it just wasn't all that should have been.
There were exactly 40 pages being displayed, when there should (based on the fix) have been 72.
Gitlab returns results in a paginated format, you have to look for a
next
header to get the next page. The code handles that quietly in the background.However, it seems that once in a while, Gitlab includes an extra leading space in that header value - this was being passed into PHP's
CuRL
which was silently refusing to connect out to an invalid URL.I turned error_reporting and
display_errors
on and got absolutely nothing.In this snippet
The arrays were ending up completely empty. I dropped an
echo curl_error($this->curl)
in there but still nothing.Ultimately the fix in commit
c88fa2a3c
was to add a trimto ensure any leading or trailing gumph is removed
17-Apr-22 08:18
mentioned in issue #15