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

Fix term paths when saving #2685

Closed
wants to merge 2 commits into from
Closed

Fix term paths when saving #2685

wants to merge 2 commits into from

Conversation

jasonvarga
Copy link
Member

The paths in the taxonomy terms store are different from every other store in the Stache. They paths are prefixed with the locale. This is because terms are the only items that have all their localizations in one file.

[
  'en::tag-one' => 'en::/path/to/tag-one.yaml',
  'fr::tag-one' => 'fr::/path/to/tag-one.yaml',
]

We do this so if we were to flip the array (to get an ID by path) it wouldn't get merged.

When saving a term, it was just storing the path. It wasn't prefixing it with the locale which is why there was an error sometimes. It was trying to explode the path at the :: but it wasn't there.

Fixes #2020

@jasonvarga jasonvarga closed this Oct 19, 2020
@jasonvarga jasonvarga mentioned this pull request Oct 19, 2020
@jasonvarga jasonvarga deleted the fix/term-saving-paths branch November 19, 2020 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Term::make() inconsistently results in ErrorException Undefined offset: 1
1 participant