Open mtwalsh opened 10 months ago
I did try backtracking some updates to no avail so ended up resolving the issue by upgrading to Craft 4 and moving to another server environment with PHP8. It's possible there may still be an issue here with dynamic S3 folders via the entry {slug}
.
I ran into this exact issue as well — also Craft 3.9.10
, with an S3 volume and a restricted upload path of {slug}
.
@brandonkelly wanna re-open this one, or should I start a new thread?
@michaelrog Craft 3 is only getting security fixes at this point.
I ended up having to abandon the whole dynamic asset location approach (containing {slug}
) altogether as even after upgrading to Craft 4 the original problem above still persisted.
@mtwalsh Ah ok, thanks for the clarification. I thought you were saying the Craft 4 upgrade resolved it, since you closed the issue.
Sorry @brandonkelly, that's exactly what I thought had happened - it was fixed with the Craft 4 upgrade. But then it cropped up again and as I still only had the issue in production (load-balanced AWS) and it was preventing our client from getting things published on their site I had to act quickly and just take an different approach rather than get to the bottom it. I can't say we use dynamic asset locations with S3 on many projects at all so wondered if it might just be safer to abandon that approach.
I did hint there may still be unfinished business!
It's possible there may still be an issue here with dynamic S3 folders via the entry
{slug}
But I didn't want anyone to invest time looking into something that might just be related to our particular hosting setup, but now someone else has hit the same issue maybe it's not just us!
Happy to help, if I can.
fwiw, in our case, this error appears on initial creation. If we immediately refresh the edit page, everything loads fine. Could just be that the slug
variable isn't initialized yet by the time _findFolder()
needs it?
@michaelrog Yes, same here initial creation but if memory serves, we had issues thereafter on save as well - or at least the images didn't make it to where they should have.
What happened?
Description
Just updated a Craft CMS 3 site to
3.9.5
and now getting this error when trying to create a new entry:FWIW the entry type does have a couple of asset fields, which "Restrict assets to a single folder" on Amazon S3 and that asset location does contain
{slug}
(I wonder if that might be of importance).I can create new entries in other sections without any problems.
The only slightly awkward point is that I can't reproduce this issue locally, only in production, which is unusual. But given this site isn't under active development and the Craft CMS upgrade is the only change that's been made (this was working just fine a few days ago) I'm a little out of ideas!
Steps to reproduce
Stack trace
Craft CMS version
3.9.5
PHP version
7.3.33
Operating system and version
Ubuntu 20.04
Database type and version
MySQL 5.7
Image driver and version
No response
Installed plugins and versions