[horde] Horde 6 - Inline HTML error

Ralf Lang ralf.lang at gmail.com
Tue Apr 7 06:56:17 UTC 2026


Hi Nels,

feat: Support Sabberworm CSS Parser 9.3 / PHP 8.5 for modern interface by
ralflang · Pull Request #7 · horde/Css_Parser
<https://github.com/horde/Css_Parser/pull/7>

Those who dare can test drive this yet unreleased version of
horde/css_parser which works with Sabberworm 9 / PHP 8.5 natively.
I don't feel confident yet and will need to do some of my own testing or
wait for PR feedback.

On Mon, Apr 6, 2026 at 11:32 PM Nels Lindquist <nlindq at maei.ca> wrote:

> Okay; got it working, but it was a bit of an effort.
>
> I had:
>
> horde/css_parser             2.0.0beta5   CSS parser library
> horde/cssminify              2.0.0beta6   CSS minification library
>
> Upgrading did nothing initially.
>
> I tried installing sabberworm/php-css-parser, which gave me version
> 9.3.0, and the entire site stopped loading, with different errors:
>
> PHP Fatal error:  Class Sabberworm\CSS\Property\Declaration contains 1
> abstract method and must therefore be declared abstract or implement the
> remaining method (Sabberworm\CSS\Renderable::__toString) in
> /var/www/html/horde6/vendor/sabberworm/php-css-parser/src/Property/Decla
> ration.php on line 27
> Stack trace:
> #0 /var/www/html/horde6/vendor/composer/ClassLoader.php(576): include()
> #1 /var/www/html/horde6/vendor/composer/ClassLoader.php(427):
> {closure:Composer\Autoload\ClassLoader::initializeIncludeClosure():575}()
> #2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
> #3
> /var/www/html/horde6/vendor/thecodingmachine/safe/generated/8.1/classobj.php(17):
>
> class_alias()
> #4
> /var/www/html/horde6/vendor/sabberworm/php-css-parser/src/Rule/Rule.php(16):
>
> Safe\class_alias()
> #5 /var/www/html/horde6/vendor/composer/autoload_real.php(45):
> require('...')
> #6 /var/www/html/horde6/vendor/composer/autoload_real.php(49):
>
> {closure:ComposerAutoloaderInit40e1abd60ba24c0f96585851b5c9f552::getLoader():41}()
> #7 /var/www/html/horde6/vendor/autoload.php(22):
> ComposerAutoloaderInit40e1abd60ba24c0f96585851b5c9f552::getLoader()
> #8 /var/www/html/horde6/web/horde/services/ajax.php(2): require_once('...')
> #9 {main}
>
> I tried force installing horde_cssparser:2.0.0beta6, but it explicitly
> requires sabberworm/php-css-parser:8.9.0, which it didn't want to
> install on PHP 8.5.
>
> Adding the --ignore-platform-reqs flag for composer bypassed the PHP
> version limitation and I ended up with the same versions you've got.
>
> It seems to be running fine on PHP 8.5, and I'm no longer getting errors
> when loading inline HTML.
>
> --
> Nels Lindquist
> nlindq at maei.ca
>
> On 2026-04-06 1:30 PM, Brent wrote:
> >   It appears you have an older css parser or something.  Here's my
> > configuration that is working with the same mime local file to enable
> > html viewing.
> >
> > $ composer show|grep css
> > horde/css_parser             2.0.0beta6   CSS parser library
> > horde/cssminify              2.0.0beta6   CSS minification library
> > sabberworm/php-css-parser    8.9.0        Parser for CSS Files written
> > in PHP
> >
> > Enable the test.php script and see if it finds anything. Ralph and the
> > team have put a lot more helpful debugging information into it and maybe
> > it'll help isolate the issue.
> >
> > brent
> >
> > Quoting Nels Lindquist <nlindq at maei.ca>:
> >
> >> PHP 8.5 FPM.
> >> Latest H6 updated this morning.
> >>
> >> I enabled inline HTML in IMP, by setting:
> >>
> >>> $mime_drivers['html']['inline'] = true;
> >>
> >> in var/config/imp/mime_drivers.local.php.
> >>
> >> After doing so, I'm now receiving an error when attempting to view
> >> mail messages with HTML:
> >>
> >> [imp] Error: Call to undefined method
> >> Horde\Css\Parser\Parser::keepOnlyDangerousCss() in
> >> /var/www/html/horde6/vendor/horde/imp/lib/Mime/Viewer/Html.php:617
> >>
> >> Stack trace:
> >> #0
> >> /var/www/html/horde6/vendor/horde/imp/lib/Mime/Viewer/Html.php(558):
> >> IMP_Mime_Viewer_Html->_parseCss()
> >> #1
> >> /var/www/html/horde6/vendor/horde/imp/lib/Mime/Viewer/Html.php(166):
> >> IMP_Mime_Viewer_Html->_processDomDocument()
> >> #2 /var/www/html/horde6/vendor/horde/imp/lib/Mime/Viewer/Html.php(76):
> >> IMP_Mime_Viewer_Html->_IMPrender()
> >> #3
> >>
> /var/www/html/horde6/vendor/horde/mime_viewer/lib/Horde/Mime/Viewer/Base.php(157):
> IMP_Mime_Viewer_Html->_renderInline()
> >> #4 /var/www/html/horde6/vendor/horde/imp/lib/Contents.php(665):
> >> Horde_Mime_Viewer_Base->render()
> >> #5
> >>
> /var/www/html/horde6/vendor/horde/imp/lib/Mime/Viewer/Alternative.php(137):
> IMP_Contents->renderMIMEPart()
> >> #6
> >>
> /var/www/html/horde6/vendor/horde/imp/lib/Mime/Viewer/Alternative.php(55):
> IMP_Mime_Viewer_Alternative->_IMPrender()
> >> #7
> >>
> /var/www/html/horde6/vendor/horde/mime_viewer/lib/Horde/Mime/Viewer/Base.php(157):
> IMP_Mime_Viewer_Alternative->_renderInline()
> >> #8 /var/www/html/horde6/vendor/horde/imp/lib/Contents.php(665):
> >> Horde_Mime_Viewer_Base->render()
> >> #9
> >> /var/www/html/horde6/vendor/horde/imp/lib/Contents/Message.php(594):
> >> IMP_Contents->renderMIMEPart()
> >> #10
> >> /var/www/html/horde6/vendor/horde/imp/lib/Contents/Message.php(336):
> >> IMP_Contents_Message->_getInlineOutput()
> >> #11
> >> /var/www/html/horde6/vendor/horde/imp/lib/Contents/Message.php(176):
> >> IMP_Contents_Message->getInlineOutput()
> >> #12 /var/www/html/horde6/vendor/horde/imp/lib/Ajax/Queue.php(462):
> >> IMP_Contents_Message->showMessage()
> >> #13
> >>
> /var/www/html/horde6/vendor/horde/imp/lib/Ajax/Application/Handler/Common.php(702):
> IMP_Ajax_Queue->message()
> >> #14
> >>
> /var/www/html/horde6/vendor/horde/core/lib/Horde/Core/Ajax/Application.php(179):
> IMP_Ajax_Application_Handler_Common->showMessage()
> >> #15 /var/www/html/horde6/vendor/horde/horde/services/ajax.php(64):
> >> Horde_Core_Ajax_Application->doAction()
> >> #16 /var/www/html/horde6/web/horde/services/ajax.php(3):
> >> require_once('...')
> >> #17 {main} [pid 536324 on line 76 of
> >> "/var/www/html/horde6/vendor/horde/core/lib/Horde/ErrorHandler.php"]
> >>
> >> --
> >> Nels Lindquist
> >> nlindq at maei.ca
> >> --
> >> Horde mailing list
> >> Frequently Asked Questions: http://horde.org/faq/To unsubscribe, mail:
> >> horde-unsubscribe at lists.horde.org
>
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>


More information about the horde mailing list