restezconnectes / send-pdf-for-contact-form-7

Send the PDF for Contact Form 7 plugin will allow you to recover the data yourself via your form to insert them into a PDF built and prepared by you.
https://restezconnectes.fr/tutoriel-wordpress-lextension-send-pdf-for-contact-form-7/
GNU General Public License v3.0
15 stars 17 forks source link

Error 500 and Indexing Issue After Activating Plugin #51

Closed elhaddajiOtmane closed 1 year ago

elhaddajiOtmane commented 1 year ago

1. Overview:

After activating the on my WordPress site, I encountered a 505 error, and my website is not being indexed by search engines.

2. WordPress Environment:

Include details about your WordPress setup.

3. Steps to Reproduce:

  1. Activate the Plugin Name.
  2. Visit [screamingfrog] or any website analises site like[pagespeed].
  3. Observe the 500 error and check for indexing issues.

4. Expected Behavior:

I expected the plugin to activate without causing a 500 error, and my website should be indexed properly by search engines.

5. Actual Behavior:

Upon activation, a 500 error occurs, and my website is not being indexed by search engines.

6. Video Documentation:

https://drive.google.com/file/d/1ju2dV7mRMlEfuemhrp3FvmWBEwwk56zL/view?usp=sharing

7. Error Messages:

The error message I see is error500.

8. Additional Information:

I have tried deactivating other plugins and switching to the default theme, but the issue persists.

base Version: [e.g., MariaDB 10.11]

Conclusion:

Thank you for your help in resolving this issue. Let me know if you need any additional information.

restezconnectes commented 1 year ago

Hi!

If that's the case, should my demo site be the same? Right?

Can you test it?

Thanks

elhaddajiOtmane commented 1 year ago

Hi @Florent73, Thank you for your prompt attention to the issue I reported regarding the activation of the plugin on my WordPress site.

Upon further investigation, I identified the root cause of the problem. The error log indicates a type error at line 1202 in the "send-pdf.php" file, specifically in the following code snippet: before

$singleNamePDF = esc_html(sanitize_title($meta_values['pdf-name']));

after

if (isset($meta_values['pdf-name']) && is_string($meta_values['pdf-name'])) {
    $singleNamePDF = esc_html(sanitize_title($meta_values['pdf-name']));
} else {
    // Handle the error or set a default value
    $singleNamePDF = 'default-pdf-name';
}
restezconnectes commented 1 year ago

Hi!

This bug is now resolved.

Thanks