| @@ -871,8 +871,17 @@ | ||
| 871 | 871 | // intended set for the context — types missing from it were removed |
| 872 | 872 | // deliberately and must come off the page (#464). |
| 873 | 873 | $options['authoritative'] = true; |
| 874 | 874 | |
| 875 | + // A skipped entry was sent, so the user still wants it on the page; | |
| 876 | + // it only failed validation. Retiring it as "missing from the | |
| 877 | + // payload" took a live Organization down behind a success toast | |
| 878 | + // (#949) — leave whatever is deployed for it in place. | |
| 879 | + $options['retain_types'] = array_values(array_unique(array_merge( | |
| 880 | + wp_list_pluck($skipped_schemas, 'key'), | |
| 881 | + wp_list_pluck($skipped_schemas, 'type') | |
| 882 | + ))); | |
| 883 | + | |
| 875 | 884 | // Deploy schema markup with sanitized data |
| 876 | 885 | $deployment_results = $this->schema_manager->deploy_schema_markup( |
| 877 | 886 | $context_type, |
| 878 | 887 | $context_id, |
| @@ -889,8 +898,9 @@ | ||
| 889 | 898 | // Report what was skipped so the UI can say "3 deployed, 1 skipped" |
| 890 | 899 | // rather than silently dropping entries (#468). |
| 891 | 900 | if (!empty($skipped_schemas)) { |
| 892 | 901 | $response['skipped'] = $skipped_schemas; |
| 902 | + $response['partial'] = true; | |
| 893 | 903 | $response['message'] = sprintf( |
| 894 | 904 | /* translators: 1: number deployed, 2: number skipped. */ |
| 895 | 905 | __('Deployed %1$d schema(s); skipped %2$d that failed validation.', 'thinkrank'), |
| 896 | 906 | count($sanitized_schema_data), |