Call to undefined function Drupal\event_log_track_config\EventSubscriber\event_log_track_insert()

Created on 23 March 2023, over 1 year ago
Updated 24 March 2023, over 1 year ago

Problem/Motivation

Error trying to install the submodule. This example was installing the event_log_track_user module.

 [error]  Error: Call to undefined function Drupal\event_log_track_config\EventSubscriber\event_log_track_insert() in Drupal\event_log_track_config\EventSubscriber\EventLogTrackConfigSubscriber->configSave() (line 56 of /var/www/web/modules/contrib/events_log_track/modules/event_log_track_config/src/EventSubscriber/EventLogTrackConfigSubscriber.php) #0 [internal function]: Drupal\event_log_track_config\EventSubscriber\EventLogTrackConfigSubscriber->configSave(Object(Drupal\Core\Config\ConfigCrudEvent), 'config.save', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#1 /var/www/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Drupal\Core\Config\ConfigCrudEvent), 'config.save', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#2 /var/www/web/core/lib/Drupal/Core/Config/Config.php(229): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\Core\Config\ConfigCrudEvent), 'config.save')
#3 /var/www/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php(206): Drupal\Core\Config\Config->save(true)
#4 /var/www/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, true)
#5 /var/www/vendor/drush/drush/src/Drupal/Commands/pm/PmCommands.php(94): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, true)
#6 [internal function]: Drush\Drupal\Commands\pm\PmCommands->install(Array, Array)
#7 /var/www/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#8 /var/www/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#9 /var/www/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#10 /var/www/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(390): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#11 /var/www/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/vendor/symfony/console/Application.php(1039): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/vendor/drush/drush/drush.php(77): Drush\Runtime\Runtime->run(Array)
#18 /var/www/vendor/drush/drush/includes/preflight.inc(18): require('/var/www/vendor...')
#19 phar:///usr/local/bin/drush/bin/drush.php(143): drush_main()
#20 /usr/local/bin/drush(14): require('phar:///usr/loc...')
#21 {main}.

Steps to reproduce

Using composer, get the module. Install the main module. Try to install the submodules, e.g event_log_track_user.
The function event_log_track_insert() exists on the main module file, but during the installation, it is not found.

🐛 Bug report
Status

Closed: works as designed

Version

3.1

Component

Code

Created by

🇧🇷Brazil adrianopulz Florianópolis

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

Comments & Activities

  • Issue created by @adrianopulz
  • 🇦🇺Australia mingsong 🇦🇺

    Did you install the UI module?

    In your reproduce steps, didn't mention about install event_log_track_config module. Why is there an error from that module?

  • 🇧🇷Brazil adrianopulz Florianópolis

    I've installed a group of modules. The modules I tried to install are:

    • event_log_track
    • event_log_track_auth
    • event_log_track_config
    • event_log_track_menu
    • event_log_track_node
    • event_log_track_syslog
    • event_log_track_tfa
    • event_log_track_ui
    • event_log_track_user

    It is part of the GovCMS and there they install those modules in a Hook Update. I had an issue deploying this because of the errors I mentioned. I also tried locally to install them manually, one by one, but I had issues with some of them.

    https://github.com/govCMS/GovCMS/blob/2.x-develop/modules/custom/core/go...

    I thought it was a GovCMS issue, but after trying to install it manually looks like something on the Events Log Track module. The modules after clearing the cache and trying to install the module again it says the module is already installed, so looks like the error is not blocking the installation, in the other hand in an automatic deployment the error breaks the deployment process.

  • 🇦🇺Australia mingsong 🇦🇺

    Did you install those modules via Drush? or Via a browser?

    What version of this module you tried to install?

  • 🇦🇺Australia mingsong 🇦🇺

    It shouldn't log anything during installation since

    https://git.drupalcode.org/project/events_log_track/-/commit/a93429bed89...

    it patched in 3.1.3

  • 🇦🇺Australia mingsong 🇦🇺

    I tested via
    composer install
    drush si govcms
    I can't reproduce this issue you reported.

  • 🇧🇷Brazil adrianopulz Florianópolis

    Yes, I installed using composer + drush to enable the modules. It is weird.

  • 🇦🇺Australia mingsong 🇦🇺

    If you install GovCMS profile, you don't need to enable those modules as they are dependencies of that install profile.
    I don't know why you need to do that via using Drush.

  • 🇧🇷Brazil adrianopulz Florianópolis

    I have the GovCMS PasS configured to a 2-year-old project that we update to the latest GovCMS version periodically. I've updated it to the latest version yesterday and it adds the hook_update installing those log track modules in the govcms_security module.

    I've tried manually using drush en only to test if it was an issue on the hook_update or to install the module. Since locally downloading it by composer and installing using drush return the same error I had deploying the updates on Gitlab I'm not sure about the origin of the issue.

  • 🇦🇺Australia mingsong 🇦🇺

    Any issue or question about GovCMS please raise in Github/GovCMS

    https://github.com/govCMS/GovCMS/issues

  • Status changed to Closed: works as designed over 1 year ago
  • 🇦🇺Australia mingsong 🇦🇺

    I close this issue as it is out of scope of this module.

  • 🇧🇷Brazil adrianopulz Florianópolis

    I've just tried to install this module in a https://simplytest.me/ for testing and it is not working. Is it supposed to not install in a fresh Drupal? I had the same issue installing this module locally with Composer + Drush, is it a GovCMS issue?

  • 🇦🇺Australia mingsong 🇦🇺

    Till 12th March, (about two weeks ago), there were 123 sites have installed 3.1.4 of this module.
    https://www.drupal.org/project/usage/3346564

    We installed it on our websites without any problems during the deployment.

    I can't reproduce the issue you raised.

    Alos, according to your screenshot above, it said the module is missing, which is different from what you reported before.

Production build 0.71.5 2024