Fix BUG-001 and BUG-002; add post-submission QA test plan and QA entry
BUG-001: cache-on-save plugin clears page cache on onFormProcessed so new entries appear in the tracker feed immediately after submission. BUG-002: disabled Twig template cache (twig.cache: false) so theme file changes take effect without a manual cache flush. Also adds bugs-and-fixes.md, corrects TC-P test URLs (.entry suffix), fixes TC-P.1 expectation (inline login form, not a redirect), and creates the QA test entry for automated scenario verification. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace Grav\Plugin;
|
||||
|
||||
use Grav\Common\Plugin;
|
||||
use RocketTheme\Toolbox\Event\Event;
|
||||
|
||||
class CacheOnSavePlugin extends Plugin
|
||||
{
|
||||
public static function getSubscribedEvents(): array
|
||||
{
|
||||
return [
|
||||
'onFormProcessed' => ['onFormProcessed', 0],
|
||||
];
|
||||
}
|
||||
|
||||
public function onFormProcessed(Event $event): void
|
||||
{
|
||||
$form = $event['form'];
|
||||
if (!$form) {
|
||||
return;
|
||||
}
|
||||
if ($form->getName() === 'new-entry') {
|
||||
$this->grav['cache']->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
enabled: true
|
||||
Reference in New Issue
Block a user