Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#62929 closed defect (bug) (invalid)

Playground: Sample page has a broken link to dashboard

Reported by: hanneslsm's profile hanneslsm Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

I know that the underlying functionality is much bigger, but I still want to raise this ticket.
On WordPress Playground the sample page links to the dashboard, which is a broken link.

As a new WordPress user, you should go to **your dashboard** to delete this page and create new pages for your content.

your dashboard is linking to 127.0.0.1:9400/wp-admin which is not working.

A quick fix would be to remove the link from the sample pages.

Change History (6)

This ticket was mentioned in PR #8279 on WordPress/wordpress-develop by @ankitkumarshah.


14 months ago
#1

  • Keywords has-patch added

Trac ticket: #62929

## Description
This PR removes the dashboard link from the sample page content in upgrade.php. Previously, the link was using admin_url() which caused issues in environments like WordPress Playground where the URL might not be accessible.

## Testing Instructions

  1. Create a fresh WordPress installation
  2. Check the sample page content
  3. Verify that the text "your dashboard" appears without a hyperlink

## Screenshots (if applicable)
### Before:
https://github.com/user-attachments/assets/ae91edb2-f3b8-43bb-b90d-03c88830d9c2

### After:
https://github.com/user-attachments/assets/957f8846-e8bd-4c80-8b1f-cea3dc895088

@ankitkumarshah commented on PR #8279:


14 months ago
#2

For now, In this PR I have implemented the quick fix but I think we can add aIS_WORDPRESS_PLAYGROUND constant and accordingly render your dashboard with and without link.

Found that we can detect WordPress is running in playground by $_SERVER[https://wordpress.org/support/topic/is-there-a-way-from-inside-wordpress-to-detect-its-running-in-playground/ 'SERVER_SOFTWARE'] == 'PHP.wasm' according to this [discussion] But I am unsure is this correct.

More Reference

@ankitkumarshah commented on PR #8279:


14 months ago
#3

Hi @hanneslsm could you please test and review this PR.

#4 @swissspidy
14 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi there and welcome to WordPress Trac

Playground issues like this should be reported at https://github.com/WordPress/wordpress-playground, as it's not a bug in WordPress core itself.

@swissspidy commented on PR #8279:


14 months ago
#5

Please kindly note that this should be reported & fixed at https://github.com/WordPress/wordpress-playground instead

#6 @audrasjb
14 months ago

I'm keeping it closed for now, but what is the value of this link to the general dashboard at the first place?
If we choose to keep the link, shouldn't we link directly to the "Edit Pages" admin screen?
(BTW this would probably be another ticket)

Note: See TracTickets for help on using tickets.