ElasticPress
ElasticPress copied to clipboard
Search for Custom Post Type is not working for Multisite.
Describe the bug
In multisite, the option is in network admin. If a post type only registered for a sub-site, WP will not aware of the post type.
Steps to Reproduce
- Create a plugin with custom post type.
- Only enable it in a sub-site.
- Navigate to Search Weight option wp-admin/admin.php?page=elasticpress-weighting
- we will not see the post type.
Expected behavior This option might need to be added per-site basis.
Screenshots n/a
Environment information
- Device: Thinkpad 13
- OS: Windows 10 Pro
- Browser and version: Chrome
- WordPress version: 5,5
- Plugins and version:
- Theme and version:
-
Site Health Info:
### wp-core ###
version: 5.5
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /blog/%year%/%monthnum%/%day%/%postname%/
https_status: false
user_registration: false
blog_public: 0
default_comment_status: open
multisite: true
user_count: 25
site_count: 31
network_count: 1
dotorg_communication: true
### wp-plugins-active (14) ###
10up Experience: version: 1.7.3, author: 10up, Auto-updates disabled
Classic Editor: version: 1.6, author: WordPress Contributors, Auto-updates disabled
ElasticPress: version: 3.4.3, author: 10up, Auto-updates disabled
Formstack Plugin: version: 2.0.2, author: Formstack, LLC, Auto-updates disabled
Google Authenticator: version: 0.52, author: Ivan Kruchkoff, Auto-updates disabled
Post Meta Revisions: version: 1.0.0, author: Adam Silverstein - code developed with others, Auto-updates disabled
Safe Redirect Manager: version: 1.9.3, author: 10up, Auto-updates disabled
Shortcake (Shortcode UI): version: 0.7.4, author: Fusion Engineering and community, Auto-updates disabled
Shortcake (Shortcode UI) Repeatable: version: 1.0.1, author: 10up, Auto-updates disabled
Shortcake (Shortcode UI) Richtext: version: 1.3, author: XWP, Auto-updates disabled
Simple Page Ordering: version: 2.3.4, author: Jake Goldman, 10up, Auto-updates disabled
Stream: version: 3.5.1, author: XWP, Auto-updates disabled
### wp-media ###
image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1690
imagemagick_version: ImageMagick 6.9.10-86 Q16 x86_64 2020-01-13 https://imagemagick.org
file_uploads: File uploads is turned off
post_max_size: 150m
upload_max_filesize: 150m
max_effective_size: 150 MB
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 16 GB
imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
imagick::RESOURCETYPE_FILE: 786432
imagick::RESOURCETYPE_MAP: 16 GB
imagick::RESOURCETYPE_MEMORY: 8 GB
imagick::RESOURCETYPE_THREAD: 2
gd_version: 2.2.5
ghostscript_version: not available
### wp-server ###
server_architecture: Linux 4.19.76-linuxkit x86_64
httpd_software: nginx/1.19.1
php_version: 7.3.19 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 30
memory_limit: 128M
admin_memory_limit: 256M
max_input_time: 60
upload_max_size: 150m
php_post_max_size: 150m
curl_version: 7.61.1 OpenSSL/1.1.1c
suhosin: false
imagick_availability: true
pretty_permalinks: true
### wp-database ###
extension: mysqli
server_version: 5.7.31
client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
### wp-constants ###
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /var/www/html/wp-content
WP_PLUGIN_DIR: /var/www/html/wp-content/plugins
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: true
SCRIPT_DEBUG: true
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_LOCAL_DEV: undefined
DB_CHARSET: utf8
DB_COLLATE: undefined
### wp-filesystem ###
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable
Additional context
Weighting does not work when the plugin is network activated. We might need a PR to the docs better explaining this.