PluginProbe
MxChat – AI Chatbot & Content Generation for WordPress / 3.2.23
MxChat – AI Chatbot & Content Generation for WordPress v3.2.23
3.2.25 3.2.24 3.2.23 3.2.22 3.2.21 3.2.20 3.2.19 3.2.18 3.2.17 3.2.16 3.2.15 3.2.14 3.2.12 3.2.13 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 3.2.6 3.2.5 3.2.4 3.2.3 3.2.2 3.2.1 All 156 releases
← All changes | includes/class-mxchat-admin.php +13 -0 3.2.22 → 3.2.23 View file →
@@ -1011,8 +1011,21 @@
1011 1011 if (function_exists('add_settings_error')) {
1012 1012 add_settings_error('mxchat_pinecone_addon_options', 'mxchat_pinecone_docs_unverified', __('The document index host has not been checked, so the index type stayed on Vector index. Click Check index (or Create index for me) and save again.', 'mxchat'));
1013 1013 }
1014 1014 }
1015 + // 3e83e4: never point the live chatbot at a document index whose copy is
1016 + // still running — the save keeps the previous type unless the owner
1017 + // ticked Switch anyway. Only a vector → document switch is gated.
1018 + $existing_type = (($existing['mxchat_pinecone_index_type'] ?? 'vector') === 'document') ? 'document' : 'vector';
1019 + if ($index_type === 'document' && $existing_type !== 'document' && class_exists('MxChat_Pinecone_Documents') && empty($input['mxchat_pinecone_docs_switch_anyway'])) {
1020 + $running = MxChat_Pinecone_Documents::migration_blocks_switch($host_for_check);
1021 + if ($running !== null) {
1022 + $index_type = 'vector';
1023 + if (function_exists('add_settings_error')) {
1024 + add_settings_error('mxchat_pinecone_addon_options', 'mxchat_pinecone_docs_copy_running', MxChat_Pinecone_Documents::switch_blocked_message($running));
1025 + }
1026 + }
1027 + }
1015 1028 $sanitized['mxchat_pinecone_index_type'] = $index_type;
1016 1029 $sanitized['mxchat_pinecone_docs_verified_host'] = $verified_host;
1017 1030 $vector_host = str_replace(['https://', 'http://'], '', sanitize_text_field($input['mxchat_pinecone_vector_host'] ?? ($existing['mxchat_pinecone_vector_host'] ?? '')));
1018 1031 $sanitized['mxchat_pinecone_vector_host'] = trim($vector_host, '/');