admin管理员组文章数量:1130349
I've created a multisite using subdirectories. The search function, both in backend and frontend, only works on the main site. If I try and do a search in a subdirectory it returns with "Nothing Found" even though I know the page/post exists.
In my debug.log I see this:
[15-Nov-2018 17:40:18 UTC] WordPress database error Unknown column 'wp_posts.post_title' in 'where clause' for query SELECT wp_2_posts.ID, wp_2_posts.post_parent FROM wp_2_posts WHERE 1=1
AND (
(wp_posts.post_title LIKE '%home%')
OR (wp_posts.post_content LIKE '%home%')
OR EXISTS (
SELECT * FROM wp_postmeta
WHERE post_id = wp_posts.ID
AND ( (meta_key LIKE '%title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%sub_title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_short%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_long%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%xyz%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%myACF%' AND meta_value LIKE '%home%') )
)
OR EXISTS (
SELECT * FROM wp_comments
WHERE comment_post_ID = wp_posts.ID
AND comment_content LIKE '%home%'
)
OR EXISTS (
SELECT * FROM wp_terms
INNER JOIN wp_term_taxonomy
ON wp_term_taxonomy.term_id = wp_terms.term_id
INNER JOIN wp_term_relationships
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE (
taxonomy = 'post_tag'
OR taxonomy = 'category'
OR taxonomy = 'myCustomTax'
)
AND object_id = wp_posts.ID
AND wp_terms.name LIKE '%home%'
)
) AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'acf-disabled' OR wp_2_posts.post_status = 'future' OR wp_2_posts.post_status = 'draft' OR wp_2_posts.post_status = 'pending' OR wp_2_posts.post_status = 'private') ORDER BY wp_2_posts.menu_order ASC, wp_2_posts.post_title ASC made by WP_Posts_List_Table->prepare_items, wp_edit_posts_query, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query
[15-Nov-2018 17:40:18 UTC] WordPress database error Unknown column 'wp_posts.post_title' in 'where clause' for query SELECT wp_2_posts.ID, wp_2_posts.post_parent FROM wp_2_posts WHERE 1=1
AND (
(wp_posts.post_title LIKE '%home%')
OR (wp_posts.post_content LIKE '%home%')
OR EXISTS (
SELECT * FROM wp_postmeta
WHERE post_id = wp_posts.ID
AND ( (meta_key LIKE '%title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%sub_title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_short%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_long%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%xyz%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%myACF%' AND meta_value LIKE '%home%') )
)
OR EXISTS (
SELECT * FROM wp_comments
WHERE comment_post_ID = wp_posts.ID
AND comment_content LIKE '%home%'
)
OR EXISTS (
SELECT * FROM wp_terms
INNER JOIN wp_term_taxonomy
ON wp_term_taxonomy.term_id = wp_terms.term_id
INNER JOIN wp_term_relationships
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE (
taxonomy = 'post_tag'
OR taxonomy = 'category'
OR taxonomy = 'myCustomTax'
)
AND object_id = wp_posts.ID
AND wp_terms.name LIKE '%home%'
)
) AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'acf-disabled' OR wp_2_posts.post_status = 'future' OR wp_2_posts.post_status = 'draft' OR wp_2_posts.post_status = 'pending' OR wp_2_posts.post_status = 'private') ORDER BY wp_2_posts.menu_order ASC, wp_2_posts.post_title ASC made by WP_List_Table->display, WP_List_Table->display_tablenav, WP_Posts_List_Table->extra_tablenav, do_action('manage_posts_extra_tablenav'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPSEO_Link_Columns->count_objects, WPSEO_Link_Columns->set_count_objects, WP_Query->get_posts, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query
I'm not seeing errors pop up anywhere else on the site
Search form code:
<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="search-form">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 search-container">
<input type="search" id="input-s" name="s" placeholder="Search For:" />
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 submit-btn-container">
<input type="submit" value="Search"/>
</div>
</form>
I've created a multisite using subdirectories. The search function, both in backend and frontend, only works on the main site. If I try and do a search in a subdirectory it returns with "Nothing Found" even though I know the page/post exists.
In my debug.log I see this:
[15-Nov-2018 17:40:18 UTC] WordPress database error Unknown column 'wp_posts.post_title' in 'where clause' for query SELECT wp_2_posts.ID, wp_2_posts.post_parent FROM wp_2_posts WHERE 1=1
AND (
(wp_posts.post_title LIKE '%home%')
OR (wp_posts.post_content LIKE '%home%')
OR EXISTS (
SELECT * FROM wp_postmeta
WHERE post_id = wp_posts.ID
AND ( (meta_key LIKE '%title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%sub_title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_short%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_long%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%xyz%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%myACF%' AND meta_value LIKE '%home%') )
)
OR EXISTS (
SELECT * FROM wp_comments
WHERE comment_post_ID = wp_posts.ID
AND comment_content LIKE '%home%'
)
OR EXISTS (
SELECT * FROM wp_terms
INNER JOIN wp_term_taxonomy
ON wp_term_taxonomy.term_id = wp_terms.term_id
INNER JOIN wp_term_relationships
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE (
taxonomy = 'post_tag'
OR taxonomy = 'category'
OR taxonomy = 'myCustomTax'
)
AND object_id = wp_posts.ID
AND wp_terms.name LIKE '%home%'
)
) AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'acf-disabled' OR wp_2_posts.post_status = 'future' OR wp_2_posts.post_status = 'draft' OR wp_2_posts.post_status = 'pending' OR wp_2_posts.post_status = 'private') ORDER BY wp_2_posts.menu_order ASC, wp_2_posts.post_title ASC made by WP_Posts_List_Table->prepare_items, wp_edit_posts_query, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query
[15-Nov-2018 17:40:18 UTC] WordPress database error Unknown column 'wp_posts.post_title' in 'where clause' for query SELECT wp_2_posts.ID, wp_2_posts.post_parent FROM wp_2_posts WHERE 1=1
AND (
(wp_posts.post_title LIKE '%home%')
OR (wp_posts.post_content LIKE '%home%')
OR EXISTS (
SELECT * FROM wp_postmeta
WHERE post_id = wp_posts.ID
AND ( (meta_key LIKE '%title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%sub_title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_short%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_long%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%xyz%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%myACF%' AND meta_value LIKE '%home%') )
)
OR EXISTS (
SELECT * FROM wp_comments
WHERE comment_post_ID = wp_posts.ID
AND comment_content LIKE '%home%'
)
OR EXISTS (
SELECT * FROM wp_terms
INNER JOIN wp_term_taxonomy
ON wp_term_taxonomy.term_id = wp_terms.term_id
INNER JOIN wp_term_relationships
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE (
taxonomy = 'post_tag'
OR taxonomy = 'category'
OR taxonomy = 'myCustomTax'
)
AND object_id = wp_posts.ID
AND wp_terms.name LIKE '%home%'
)
) AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'acf-disabled' OR wp_2_posts.post_status = 'future' OR wp_2_posts.post_status = 'draft' OR wp_2_posts.post_status = 'pending' OR wp_2_posts.post_status = 'private') ORDER BY wp_2_posts.menu_order ASC, wp_2_posts.post_title ASC made by WP_List_Table->display, WP_List_Table->display_tablenav, WP_Posts_List_Table->extra_tablenav, do_action('manage_posts_extra_tablenav'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPSEO_Link_Columns->count_objects, WPSEO_Link_Columns->set_count_objects, WP_Query->get_posts, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query
I'm not seeing errors pop up anywhere else on the site
Search form code:
<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="search-form">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 search-container">
<input type="search" id="input-s" name="s" placeholder="Search For:" />
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 submit-btn-container">
<input type="submit" value="Search"/>
</div>
</form>
Share
Improve this question
asked Nov 19, 2018 at 15:04
ChrisChris
211 silver badge4 bronze badges
2
- try turning off database / object cache in w3tc and see if that fixes it. – majick Commented Nov 19, 2018 at 15:11
- @majick that doesn't seem to work. – Chris Commented Nov 20, 2018 at 16:22
1 Answer
Reset to default 0Ok, well this is not exactly to do with subdirectories as such, but there is something mixing up the queries between the subsites...
As you can see the error is saying wp_posts.post_title is not found - because the table selected is actually FROM wp_2_posts... showing the different table prefixes for site 1 wp_ and site 2 wp_2_... so one will not be found within the other.
It could be the form action destination perhaps, try replacing home_url('/') with get_site_url(null, '/'), and hopefully the search form will post to the correct site. Not sure if that will fix it though.
Otherwise it could be a plugin that doesn't support multisite messing up the search query somehow by not using $wpdb->prefix instead of wp_ when creating the query. If that's the case try disabling any plugins that might be doing that...
I've created a multisite using subdirectories. The search function, both in backend and frontend, only works on the main site. If I try and do a search in a subdirectory it returns with "Nothing Found" even though I know the page/post exists.
In my debug.log I see this:
[15-Nov-2018 17:40:18 UTC] WordPress database error Unknown column 'wp_posts.post_title' in 'where clause' for query SELECT wp_2_posts.ID, wp_2_posts.post_parent FROM wp_2_posts WHERE 1=1
AND (
(wp_posts.post_title LIKE '%home%')
OR (wp_posts.post_content LIKE '%home%')
OR EXISTS (
SELECT * FROM wp_postmeta
WHERE post_id = wp_posts.ID
AND ( (meta_key LIKE '%title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%sub_title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_short%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_long%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%xyz%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%myACF%' AND meta_value LIKE '%home%') )
)
OR EXISTS (
SELECT * FROM wp_comments
WHERE comment_post_ID = wp_posts.ID
AND comment_content LIKE '%home%'
)
OR EXISTS (
SELECT * FROM wp_terms
INNER JOIN wp_term_taxonomy
ON wp_term_taxonomy.term_id = wp_terms.term_id
INNER JOIN wp_term_relationships
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE (
taxonomy = 'post_tag'
OR taxonomy = 'category'
OR taxonomy = 'myCustomTax'
)
AND object_id = wp_posts.ID
AND wp_terms.name LIKE '%home%'
)
) AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'acf-disabled' OR wp_2_posts.post_status = 'future' OR wp_2_posts.post_status = 'draft' OR wp_2_posts.post_status = 'pending' OR wp_2_posts.post_status = 'private') ORDER BY wp_2_posts.menu_order ASC, wp_2_posts.post_title ASC made by WP_Posts_List_Table->prepare_items, wp_edit_posts_query, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query
[15-Nov-2018 17:40:18 UTC] WordPress database error Unknown column 'wp_posts.post_title' in 'where clause' for query SELECT wp_2_posts.ID, wp_2_posts.post_parent FROM wp_2_posts WHERE 1=1
AND (
(wp_posts.post_title LIKE '%home%')
OR (wp_posts.post_content LIKE '%home%')
OR EXISTS (
SELECT * FROM wp_postmeta
WHERE post_id = wp_posts.ID
AND ( (meta_key LIKE '%title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%sub_title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_short%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_long%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%xyz%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%myACF%' AND meta_value LIKE '%home%') )
)
OR EXISTS (
SELECT * FROM wp_comments
WHERE comment_post_ID = wp_posts.ID
AND comment_content LIKE '%home%'
)
OR EXISTS (
SELECT * FROM wp_terms
INNER JOIN wp_term_taxonomy
ON wp_term_taxonomy.term_id = wp_terms.term_id
INNER JOIN wp_term_relationships
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE (
taxonomy = 'post_tag'
OR taxonomy = 'category'
OR taxonomy = 'myCustomTax'
)
AND object_id = wp_posts.ID
AND wp_terms.name LIKE '%home%'
)
) AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'acf-disabled' OR wp_2_posts.post_status = 'future' OR wp_2_posts.post_status = 'draft' OR wp_2_posts.post_status = 'pending' OR wp_2_posts.post_status = 'private') ORDER BY wp_2_posts.menu_order ASC, wp_2_posts.post_title ASC made by WP_List_Table->display, WP_List_Table->display_tablenav, WP_Posts_List_Table->extra_tablenav, do_action('manage_posts_extra_tablenav'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPSEO_Link_Columns->count_objects, WPSEO_Link_Columns->set_count_objects, WP_Query->get_posts, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query
I'm not seeing errors pop up anywhere else on the site
Search form code:
<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="search-form">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 search-container">
<input type="search" id="input-s" name="s" placeholder="Search For:" />
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 submit-btn-container">
<input type="submit" value="Search"/>
</div>
</form>
I've created a multisite using subdirectories. The search function, both in backend and frontend, only works on the main site. If I try and do a search in a subdirectory it returns with "Nothing Found" even though I know the page/post exists.
In my debug.log I see this:
[15-Nov-2018 17:40:18 UTC] WordPress database error Unknown column 'wp_posts.post_title' in 'where clause' for query SELECT wp_2_posts.ID, wp_2_posts.post_parent FROM wp_2_posts WHERE 1=1
AND (
(wp_posts.post_title LIKE '%home%')
OR (wp_posts.post_content LIKE '%home%')
OR EXISTS (
SELECT * FROM wp_postmeta
WHERE post_id = wp_posts.ID
AND ( (meta_key LIKE '%title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%sub_title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_short%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_long%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%xyz%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%myACF%' AND meta_value LIKE '%home%') )
)
OR EXISTS (
SELECT * FROM wp_comments
WHERE comment_post_ID = wp_posts.ID
AND comment_content LIKE '%home%'
)
OR EXISTS (
SELECT * FROM wp_terms
INNER JOIN wp_term_taxonomy
ON wp_term_taxonomy.term_id = wp_terms.term_id
INNER JOIN wp_term_relationships
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE (
taxonomy = 'post_tag'
OR taxonomy = 'category'
OR taxonomy = 'myCustomTax'
)
AND object_id = wp_posts.ID
AND wp_terms.name LIKE '%home%'
)
) AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'acf-disabled' OR wp_2_posts.post_status = 'future' OR wp_2_posts.post_status = 'draft' OR wp_2_posts.post_status = 'pending' OR wp_2_posts.post_status = 'private') ORDER BY wp_2_posts.menu_order ASC, wp_2_posts.post_title ASC made by WP_Posts_List_Table->prepare_items, wp_edit_posts_query, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query
[15-Nov-2018 17:40:18 UTC] WordPress database error Unknown column 'wp_posts.post_title' in 'where clause' for query SELECT wp_2_posts.ID, wp_2_posts.post_parent FROM wp_2_posts WHERE 1=1
AND (
(wp_posts.post_title LIKE '%home%')
OR (wp_posts.post_content LIKE '%home%')
OR EXISTS (
SELECT * FROM wp_postmeta
WHERE post_id = wp_posts.ID
AND ( (meta_key LIKE '%title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%sub_title%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_short%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%excerpt_long%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%xyz%' AND meta_value LIKE '%home%') OR (meta_key LIKE '%myACF%' AND meta_value LIKE '%home%') )
)
OR EXISTS (
SELECT * FROM wp_comments
WHERE comment_post_ID = wp_posts.ID
AND comment_content LIKE '%home%'
)
OR EXISTS (
SELECT * FROM wp_terms
INNER JOIN wp_term_taxonomy
ON wp_term_taxonomy.term_id = wp_terms.term_id
INNER JOIN wp_term_relationships
ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
WHERE (
taxonomy = 'post_tag'
OR taxonomy = 'category'
OR taxonomy = 'myCustomTax'
)
AND object_id = wp_posts.ID
AND wp_terms.name LIKE '%home%'
)
) AND wp_2_posts.post_type = 'page' AND (wp_2_posts.post_status = 'publish' OR wp_2_posts.post_status = 'acf-disabled' OR wp_2_posts.post_status = 'future' OR wp_2_posts.post_status = 'draft' OR wp_2_posts.post_status = 'pending' OR wp_2_posts.post_status = 'private') ORDER BY wp_2_posts.menu_order ASC, wp_2_posts.post_title ASC made by WP_List_Table->display, WP_List_Table->display_tablenav, WP_Posts_List_Table->extra_tablenav, do_action('manage_posts_extra_tablenav'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, WPSEO_Link_Columns->count_objects, WPSEO_Link_Columns->set_count_objects, WP_Query->get_posts, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query
I'm not seeing errors pop up anywhere else on the site
Search form code:
<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="search-form">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 search-container">
<input type="search" id="input-s" name="s" placeholder="Search For:" />
</div>
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 submit-btn-container">
<input type="submit" value="Search"/>
</div>
</form>
Share
Improve this question
asked Nov 19, 2018 at 15:04
ChrisChris
211 silver badge4 bronze badges
2
- try turning off database / object cache in w3tc and see if that fixes it. – majick Commented Nov 19, 2018 at 15:11
- @majick that doesn't seem to work. – Chris Commented Nov 20, 2018 at 16:22
1 Answer
Reset to default 0Ok, well this is not exactly to do with subdirectories as such, but there is something mixing up the queries between the subsites...
As you can see the error is saying wp_posts.post_title is not found - because the table selected is actually FROM wp_2_posts... showing the different table prefixes for site 1 wp_ and site 2 wp_2_... so one will not be found within the other.
It could be the form action destination perhaps, try replacing home_url('/') with get_site_url(null, '/'), and hopefully the search form will post to the correct site. Not sure if that will fix it though.
Otherwise it could be a plugin that doesn't support multisite messing up the search query somehow by not using $wpdb->prefix instead of wp_ when creating the query. If that's the case try disabling any plugins that might be doing that...
本文标签: multisiteSearch returns quotNothing Foundquot on a sub directory
版权声明:本文标题:multisite - Search returns "Nothing Found" on a sub directory 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749164139a2325888.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论