Hi, I’m getting a PHP error only on server side. Is just Sage 9 (no Trellis/Bedrock this time).
It seems that class FieldsBuilder
was not found, despite use StoutLogic\AcfBuilder\FieldsBuilder
at the top of the file.
This is the complete warning (note in #7 that line 16 of /app/fields/options.php
is causing the error)
**Fatal error** : Uncaught Error: Class 'StoutLogic\AcfBuilder\FieldsBuilder' not found in /var/www/vhosts/x-madrid.site/httpdocs/wp-content/themes/xmadrid/app/fields/options.php:16
Stack trace:
#0 /var/www/vhosts/x-madrid.site/httpdocs/wp-content/themes/xmadrid/app/setup.php(141): require_once()
#1 [internal function]: App\{closure}('/var/www/vhosts...', 0)
#2 /var/www/vhosts/x-madrid.site/httpdocs/wp-content/themes/xmadrid/vendor/illuminate/support/Collection.php(932): array_map(Object(Closure), Array, Array)
#3 /var/www/vhosts/x-madrid.site/httpdocs/wp-content/themes/xmadrid/app/setup.php(142): Illuminate\Support\Collection->map(Object(Closure))
#4 /var/www/vhosts/x-madrid.site/httpdocs/wp-includes/class-wp-hook.php(286): App\{closure}('')
#5 /var/www/vhosts/x-madrid.site/httpdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#6 /var/www/vhosts/x-madrid.site/httpdocs/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#7 /var/www/vhosts/x-madrid.site/httpdocs/wp-settings.php(525): do_action('ini in **/var/www/vhosts/x-madrid.site/httpdocs/wp-content/themes/xmadrid/app/fields/options.php** on line **16**
So, the new
object constructor doesn’t find the class. This is the line in context:
What could be the cause of the error? Why does it happen only on the server side? (the theme is identical locally and on the server).
I have no much PHP skills. Any help appreciated!