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

Command icon 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

colema18 created an issue. See original summary.

admirlju made their first commit to this issue’s fork.

admirlju’s picture

Status: Active » Needs review

Added a new select for Workspaces, by default it selects all workspaces after selecting a specific workspace it filters the page select.

bcizej made their first commit to this issue’s fork.

DeaOm made their first commit to this issue’s fork.

deaom’s picture

When 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.

bcizej’s picture

New 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 to config/install folder and added an update hook to update the config if needed.

bcizej’s picture

Version: 3.0.1 » 3.0.x-dev
Status: Needs review » Needs work

There seems to be a problem with the /list endpoint (or maybe it's designed that way I don't know) but if you specify multiple accountkeys in 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.

admirlju’s picture

Had to fix how data is read in getPageList. 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.

admirlju’s picture

Status: Needs work » Needs review

Now all pages are listed. Experimenting with Instapage, they changed how /list page works, their implementation only displays pages for selected workspace.

deaom’s picture

Status: Needs review » Reviewed & tested by the community

If 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.

bcizej’s picture

Version: 3.0.x-dev » 3.x-dev

  • bcizej committed 2aa641ca on 3.x authored by admirlju
    Issue #3264831 by admirlju, bcizej, DeaOm, colema18: Choose Instapage...
bcizej’s picture

Status: Reviewed & tested by the community » Fixed

Merged, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.