[YoutubeCommunityTabsBridge] Rename Community→Posts to fix broken bridge#4606
Conversation
Pull request artifacts
last change: Monday 2025-08-04 05:21:40 |
|
Not sure how to fix the errors in the above comment, but they seem to work locally for me: |
That's from this line: There, the result of
The question is why the said line didn't fail when you tried it. I have two theories:
You could test this by checking whether your feed has a feedTitle. Maybe the following line could fix it. It uses the null coalescing operator, which doesn't emit a warning but just attempts the next expression if the previous one would have been $this->feedName = $json->header->c4TabbedHeaderRenderer->title ?? $json->header->pageHeaderRenderer->pageTitle ?? $json->metadata->channelMetadataRenderer->title ?? $json->microformat->microformatDataRenderer->title ?? '';With this line, all currently known locations of the title would be checked and the empty string would be the fallback if none worked. |
|
Thanks @Mar-Koeh that seemed to work. The remaining errors are from a file that no longer exists after this PR renamed it. |
|
Can you please not rename the class? The fix itself is nice and will resolves issues for existing feeds also |
|
sorry strict linter rules |
|
@dvikan Do you prefer I also not rename the functions and comments to reflect the new tab name? |
|
goahead and rename everything you want except class name |
|
being on php 7 not 8 and the strict linter made the regression fix a bit ugly, but it works and should be good now |
Fixes #4604. The community tab was renamed to “posts”, causing the bridge to fail.
Context on rename: https://support.google.com/youtube/thread/321825573?hl=en
I fixed the tab lookup, and renamed the functions, file, and references to match the new “Posts” name.
Tested locally with:
Verified with:
http://localhost:9001/?action=display&bridge=YouTubePostsTabBridge&context=By+channel+ID&channel=UCLYut6IxIvx5PxwUWMXJz8g&format=html