You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The back button on pages, Edit, Results, and Clone returns the user to a URL that is hardcoded as <button onclick="window.location = '/wp-admin/admin.php?page=sjs-main-menu'">< Back</button>
Removing styling from button for readability.
I believe this would be a more dynamic way of returning the user to the admin page.
I bring this up because if a developer is working in a development environment then they may have a URL that looks like localhost/wordpress/site2/wp-admin/admin.php?page=sjs-main-menu as opposed to assuming the URL: localhost/wp-admin/admin.php?page=sjs-main-menu.
The problem is that in the current implementation of onclick="window.location = '/wp-admin/ will return the user to the URL localhost/wp-admin/ every time, even if it should return them to the URL localhost/wordpress/site2/wp-admin/.
The text was updated successfully, but these errors were encountered:
plutotom
changed the title
Back button returns user to potentially wrong admin page.
Back button returns user to potentially wrong admin URL.
Feb 23, 2022
The back button on pages, Edit, Results, and Clone returns the user to a URL that is hardcoded as
<button onclick="window.location = '/wp-admin/admin.php?page=sjs-main-menu'">< Back</button>
Removing styling from button for readability.
I believe this would be a more dynamic way of returning the user to the admin page.
<button onclick="window.location = '<?php echo get_admin_url() ?>?page=sjs-main-menu'">< Back</button>
I bring this up because if a developer is working in a development environment then they may have a URL that looks like
localhost/wordpress/site2/wp-admin/admin.php?page=sjs-main-menu
as opposed to assuming the URL:localhost/wp-admin/admin.php?page=sjs-main-menu
.The problem is that in the current implementation of
onclick="window.location = '/wp-admin/
will return the user to the URLlocalhost/wp-admin/
every time, even if it should return them to the URLlocalhost/wordpress/site2/wp-admin/
.The text was updated successfully, but these errors were encountered: