Closed stuartcusackie closed 9 months ago
Is that collection set to "allow" that locale?
It is indeed. I have also tried allowing all sites on the collection and generating localizations using the Entry->makeLocalisation()
function, but I end up with similar errors.
Think I've stumbled onto the root of the problem. If I vagrant ssh to my homestead box first (Windows) before running my artisan command, then the error does not occur. I've updated the issue with a temporary solution above.
I haven't used Homestead in a few years but I do remember having issues w/ Laravel here and there when running commands outside of the box vs inside with SSH. Although, can't remember any specifics.
Since this issue is quite old now, hasn't had any recent activity and we haven't heard from others running into the same issue, I'm going to close this issue.
If you're still running into this issue with Homestead, let us know and we can look at re-opening.
Bug Description
I am creating entries via an artisan console command using the entry facade. It's for a scheduled task that pulls posts from an external source periodically.
It works fine and entries are created for the 'ie' locale. The problem is that every time view the dashboard, or each time I re-run the command I get these errors:
Error 1: (occurs on second call of my function)
Error 2: (occurs on third call of my function - I can't get past this error without wiping the entire cache)
Temporary Solution
It seems I've run into a similar before: https://github.com/statamic/cms/issues/3175
php artisan cache:clear
fixes the problem locally and for some reason the problem hasn't presented on a staging domain. Is this something to do with running my artisan command outside of the vagrant box I wonder...Yes, it seems doing a
vagrant ssh
before running my command fixes it. Now why is that?? Is cached data being incorrectly created when running directly from my Operating System - Possible Windows filesystem conflict??Other Clues
User::all()->first()->id()
- Suggesting that I don't have any users, but this only happens one in every ten calls.Environment
Statamic version: 3.1.29 PHP version: 7.4 Install method (choose one): Existing Laravel app OS: Windows 10