Opened 3 years ago
Last modified 3 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: |
|
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.
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
tofile
and add a 301 for/reference/files/*
to/reference/file/*
, probably within sunrise to pre-empt ms-files output.