Open plyusninva opened 5 years ago
@plyusninva This is issue seems to be happening to me as well on my staging environment, but not my dev environment (weird). So far after doing some debugging I can conclude that Event::listen('cms.page.beforeRenderPage',...) is never firing, which is why it is not registering the vendor dependency. I am also using Build 455.
I don't have time to figure out why Event::listen('cms.page.beforeRenderPage',...) isn't working in Plugin.php, but I found a temporary fix that makes the plugin work for now.
I changed the event listener in my boot function in Plugin.php to:
Event::listen('cms.page.beforeDisplay', function($controller, $page){
$twig = $controller->getTwig();
$twig->addExtension(new Extension(true));
});
This appears to fix the problem for now (html is minified correctly) until I figure out why the original Event::listen('cms.page.beforeRenderPage',...) listener isn't firing.
I don't have time to figure out why Event::listen('cms.page.beforeRenderPage',...) isn't working in Plugin.php, but I found a temporary fix that makes the plugin work for now.
I changed the event listener in my boot function in Plugin.php to:
Event::listen('cms.page.beforeDisplay', function($controller, $page){ $twig = $controller->getTwig(); $twig->addExtension(new Extension(true)); });
This appears to fix the problem for now (html is minified correctly) until I figure out why the original Event::listen('cms.page.beforeRenderPage',...) listener isn't firing.
It doesn't work for me. Have you found the origin of problem?
October Build 455 {% htmlcompress %} ... {% endhtmlcompress %} - Unknown "htmlcompress" tag. {{ content|markdown|htmlcompress }} - Unknown "htmlcompress" filter. {{ htmlcompress('some html') }} - Unknown "htmlcompress" function.