Closed studiovlijmscherp closed 1 year ago
I can confirm this issue. Changes on localized content won't be added via git add
. Only the main locales will be recognized.
Our recent workaround is to add git add .
in the commands_after
array in the spock.yaml
. That works, but also triggers a git error if changes were made to not localized content and everything was added through spock, because git tries to commit no changes. Leaving it alone leads to merging issues because edited content isn't pushed back intot the repository which is a huge issue if you have to rely on a functioning git/spock workflow for your deployments.
This should be fixed in the next Statamic update @goldnead @studiovlijmscherp 🤘
Does the 'fix' in v2.11.4 (Localized paths get used in DataSaved events) fix the issue?
Should yes! Closing, but feel free to re-open if anything is still wonky with localization.
Using Spock 2.2.1 and Statamic 2.11.6 with three locales (EN - Primary, SE, FI) it still doesn't seem to work unfortunately, wether on a local staging environment nor on a DI droplet.
Here's an excerpt from the log files:
[2019-01-17 10:07:29] production.ERROR: Spock command exited unsuccessfully: Command: git add /Users/MacBook/Apps/Statamic/site/content/pages/index.md Output: No output Error: fatal: /Users/MacBook/Apps/Statamic/site/content/pages/index.md: '/Users/MacBook/Apps/Statamic/site/content/pages/index.md' is outside repository [2019-01-17 10:07:29] production.ERROR: Spock command exited unsuccessfully: Command: git add /Users/MacBook/Apps/Statamic/site/content/pages/se.index.md Output: No output Error: fatal: /Users/MacBook/Apps/Statamic/site/content/pages/se.index.md: '/Users/MacBook/Apps/Statamic/site/content/pages/se.index.md' is outside repository [2019-01-17 10:07:29] production.ERROR: Spock command exited unsuccessfully: Command: git add /Users/MacBook/Apps/Statamic/site/content/pages/fi.index.md Output: No output Error: fatal: /Users/MacBook/Apps/Statamic/site/content/pages/fi.index.md: '/Users/MacBook/Apps/Statamic/site/content/pages/fi.index.md' is outside repository
Any idea how this can be solved? Thanks!
Are those paths correct?
Yes, they seem to be correct as far as I can tell. I tried using Spock and Statamic about two weeks ago with just one language and back then it worked perfectly fine. The multi-locale setup seems to have problems though.
Yeah, I think ours is still haven't problems with multi-locale stuff, also.
@Indiku @jasonvarga Any word on a fix for this? We are seeing this too on Spock 2.2.1
and Statamic 2.11.3
(also, I wonder if we should re-open this, since it still seems to be a bug?)
When creating or updating localized content, Spock doesn't run
Git Add
. (Git status
does display the changes).Other content, fieldset-updates, etc. are added, committed and pushed as they should.
Using Statamic v2.11.3 Spock v2.1.0
Primary locale is set to 'NL'. Secondary locale is 'EN'.