Making WordPress.org

Opened 2 years ago

Last modified 2 years ago

#6267 new defect (bug)

wporg-developer theme used in Multisite generates a fatal error when displaying functions included in a source file

Reported by: imath's profile imath Owned by:
Milestone: Priority: normal
Component: Developer Hub Keywords: has-patch
Cc:

Description

Hi,

I'm currently working on building BuddyPress code reference part of this site https://developer.buddypress.org. To make sure I'm close to the site's configuration, I'm using a Multisite config with plugins/theme needed for the WP DevHub documentation activated on a sub site.

1) Using files as a slug is a bad idea, when you try to display a source file eg: https://site.url/reference/files/bp-core/bp-core-attachments.php/, you get a white screen of death because you end up having this script running: /wp-includes/ms-files.php and the BLOGUPLOADDIR constant might not be set for recent WordPress versions. So I suggest to edit it in favor of file to fix this issue.

2) Overriding the term link for the wp-parser-source-file taxonomy shouldn't be done using a hardcoded string but should use the taxonomy rewrite extra permastruct instead.

Both suggestion are included into the attached patch.

Attachments (1)

6267.patch (1.9 KB) - added by imath 2 years ago.

Download all attachments as: .zip

Change History (3)

@imath
2 years ago

#1 @dd32
2 years ago

you get a white screen of death because you end up having this script running: /wp-includes/ms-files.php and the BLOGUPLOADDIR constant might not be set for recent WordPress versions

Hmmm... Good catch! This is actually a problem, as WordPress.org uses ms-files.php still, and we're going to need /..../files/ to serve via ms-files.php in the not-too-distant future.

That's because of a systems request I made to enable subdir support as we need to create some sub-sites of developer.w.org.

I think we can rename this from files to file and add a 301 for /reference/files/* to /reference/file/*, probably within sunrise to pre-empt ms-files output.

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


2 years ago

Note: See TracTickets for help on using tickets.