← All changes
|
class/Common/Importer/Mapper/AttachmentMapper.php
+2
-2
2.14.23
→
2.15.0
View file →
| @@ -83,9 +83,9 @@ | ||
| 83 | 83 | |
| 84 | 84 | // check all groups for a unique value |
| 85 | 85 | $unique_value = $this->find_unique_field_in_data($data, $field); |
| 86 | 86 | |
| 87 | - if (!empty($unique_value)) { | |
| 87 | + if ($this->has_identifier_value($unique_value)) { | |
| 88 | 88 | $has_unique_field = true; |
| 89 | 89 | |
| 90 | 90 | if (in_array($field, $this->_post_fields, true)) { |
| 91 | 91 | |
| @@ -114,9 +114,9 @@ | ||
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | if (!$has_unique_field) { |
| 118 | - throw new MapperException(__("No Unique fields present.", 'jc-importer')); | |
| 118 | + throw new MapperException(__('No unique identifier value present. Check that Permissions has a unique identifier set and this row has a non-empty value. File column references are stored as _iwp_ref_uid.', 'jc-importer')); | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | if (!empty($meta_args)) { |
| 122 | 122 | $query_args['meta_query'] = $meta_args; |