John Heenan Posted April 29, 2024 Report Posted April 29, 2024 With Blesta 5.10beta1, an incoming Webhook fails if the cache is used. The cache is incorrectly constructed. Following is a one line fix. Edit line in plugin file webhooks/models/webhook_events.php FROM 'file' => $file->getRealPath(), TO 'file' => (new ReflectionClass($class))->getFileName(), This inserts the correct file name for later use within the cache. The reason the workaround, which is to delete the cache, works is that when the cache is constructed the correct required file getsĀ included in order to construct the cache, along with many others, from usingĀ @include_once $file->getRealPath(); earlier. The $file variable is stale when used as above. Using reflection avoids having to construct an earlier mapping of each found Observer class to the file name it came from. Quote
John Heenan Posted April 29, 2024 Author Report Posted April 29, 2024 This fix, however, does not fix the issue of file present but uninstalled plugins having their events read and newly instralled plugins having to wait for the cache to be renewed for their events to be rrecognised. Cache renewal is forced with cache deleion. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.