The Website Encountered an Unexpected Error Please Try Again Later Check Error in Drupal
Installed module, wend to /admin/commerce/recruitment/campaigns and tried to "Add together Campaign". I get the white screen that says "The website encountered an unexpected error. Please try again later."
Am I missing something. I used composer so I imagine all dependencies came in. Delight advise.
Source: https://www.drupal.org/project/commerce_recruiting/issues/3224802
Comments
Hi,
can you check if there are whatever db log letters for this? /admin/reports/dblog
HI ktpm, yep, here's what I recollect it is. I come across Crisu83 in the vendor directory
Mistake: Form 'Crisu83\ShortId\ShortId' not found in Drupal\commerce_recruiting\Entity\CampaignOption::getDefaultCode() (line 376 of /Applications/MAMP/htdocs/ltcf/modules/contrib/commerce_recruiting/src/Entity/CampaignOption.php)
So you practise accept the lib in the vendor directory subsequently composer install? I'thousand not sure if I can help here since this isn't an error of the module. It appears to me that there might exist a trouble with composer where the autoload file is not updated properly...
Oh, you don't have the library? Sorry, I misunderstood. But that still may be well-nigh composer. Whatsoever messages of connection error or something? I don't have a clue why it could be missing otherwise.
I did get the vendor library called Crisu83 in my vendor dir. Here's everything from the log message:
Mistake: Class 'Crisu83\ShortId\ShortId' not found in Drupal\commerce_recruiting\Entity\CampaignOption::getDefaultCode() (line 376 of /Applications/MAMP/htdocs/ltcf/modules/contrib/commerce_recruiting/src/Entity/CampaignOption.php)
#0 [internal office]: Drupal\commerce_recruiting\Entity\CampaignOption::getDefaultCode(Object(Drupal\commerce_recruiting\Entity\CampaignOption), Object(Drupal\Cadre\Field\BaseFieldDefinition))
#ane /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/Field/BaseFieldDefinition.php(469): call_user_func('Drupal\\commerce...', Object(Drupal\commerce_recruiting\Entity\CampaignOption), Object(Drupal\Core\Field\BaseFieldDefinition))
#two /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/Field/FieldItemList.php(169): Drupal\Core\Field\BaseFieldDefinition->getDefaultValue(Object(Drupal\commerce_recruiting\Entity\CampaignOption))
#3 /Applications/MAMP/htdocs/ltcf/cadre/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(188): Drupal\Core\Field\FieldItemList->applyDefaultValue()
#four /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(130): Drupal\Core\Entity\ContentEntityStorageBase->initFieldValues(Object(Drupal\commerce_recruiting\Entity\CampaignOption), Array)
#5 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/Entity/EntityStorageBase.php(221): Drupal\Cadre\Entity\ContentEntityStorageBase->doCreate(Array)
#6 /Applications/MAMP/htdocs/ltcf/modules/contrib/inline_entity_form/src/Chemical element/InlineEntityForm.php(122): Drupal\Core\Entity\EntityStorageBase->create(Assortment)
#7 [internal function]: Drupal\inline_entity_form\Element\InlineEntityForm::processEntityForm(Array, Object(Drupal\Core\Course\FormState), Array)
#8 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/Grade/FormBuilder.php(1008): call_user_func_array(Assortment, Array)
#9 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Cadre/Form/FormBuilder.php(1071): Drupal\Core\Form\FormBuilder->doBuildForm('commerce_recrui...', Array, Object(Drupal\Cadre\Form\FormState))
#x /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/Form/FormBuilder.php(1071): Drupal\Core\Form\FormBuilder->doBuildForm('commerce_recrui...', Array, Object(Drupal\Cadre\Form\FormState))
#eleven /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/Course/FormBuilder.php(1071): Drupal\Core\Form\FormBuilder->doBuildForm('commerce_recrui...', Assortment, Object(Drupal\Core\Grade\FormState))
#12 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Cadre/Form/FormBuilder.php(1071): Drupal\Core\Class\FormBuilder->doBuildForm('commerce_recrui...', Array, Object(Drupal\Core\Course\FormState))
#thirteen /Applications/MAMP/htdocs/ltcf/cadre/lib/Drupal/Core/Form/FormBuilder.php(575): Drupal\Cadre\Grade\FormBuilder->doBuildForm('commerce_recrui...', Array, Object(Drupal\Core\Form\FormState))
#xiv /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/Form/FormBuilder.php(321): Drupal\Core\Form\FormBuilder->processForm('commerce_recrui...', Array, Object(Drupal\Core\Form\FormState))
#xv /Applications/MAMP/htdocs/ltcf/cadre/lib/Drupal/Core/Controller/FormController.php(91): Drupal\Cadre\Course\FormBuilder->buildForm(Object(Drupal\commerce_recruiting\Form\RecruitmentForm), Object(Drupal\Core\Class\FormState))
#16 [internal office]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Asking), Object(Drupal\Core\Routing\RouteMatch))
#17 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#18 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/Return/Renderer.php(573): Drupal\Cadre\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Cadre\EventSubscriber\{closure}()
#19 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Cadre\Render\RenderContext), Object(Closure))
#xx /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#21 /Applications/MAMP/htdocs/ltcf/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Cadre\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Cadre\EventSubscriber\{closure}()
#22 /Applications/MAMP/htdocs/ltcf/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), i)
#23 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Asking), 1, true)
#24 /Applications/MAMP/htdocs/ltcf/cadre/lib/Drupal/Cadre/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /Applications/MAMP/htdocs/ltcf/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Cadre\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /Applications/MAMP/htdocs/ltcf/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /Applications/MAMP/htdocs/ltcf/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, truthful)
#28 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /Applications/MAMP/htdocs/ltcf/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Asking), i, true)
#xxx /Applications/MAMP/htdocs/ltcf/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Asking), 1, true)
#31 /Applications/MAMP/htdocs/ltcf/cadre/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Asking), 1, truthful)
#32 /Applications/MAMP/htdocs/ltcf/alphabetize.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Asking))
#33 {main}
Sorry, I tin can't figure how the lib would be missing. The intended manner to install the module is by using
composer crave drupal/commerce_recruiting
That's how I installed the module. Very foreign. Is there I repo I can pull the lib from?
Comment #11
mmjvb Credit Attribution: mmjvb equally a volunteer commented
Attempt dumpautoload when shortid is not registered:
dump-autoload (dumpautoload)#
If you need to update the autoloader considering of new classes in a classmap bundle for example, you can employ dump-autoload to do that without having to go through an install or update.
Additionally, it can dump an optimized autoloader that converts PSR-0/4 packages into classmap ones for performance reasons. In large applications with many classes, the autoloader can take upwards a substantial portion of every asking's time. Using classmaps for everything is less convenient in development, but using this option y'all can still use PSR-0/4 for convenience and classmaps for performance.
Options
--no-scripts: Skips the execution of all scripts defined in composer.json file.
--optimize (-o): Convert PSR-0/4 autoloading to classmap to go a faster autoloader. This is recommended especially for production, but can accept a bit of time to run, so information technology is currently not done by default.
--classmap-authoritative (-a): Autoload classes from the classmap but. Implicitly enables --optimize.
--apcu: Employ APCu to cache establish/not-plant classes.
--apcu-prefix: Utilize a custom prefix for the APCu autoloader cache. Implicitly enables --apcu.
--no-dev: Disables autoload-dev rules. Composer will by default infer this automatically according to the last install or update --no-dev state.
--dev: Enables autoload-dev rules. Composer will by default infer this automatically according to the concluding install or update --no-dev country.
--ignore-platform-reqs: ignore all php, hhvm, lib-* and ext-* requirements and skip the platform bank check for these. Meet also the platform config choice.
--ignore-platform-req: ignore a specific platform requirement (php, hhvm, lib-* and ext-*) and skip the platform check for it.