Not a bug ErrorException: Fatal Error: Trait "Sabberworm\CSS\Position\Position" not found

stromb0li

Well-known member
Affected version
2.3.8
I just upgraded to XF 2.3.8 from XF 2.3.7. I'm seeing this error on severage pages now:

JSON:
ErrorException: Fatal Error: Trait "Sabberworm\CSS\Position\Position" not found
src/vendor/sabberworm/php-css-parser/src/CSSList/CSSList.php:35
Generated by: Unknown account
Jan 23, 2026 at 8:42 PM
Stack trace
#0 [internal function]: XF::handleFatalError()
#1 {main}

Request state
array(4) {
  ["url"] => string(18) "/register/register"
  ["referrer"] => string(25) "https://mydomain.com/register/"
  ["_GET"] => array(1) {
    ["/register/register"] => string(0) ""
  }
  ["_POST"] => array(17) {
    ["_xfToken"] => string(8) "********"
...

    ["_xfResponseType"] => string(4) "json"
    ["_xfWithData"] => string(1) "1"
    ["_xfRequestUri"] => string(10) "/register/"
  }
}
 
This error is not a XenForo 2.3.8 bug itself. It is caused by missing or incomplete vendor files after the upgrade.


The trait Sabberworm\CSS\Position\Position is part of the library sabberworm/php-css-parser, which is included inside the /src/vendor/ directory. If that trait cannot be found, it usually means the upgrade upload was incomplete or the vendor directory was not fully overwritten.


Recommended fix:


  1. Re-upload all XenForo 2.3.8 files, especially the entire /src/vendor/ directory, and overwrite existing files.
  2. Clear PHP opcode cache (restart PHP-FPM or Apache).
  3. Rebuild caches from the Admin CP.

In most cases, this happens when only /src/XF is uploaded instead of the full package, which causes dependency mismatches.


After fully re-uploading the vendor files, the error should be resolved.
 
Back
Top Bottom