putyourlightson / craft-blitz

Intelligent static page caching for creating lightning-fast sites with Craft CMS.
https://putyourlightson.com/plugins/blitz
Other
147 stars 35 forks source link

Multiple sites (languages) and disabling entries from another site doesn't clear cache. #631

Closed Gnative closed 3 months ago

Gnative commented 4 months ago

Bug Report

I'm finding an issue where entries are not being cleared from cache or remote deployments in multiple site (language) structures.

I tested this in a clean installation of Craft and Blitz Cache and set up sites for EN (english) and DE (German)

When I create an entry this automatically creates the entries for the other languages and associated cache files when saved.

Screenshot 2024-03-07 at 12 50 58

If I then open the EN entry and decide to disable the DE entry, from with in the EN entry, this does not clear the cache for that DE entry as would be expected.

Screenshot 2024-03-07 at 12 51 10

The same same problem exists for enabling a DE entry, that was previously disabled, from with in an EN entry. The entries cache file is not created.

Plugin Version

4.12.2

Craft CMS Version

4.8.1

PHP Version

8.2.0

Gnative commented 4 months ago

Found that with a remote deployment set up this can leave "ghost" pages in the repo that are not cleared if the entry has been disabled when regenerating and redeploying the cache from the Blitz Utility panel.

Think the only way to fix this would be to first manually clear out all file in the repo and then regenerate and redeploy.

bencroker commented 4 months ago

Thanks for reporting this! Propagating elements were being excluded from the refresh cache process. I’ve changed that behaviour in the bugfix/refresh-propagating-elements branch.

Please test this by running composer require "putyourlightson/craft-blitz:dev-bugfix/refresh-propagating-elements as 4.12.3".

Gnative commented 3 months ago

Hi @bencroker thanks for looking at this.. yes it looks to be working in my testing.

bencroker commented 3 months ago

Great, thanks for testing! Changed in https://github.com/putyourlightson/craft-blitz/commit/23ab0b92fe510abc87233d8a001b6cc7d2627456 and released in 4.13.0