EvalMath not found

Created on 20 March 2023, over 1 year ago
Updated 27 March 2023, over 1 year ago

Problem

After Installing the Module via "/admin/modules/install" I was able to add it to a view of mine "studenten_noten". After adding the formula to calculate the final grade I get this error in my error.log:

Got error 'PHP message: Error: Class 'Andileco\\Util\\EvalMath\\EvalMath' not found in /var/www/clients/client1/web1/web/modules/views_simple_math_field/src/Plugin/views/field/SimpleMathField.php on line 471 #0 /var/www/clients/client1/web1/web/core/modules/views/src/Plugin/views/field/NumericField.php(152): Drupal\\views_simple_math_field\\Plugin\\views\\field\\SimpleMathField->getValue()\n#1 /var/www/clients/client1/web1/web/core/modules/views/src/Plugin/views/field/FieldPluginBase.php(1159): Drupal\\views\\Plugin\\views\\field\\NumericField->render()\n#2 /var/www/clients/client1/web1/web/core/modules/views/views.theme.inc(238): Drupal\\views\\Plugin\\views\\field\\FieldPluginBase->advancedRender()\n#3 [internal function]: template_preprocess_views_view_field()\n#4 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array()\n#5 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\\Core\\Theme\\ThemeManager->render()\n#6 /var/www/clients/client1/web1/we...', referer: [...]/admin/structure/views/view/studenten_noten

I have tried to add "EvalMath" (downloaded from GitHub version 3.0.1) to the libraries folder:

libraries/Andileco/EvalMath
and
libraries/EvalMath

cleared cache both times but sadly this did not work.

Used Versions:

Drupal 9.5.5
PHP 7.4.33
Views Simple Math Field 3.0.1

Kind Regards,

Michael

πŸ’¬ Support request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany ed-media

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ed-media
  • πŸ‡ΊπŸ‡ΈUnited States andileco

    Hi @ed-media, the library should go here: vendor/andileco/eval-math.

  • πŸ‡©πŸ‡ͺGermany ed-media

    Hi @andileco, I moved the lib to the provided path but sadly it does not work.

    I still get:

    Got error 'PHP message: Error: Class 'Andileco\\Util\\EvalMath\\EvalMath' not found in /var/www/clients/client1/web1/web/modules/views_simple_math_field/src/Plugin/views/field/SimpleMathField.php on line 471 #0 /var/www/clients/client1/web1/web/core/modules/views/src/Plugin/views/field/NumericField.php(152): Drupal\\views_simple_math_field\\Plugin\\views\\field\\SimpleMathField->getValue()\n#1 /var/www/clients/client1/web1/web/core/modules/views/src/Plugin/views/field/FieldPluginBase.php(1159): Drupal\\views\\Plugin\\views\\field\\NumericField->render()\n#2 /var/www/clients/client1/web1/web/core/modules/views/views.theme.inc(238): Drupal\\views\\Plugin\\views\\field\\FieldPluginBase->advancedRender()\n#3 [internal function]: template_preprocess_views_view_field()\n#4 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): call_user_func_array()\n#5 /var/www/clients/client1/web1/web/core/lib/Drupal/Core/Render/Renderer.php(433): Drupal\\Core\\Theme\\ThemeManager->render()\n#6 /var/www/clients/client1/web1/we...', referer: [...]/admin/structure/views/view/studenten_noten

    Even if I only use one variable i.e.:

    @field_modul_1

    It does not work. I can see the "SIMPLE MATH FIELD" in my table but as soon as I hit save on the view the table will not load in the preview anymore. Furthermore it looks like that the name I gave "Gesamt Note" does not apply as it only shows up as "SIMPLE MATH FIELD" in the preview.

    I'm going to try version 8.x-2.0-beta2 and see if that works. Maybe it's because I'm not running PHP 8 yet?

  • πŸ‡©πŸ‡ͺGermany ed-media

    So I updated the server to:

    PHP 8.1.7
    Drupal 9.5.7

    Sadly I'm still getting the same error.

    I've also tried to move files within in the vendor/andileco/eval-math path i.e. move the "eval-math/src" content one folder back into "eval-math" but that also did not work.

Production build 0.71.5 2024