Skip to content

Redirect to the first available page or out of XB when deleting the current page

Closes #3507335

This issue

  • redirects the user to the first available page on deletion
    • added a todo comment to redirect to the site's homepage instead in https://www.drupal.org/i/3503412, when the 'homepage' property is added the page object that the frontend will be able to check.
  • if a user deletes the current and last page, then it will redirect outside of XB back to '/' drupal site
  • added a timeout to window.location.href redirects. This is necessary because RTK throws an error because it tries to make a request following cache invalidation while
    the window.location.href is in progress. The window.location.href is a temporary solution until https://www.drupal.org/i/3502887 is done, then we can hopefully remove the timeouts by using routing hooks instead
  • created drupal-globals.ts file and added baseUrl there from this draft MR
Edited by Harumi Jang

Merge request reports

Loading