New preview mode button error with url params

The new preview button breaks if you have url params in edit mode

  • Goal: preview the app in user/viewer mode
  • Steps: open an app in editor mode that uses a url param, eg myapp?foo=bar
  • Details: the preview button appends ?_releaseVersion=latest to the URL, making it an invalid url. It should append &_releaseVersion=latest if there is already a url param in edit mode
1 Like

Thanks for flagging! I've reported this as a bug & will post here when I get an update

1 Like

This is unfortunately still the case.

1 Like

Thanks for the bump, @Lychee. I'll make sure our internal ticket gets updated accordingly. :+1:

2 Likes

+1 to this as well!

1 Like

Has anyone found a workaround?

I managed to make my own preview button.

// JS query: previewFixed
(function () {
  // 1) Start from your org + app info 
  const orgBase = "https://yoursubdomain.retool.com";
  const appId = "yourUUID";
  const appName = "Testing";
  const page = "Link%20actions/page1"; // url-encoded path segment(s)

  // 2) Build the correct URL
  const u = new URL(`${orgBase}/apps/${appId}/${appName}/${page}`);

  // 3) Add your own params first
  u.searchParams.set("myvar", "test");

  // 4) Then add Retool's release flag safely
  u.searchParams.set("_releaseVersion", "latest");

  utils.openUrl(u.toString(), { inNewTab: true });
})();

1 Like

I'm not aware of any recommended workaround, but love that you took it into your own hands!