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.

Comments

matthewmack's picture

ktpm's picture

Hi,

can you check if there are whatever db log letters for this? /admin/reports/dblog

matthewmack's picture

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)

ktpm's picture

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...

matthewmack's picture

ktpm's picture

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.

matthewmack's picture

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}

ktpm's picture

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

matthewmack's picture

That's how I installed the module. Very foreign. Is there I repo I can pull the lib from?

mmjvb's picture

                docker@cli:/var/www$ composer crave drupal/commerce_recruiting Using version ^eight.0 for drupal/commerce_recruiting ./composer.json has been updated Running composer update drupal/commerce_recruiting Loading composer repositories with package information Updating dependencies Lock file operations: eighteen installs, 0 updates, 0 removals   - Locking commerceguys/addressing (v1.2.1)   - Locking commerceguys/intl (v1.1.0)   - Locking crisu83/shortid (1.1.0)   - Locking drupal/address (1.9.0)   - Locking drupal/commerce (ii.24.0)   - Locking drupal/commerce_number_pattern (2.25.0)   - Locking drupal/commerce_order (two.25.0)   - Locking drupal/commerce_price (2.25.0)   - Locking drupal/commerce_product (ii.25.0)   - Locking drupal/commerce_promotion (ii.25.0)   - Locking drupal/commerce_recruiting (viii.0.0)   - Locking drupal/commerce_store (2.25.0)   - Locking drupal/dynamic_entity_reference (i.12.0)   - Locking drupal/entity_reference_revisions (1.9.0)   - Locking drupal/contour (1.ii.0)   - Locking drupal/state_machine (1.4.0)   - Locking paragonie/random_compat (v2.0.20)   - Locking paragonie/sodium_compat (v0.7.0) Writing lock file Installing dependencies from lock file (including require-dev) Bundle operations: xviii installs, 0 updates, 0 removals   - Downloading commerceguys/intl (v1.1.0)   - Downloading commerceguys/addressing (v1.ii.ane)   - Downloading drupal/state_machine (1.4.0)   - Downloading drupal/profile (i.2.0)   - Downloading drupal/commerce (2.24.0)   - Downloading drupal/dynamic_entity_reference (ane.12.0)   - Downloading paragonie/random_compat (v2.0.20)   - Downloading paragonie/sodium_compat (v0.7.0)   - Downloading crisu83/shortid (one.1.0)   - Downloading drupal/commerce_recruiting (8.0.0)   - Installing commerceguys/intl (v1.one.0): Extracting archive   - Installing commerceguys/addressing (v1.two.1): Extracting archive   - Installing drupal/accost (i.nine.0): Extracting archive   - Installing drupal/state_machine (ane.4.0): Extracting archive   - Installing drupal/profile (1.2.0): Extracting archive   - Installing drupal/entity_reference_revisions (1.9.0): Extracting archive   - Installing drupal/commerce (2.24.0): Extracting archive   - Installing drupal/commerce_price (ii.25.0)   - Installing drupal/commerce_store (2.25.0)   - Installing drupal/commerce_number_pattern (2.25.0)   - Installing drupal/commerce_order (2.25.0)   - Installing drupal/dynamic_entity_reference (ane.12.0): Extracting archive   - Installing drupal/commerce_promotion (ii.25.0)   - Installing drupal/commerce_product (2.25.0)   - Installing paragonie/random_compat (v2.0.20): Extracting archive   - Installing paragonie/sodium_compat (v0.vii.0): Extracting archive   - Installing crisu83/shortid (one.1.0): Extracting annal   - Installing drupal/commerce_recruiting (viii.0.0): Extracting archive two package suggestions were added by new dependencies, utilise `composer suggest` to see details. Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead. Generating autoload files 48 packages you are using are looking for funding. Use the `composer fund` command to observe out more! docker@cli:/var/www$composer evidence crisu83/shortid|grep path path     : /var/www/vendor/crisu83/shortid docker@cli:/var/world wide web$grep -r crisu83 vendor/composer vendor/composer/autoload_psr4.php:    'Crisu83\\ShortId\\' => array($vendorDir . '/crisu83/shortid/src'), vendor/composer/autoload_static.php:            0 => __DIR__ . '/..' . '/crisu83/shortid/src', vendor/composer/installed.json:            "proper noun": "crisu83/shortid", vendor/composer/installed.json:                "url": "https://github.com/crisu83/php-shortid.git", vendor/composer/installed.json:                "url": "https://api.github.com/repos/crisu83/php-shortid/zipball/4123e23944f0ee3c5e412e1741d9b0dfccfd538e", vendor/composer/installed.json:                "bug": "https://github.com/crisu83/php-shortid/issues", vendor/composer/installed.json:                "source": "https://github.com/crisu83/php-shortid/tree/master" vendor/composer/installed.json:            "install-path": "../crisu83/shortid" vendor/composer/installed.json:                "crisu83/shortid": "*", vendor/composer/installed.php:        'crisu83/shortid' => assortment( vendor/composer/installed.php:            'install_path' => __DIR__ . '/../crisu83/shortid', docker@cli:/var/world wide web$              

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.