Conflict between Formidable PDFs and SupportCandy: ComposerAutoloaderInit class name already declared

By: Leo wu | Asked: 04/28/2025
ForumsCategory: General questionsConflict between Formidable PDFs and SupportCandy: ComposerAutoloaderInit class name already declared
Leo wu asked 3 weeks ago

Hi,

I encountered a conflict issue between the Formidable PDFs plugin and the SupportCandy plugin on my WordPress site.

When both plugins are activated, I receive the following fatal error:

Fatal error: Cannot declare class ComposerAutoloaderInita93271dd13b797bc42be7fa85eb30ecb, because the name is already in use in /home/.../wp-content/plugins/formidable-pdfs/classes/lib/dompdf/vendor/composer/autoload_real.php on line 5

 

Background:

  • The Formidable PDFs plugin uses a local bundled version of dompdf, which includes its own Composer autoloader (autoload_real.php).

  • The SupportCandy plugin also utilizes a local copy of dompdf (and optionally TCPDF) and similarly loads a Composer autoloader.

  • Since Composer generates a ComposerAutoloaderInit{hash} class name automatically, and both plugins include their own copy, the class name conflicts.

  • As a result, whichever plugin loads its autoload_real.php first will block the other and cause a fatal error.

 

Tested Scenarios:

  • Deactivating Formidable PDFs resolves the error, but I lose the ability to generate PDFs with Formidable Forms.

  • Switching SupportCandy to use TCPDF avoids using dompdf, but SupportCandy's "Print" functionality stops working properly.

  • When only one plugin is active, both work individually without issues.

 

Expected Behavior:

  • I would like to have both plugins activated at the same time, using their PDF generation features independently, without fatal errors.

 

Question:

  • Is there a recommended way to prevent this autoloader conflict?

  • Could future versions of Formidable PDFs implement a safer loading mechanism for dompdf?

  • Or is there any workaround you suggest for now without heavily modifying the plugin?

Thanks in advance!

1 Answers
Victor Font Staff answered 3 weeks ago

This is a community volunteer forum. We're all end users just like you. We have no more information about Formidable's inner workings than you do. I suggest you open a ticket with Strategy 11 to report the conflict you've discovered.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right