Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5392

Changes to the UI when toggling features not reflected in WP menu after save, requires additional refresh

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Released
    • Icon: Should have Should have
    • 2.37.0
    • None
    • 2
    • Admin Panel
    • Sprint #142

      We added a WordPress option page to toggle features (e.g. for https://jira.greenpeace.org/browse/PLANET-5189). These features can affect which menu items are shown in the backend. However because of how WordPress processes these changes, the WordPress admin menu is rendered before the setting change is processed. So the page you see after saving does not reflect the current settings and you need to refresh the page again to see the new feature settings reflected in the menu.

      Example (test instance of other ticket which triggers the issue) https://k8s.p4.greenpeace.org/test-deimos/wp-admin/admin.php?page=planet4_settings_features 
      If you toggle the "Image Archive" option, you initially don't see changes to the WP menu but you do after refreshing.

      Proposed solution: We could set up something that forces a redirect after the settings were saved, but only for the "/wp-admin/admin.php?page=planet4_settings_features" page as this does increase the page load time.

            pvincent Pieter Vincent (Inactive)
            pvincent Pieter Vincent (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: