Comments (6)
Fixed in 2.5.7
from oc-redirect-plugin.
Looks like this is still an issue after running the october:up
command as it clears the cache using the Cache facade Cache::flush()
and it looks like the cache:cleared
event doesn't get triggered when doing that. The cache:cleared event only gets dispatched when running the cache:clear command.
https://github.com/octobercms/october/blob/1.1/modules/system/classes/UpdateManager.php#L158
https://github.com/octobercms/october/blob/1.1/modules/system/helpers/Cache.php#L15-L19
from oc-redirect-plugin.
I thought I had it covered by just listen to a specific event... Will look for a better solution.
from oc-redirect-plugin.
Yeah, that's the first path I took when I was looking at making a fix for this issue as well which is why I landed on checking if the cache has the key before getting the rules. Not sure if there's a better way that you can think of that doesn't require checking the cache key exists every time.
from oc-redirect-plugin.
Something that could work is listening for the CommandFinished
event and if the command name is october:up
or winter:up
then publish the redirects.
Event::listen(CommandFinished::class, static function (CommandFinished $commandFinished): void {
if (in_array($commandFinished->command, ['october:up', 'winter:up'])) {
/** @var PublishManagerInterface $publishManager */
$publishManager = resolve(PublishManagerInterface::class);
$publishManager->publish();
}
});
from oc-redirect-plugin.
I'm sure that won't cover all the situations which can occur when the cache is empty/invalidated or emptied somewhere else. I did use your solution and I have added it to 2.5.8.
from oc-redirect-plugin.
Related Issues (20)
- Statistics-only plugin permission HOT 2
- Return value must be of type string, null returned HOT 6
- [OC-3.3] Error when reading Brand Settings HOT 1
- Uses PRIMARY_COLOR and SECONDARY_COLOR constants which were removed in OctoberCMS v3.3.7 HOT 2
- Query parameters lost when redirecting HOT 1
- 301 redirect with www and wihtout
- Not work with Rainlab.Page and child themes?
- Redirect statistics not loaded on first page display
- Redirect with trailing slash not working HOT 1
- Using Regex to redirect from Wordpress to post
- Feature request: Regular expression matches in target path HOT 2
- Not updating beyond 2.6 HOT 4
- Make this plugin compatible with WinterCMS HOT 2
- Error "Foreign key constraint incorrectly formed" when updating plugin HOT 2
- Conflict with Lovata.MightySeo
- Target field not loading properly on page load HOT 2
- Daily stats axis labels always show current month HOT 1
- Upgrading from Adrenth.Redirect to Vdlp.Redirect HOT 2
- Redirect HOT 1
- Target field not loading properly on page load HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oc-redirect-plugin.