Repository navigation
[API merging] Listing publications fails in RRM express setup #13622
Copy link
Copy link
Closed
Labels
Module: RRMReader Revenue Manager module related issuesReader Revenue Manager module related issuesP0High priorityHigh priorityTeam MIssues for Squad 2Issues for Squad 2Type: BugSomething isn't workingSomething isn't working
Description
Bug Description
The request to list publications in RRM express setup fails with a 500 error, or returns an empty list. This happens due to two reasons:
- The
ListPublicationsmethod in thewebcontentpublisherAPI does not currently support a wildcard for organization, which was planned at the initial stage. The RRM team is looking into this problem separately. This causes the 500 error. - The
filterargument to use with the method has a different shape. ThesusbcribewithgoogleAPI acceptsdomainorsite_url, butwebcontentpublisheraccepts multiplecanonical_domainentries separated byOR. For the passed value, the API performs an exact string match against the stored database value. If passed incorrectly, this causes the method to return the empty or incorrect list.
Steps to reproduce
- Ensure Request the new RRM scopes for the express setup #13004 is merged.
- Ensure the RRM team has fixed the wildcard support issue mentioned above (reason 1).
- Turn on the
rrmExpressSetupfeature flag. - Set up Site Kit.
- Go to the RRM express setup in
yoursite.com/wp-admin/admin.php?page=googlesitekit-dashboard&slug=reader-revenue-manager&reAuth=true&expressSetup=true&cta=newsletter-signup&step=connect-publication. - Notice that you cannot see your existing publications and are asked to create a new one.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Listing existing publications in the Reader Revenue Manager express setup flow no longer fails due to the reasons mentioned in the issue description.
Implementation Brief
- In
Get_Publications::get_publication_filter(), replace thedomainandsite_urlcomparisons with a set ofcanonical_domaincomparisons joined byOR. ThewebcontentpublisherAPI matches this value as an exact string, so the filter has to enumerate every form the site could have been stored under. - Derive both a hostname and a site URL from the Search Console property, whichever type it is. For a domain property, the host is the property with the
sc-domain:prefix removed and the URL is that host underhttps. For a URL property, the host comes from parsing the property withURL::parse()and the URL is the property itself. - Build the candidate list from three sources and deduplicate it:
URL::permute_site_hosts()for bare hostnames,URL::permute_site_url()for full URLs, and those same URLs with any trailing slash removed. The bare hostnames and the trailing slash variants both matter because a publication created in Publisher Center and one created through Site Kit may not store the canonical domain in the same form. -
Get_Publications_Legacyis unchanged. It talks to the oldersubscribewithgoogleAPI, which still acceptsdomainandsite_url. - No Site Kit change addresses the 500 error. The wildcard organization in the
ListPublicationsparent is being fixed on the API side by the RRM team.
Test Coverage
- Update
test_create_request,test_get_publications__urlandtest_get_publications__domaininGet_PublicationsTest, which currently assert thesite_url = "..."anddomain = "..."shapes. - Cover a URL property carrying a trailing slash, such as
https://example.com/, asserting the filter contains the bare hosts, the slashed URLs and the unslashed URLs, each in www and non-www form over both schemes. - Cover a domain property, asserting the same set is produced from
sc-domain:example.com. - Cover an IDN property, asserting both the punycode and unicode hostnames appear.
- Assert the filter contains no duplicate terms for a property whose host is already
www., where the host and URL permutations overlap.
QA Brief
- Turn on the
rrmExpressSetupfeature flag. - Set up Site Kit using a Google account that has publications created with the URL of your test site.
- In the traffic section, click on the "Set up a sign-up form" CTA in the "Collect reader emails directly on your site" notification.
- Verify that you can see your existing publications and that you don't run into an error.
Changelog entry
- Fix listing existing publications in the Reader Revenue Manager express setup flow.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Module: RRMReader Revenue Manager module related issuesReader Revenue Manager module related issuesP0High priorityHigh priorityTeam MIssues for Squad 2Issues for Squad 2Type: BugSomething isn't workingSomething isn't working
Activity
Merge branch 'develop' into fix/#13622-get-publications-filter.
Merge branch 'develop' into fix/#13622-get-publications-filter.
Merge pull request #13624 from google/fix/#13622-get-publications-filter
mohitwp commentedon Sep 29, 2026
QA Update ✅
Tested on main environment.
Tested the RRM Express Setup publication listing flow with the
rrmExpressSetupfeature flag enabled.Verified that existing RRM publications are successfully listed during the "Connect publication" step without encountering the previous 500 error or empty publication list issue.
Validated the following scenarios:
Existing publication available for the site:
No existing publication available:
No issues observed during testing.
Details
Recording.3464.mp4
mohitwp commentedon Sep 30, 2026
QA Update ✅
Verified
Existing publication available for the site:
No existing publication available:
Note : Can't test create publication flow and Setup CTA flow due to API error.
Details
Recording.3469.mp4