Problem/Motivation
We have multiple Instapage Workspaces. The pages available to use from Instapage are from a different workspace then what we would want to use. It would be nice to be able to specify which Workspace we want to use when the dropdown of pages is displayed.
Issue fork instapage-3264831
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
admirlju commentedAdded a new select for Workspaces, by default it selects all workspaces after selecting a specific workspace it filters the page select.
Comment #7
deaom commentedWhen you switch between workplaces and there is no pages/subpages added, you get an empty select instead of the default "- Select - " option displayed as when the options are replaced that first "- Select- " option is removed. The same happens when you go back to "main" all workplaces select, the default "- Select -" option is removed. Changed that, and also updated the coding standards and test, so leaving it to needs review.
Comment #8
bcizej commentedNew configuration was added to schema for subpages but there was no default value set for that in
config/instapage.pages.yml. The files was not in correct folder anyway so moved it toconfig/installfolder and added an update hook to update the config if needed.Comment #9
bcizej commentedThere seems to be a problem with the
/listendpoint (or maybe it's designed that way I don't know) but if you specify multipleaccountkeysin the header it only retrieves pages from the workspace of the first account key. I used a test account with multiple workspaces and it returned only pages from the workspace that the first account key belongs to. When switching the order of account keys (before they are json encoded and base64 encoded) I would get pages from a different workspace but again only from that workspace.Comment #10
admirlju commentedHad to fix how data is read ingetPageList. Currently looking at fixing the API tests, to correctly mock new responses.Edit: While my current implementation works, it's really bad. I'll look into optimization of the code because as it is it's requesting the same data over and over.
Comment #11
admirlju commentedNow all pages are listed. Experimenting with Instapage, they changed how /list page works, their implementation only displays pages for selected workspace.
Comment #12
deaom commentedIf you have multiple work spaces which have sub pages added, they are now displayed in the page select when all work spaces are first selected. If you switch workspace, then only pages from that workspace are available. Would say this now works, so marking it as RTBC.
Comment #13
bcizej commentedComment #15
bcizej commentedMerged, thanks.