Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matches a category with the same name from the wrong category group. #1530

Open
Patchyy opened this issue Oct 10, 2024 · 3 comments
Open

Matches a category with the same name from the wrong category group. #1530

Patchyy opened this issue Oct 10, 2024 · 3 comments
Labels

Comments

@Patchyy
Copy link

Patchyy commented Oct 10, 2024

Description

When using the Feed Me plugin to import data from Mercury, the configuration is set to match category fields from the Mercury data and import them into specific Craft entries. In our case, there were two category groups with categories that shared the same name.

For example:
Category Group A: "Vacancy Branch" includes a category named "Medical Devices."
Category Group B: "News Type" also has a category named "Medical Devices."
When the import was executed, instead of assigning the "Medical Devices" category from Vacancy Branch, it incorrectly assigned the one from News Type due to the identical category name.

Steps to reproduce

  1. Create two category groups in Craft CMS:
    -Category Group A (e.g., Vacancy Branch)
    -Category Group B (e.g., News Type)
  2. Add a category with the same name to both category groups (e.g., Medical Devices).
  3. Configure Feed Me to import categories from Mercury and match based on the category name.
  4. Set Feed Me to import into an entry, and specify that it should use categories from Vacancy Branch.
  5. Run the import.
  6. Observe that the category imported is from the wrong category group (i.e., it assigns "Medical Devices" from News Type instead of from Vacancy Branch).

Additional info

  • Craft version: Craft Pro 4.12.5
  • PHP version: 8.2.23
  • Database driver & version: MariaDB 10.6.19
  • Plugins & versions: Feed Me | 5.8.0
@Patchyy Patchyy added the bug label Oct 10, 2024
@Patchyy Patchyy changed the title Matches a categorie with the same name from the wrong categorie group. Matches a category with the same name from the wrong categorie group. Oct 10, 2024
@Patchyy Patchyy changed the title Matches a category with the same name from the wrong categorie group. Matches a category with the same name from the wrong category group. Oct 10, 2024
@JaneConvergine
Copy link

Hello,

We're encountering the same critical bug and would appreciate a prompt resolution.

When uploading data via Feedme, the plugin doesn't seem to respect the specified category group. Instead, it searches across all category groups and pulls in any entries with the same title.

Example:
The "Canada" tag appears in multiple groups:

  • Tags
  • Countries
  • Country of Exploration

However, Feedme pulls all instances of "Canada" across these groups instead of isolating them to the designated group.

Craft version: Craft Pro 5.4.9
PHP version: 8.2.22
Database driver & version: MySQL 8.0.36
Plugins & versions: Feed Me | 6.5.0

@i-just
Copy link
Contributor

i-just commented Oct 28, 2024

Hi, thanks for reaching out.

@Patchyy, can you please let me know if I got this right:

  • You are importing an entry, and that entry has a Categories field, which has a Source set to “Vacancy Branch” (in Control Panel > Settings > Fields > ).
  • On the Feed Me mapping page for this feed, you are mapping the Categories field to the category title, and “Data provided for this category is:” is set to “Title”.
  • When you run the import, the entry you just imported has the “Medical Devices” category in the Categories field, but it’s the “Medical Devices” from “News Type”, and it should be “Medical Devices” from “Vacancy Branch”?

@Patchyy
Copy link
Author

Patchyy commented Oct 31, 2024

Hi @i-just

Thank you for your reply.
Yes this is all correct. We try to match "subsector titles" from mercury with "vacancyJobBranches" with the import and "data provided for this category is" set to "title". But for some reason this always matches with news type so in the entry the data is not set correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants