Skip to:
Content

BuddyPress.org

Opened 8 months ago

Closed 4 months ago

#9207 closed defect (bug) (fixed)

Improve WP Playground compatibility

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 15.0.0 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Cc:

Description

I've found various issues:

In BP Nouveau: Activity items action buttons are not styled the right way looks like the bp_current_component() is not set during the Ajax context.
In BP Legacy: a "Deleted" template error notice is always displayed.
this query SELECT object_id FROM wp_bp_xprofile_meta WHERE object_type = 'field' AND meta_key = 'signup_position' ORDER BY CONVERT(meta_value, SIGNED) ASC generates an error : General error: 1 no such column: SIGNED.
It's not possible to upload Avatars (error is Upload Failed! Error was: Please upload only these file types: JPG, JPEG, JPE, GIF, PNG, WEBP.) or cover images (error is Upload Failed! Error was: Specified file failed upload test.).
I need to investigate further.

As WP Playground is putting WordPress in a subdirectory I believe it’s problematic. When testing using wp-now npm package I don’t get most of these errors.

Change History (5)

#1 @espellcaste
6 months ago

  • Milestone changed from 15.0.0 to Awaiting Contributions

This ticket was mentioned in PR #389 on buddypress/buddypress by @imath.


4 months ago
#2

  • Keywords has-patch added

To fix WP Playground issues, I suggest to:

  • Send the current canonical URL into Ajax request vars. wp_get_referer() is not set which explains why BP URI globals are not set into Ajax context by WP Playground.
  • Ignore $_COOKIE['bp-message'] if its value is set to deleted. It looks like the cookie is not deleted but its value is set to deleted once it's removed by BuddyPress.
  • About the SIGNED conversion or casting SQL issue, it looks like it's a SQLlite issue that will be hard to cope with: see https://wordpress.org/support/topic/wordpress-meta-query-not-working/ I used a workaround to get rid of it for now.

[!IMPORTANT]
I'll need to run grunt commit before SVN committing this PR.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/9207

#3 @imath
4 months ago

  • Milestone changed from Awaiting Contributions to 15.0.0

Let's try to finally use WP Playground to let users preview BuddyPress from the plugin directory!

This will help us prove: BuddyPress is working with any supported WordPress versions. Visiting our Plugin Reviews motivated me about this move.

This ticket was mentioned in Slack in #buddypress by imath. View the logs.


4 months ago

#5 @imath
4 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 14068:

Improve BuddyPress compatibility with WP Playground previews

  • Avoid using SIGNED casting into the SQL query retrieving the signup field IDs as it's generating an error with WP Playground SQLite db.
  • Make sure BP URI globals are set during Ajax requests passing the current displayed page canonical URL into these requests.
  • Ignore the bp-message cookie when its value is set to deleted to prevent the wrong display of a template notice when BP Legacy is the active template pack.
  • Update JSON blueprints to latest WP Playground's blueprint schema.

Props espellcaste

Fixes #9207
Closes https://github.com/buddypress/buddypress/pull/389

Note: See TracTickets for help on using tickets.