Clean drupal 9 site broke when enabeling the barcodes module

Install drupal 9 enable barcodes module

Hello,

I'm quite new to coding, but I have worked with Drupal for some years for personal use.
I have a some webspace and domains with a provider, where I cannot use composer.

I'm running a clean Drupal 9 site for testing purposes and installed some modules, all was working fine.
When I enabled the barcode module, I've got "The website encountered an unexpected error. Please try again later." and I could not log on anymore.
I added "$config['system.logging']['error_level'] = 'verbose';" to the settings.php to see what was wrong what gave me the following message: 

The website encountered an unexpected error. Please try again later.
Error: Class 'Com\Tecnick\Barcode\Barcode' not found in barcodes_theme() (line 31 of modules/barcodes/barcodes.module).
barcodes_theme(Array, 'module', 'barcodes', 'modules/barcodes') (Line: 454)
Drupal\Core\Theme\Registry->processExtension(Array, 'barcodes', 'module', 'barcodes', 'modules/barcodes') (Line: 341)
Drupal\Core\Theme\Registry->build() (Line: 240)
Drupal\Core\Theme\Registry->get() (Line: 88)
Drupal\Core\Utility\ThemeRegistry->initializeRegistry() (Line: 69)
Drupal\Core\Utility\ThemeRegistry->__construct('theme_registry:runtime:bartik', Object, Object, Array, 1) (Line: 260)
Drupal\Core\Theme\Registry->getRuntime() (Line: 142)
Drupal\Core\Theme\ThemeManager->render(Array, Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 241)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I hope I'm in the right place and not stepping on anyone's toes by asking fore help here.

Comments

janensas created an issue. See original summary.

janensas’s picture

janensas’s picture

I renamed "barcodes.module" so i could uninstall the module, then the site was running again.
then tryed barcodes-8.x-1.11 with the same result

avpaderno’s picture

Version: 2.0.2 » 2.0.x-dev
treasury’s picture

Same here.

I run composer update in the folder. It downloads/updates dependencies, but still the same result.

Error: Class "Com\Tecnick\Barcode\Barcode" not found in barcodes_theme() (line 31 of modules\contrib\barcodes\barcodes.module).

habbs’s picture

I had the same problem.

I installed tc-lib-barcode from https://github.com/tecnickcom/tc-lib-barcode and now everything works fine.

tr’s picture

Category: Bug report » Support request
Status: Active » Closed (works as designed)

If you follow the instructions in the README.md file then this module will install properly.

I cannot use composer

Composer is almost required for Drupal, and will be absolutely required in the future. It's possible to install Drupal and Drupal modules without it, but it's a lot more work and you have to know more. If you don't have Composer, then some modules like this one will let you use Ludwig (see https://www.drupal.org/project/ludwig), but that isn't the recommended way.

This module requires the tecnickcom/tc-lib-barcode library. That is where the Com\Tecnick\Barcode\Barcode class is found. If you don't have that library, you won't have that class, and this module won't work.

devad’s picture