craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.22k stars 626 forks source link

interessant Archie on image asset cache with reinstall #1397

Closed narration-sd closed 7 years ago

narration-sd commented 7 years ago

Description

When I reinstall (copying in via rsync) Craft fresh, with prior db reinstated, and with only the basic images in resources (no _transform folders), transformed images are missing for the site.

With much experimentation including validation it's following my volumes.php comfig, I'm at the point where it takes (only and both) of these to get Craft to rebuild the transformed versions, thus show them.

I don't see that this should be necessary; and/or I need a way to do it that is scriptable -- probably craft app commandline in that case. But really this feels a good percentage bug so far in C3-beta4, in that no-one can just put up a site say from staging to public, without CP manual intervention.

Wonder what you are thinking, or are we just not there in progress?

Steps to reproduce

  1. as above. fresh build is via Docker and Ansible, hence the rsync of entire site folder/s which cleans out any Craft-built folders like the asset transform one. You'd want all that to be fresh on a deploy, right?

Additional info

PHP version 7.0.10 Database driver & version MySQL 10.1.18-MariaDB Image driver & version GD 7.0.16 Craft edition & version Craft Personal 3.0.0-beta.4 Yii version 2.0.11.1 Twig version 2.1.0 Guzzle version 6.2.1 Imagine version 0.7-dev

Plugins

Trimmer 1.0.0 Bactrian 1.0.0 Standards Agent 2.0.1

andris-sevcenko commented 7 years ago

Eh. It's actually working exactly as it should. You're not copying the transforms and yet you are copying the table in the database that assures Craft that they are all there (assettransformindex), the purpose of which is to eliminate potentially costly unneeded requests to make sure that transforms are generated.

I'd say either you copy the transforms or truncate the table in the database.