• Resolved islp

    (@islp)


    The HTML I send with the form is NOT rendered as HTML in the mail I get.

    • This topic was modified 1 year ago by islp.
Viewing 15 replies - 1 through 15 (of 16 total)
  • nictrical

    (@nictrical)

    I suspect the parent plugin Contact Form 7 to be responsible for that, since I don’t think that the PDF Generator could affect the mail body.

    Try to disable Send PDF for Contact Form 7. If the problem persists its surely not caused by this plugin.

    I am not part of the support though. ??

    Thread Starter islp

    (@islp)

    @nitrical

    Well, I’ve done what you suggest before posting ??

    Anyway: when you disable the plugin, the text looks ok

    • This reply was modified 12 months ago by islp.
    nictrical

    (@nictrical)

    Ok then it’s a good point. ??

    Weird thing though, for me it works still fine.

    Thread Starter islp

    (@islp)

    I’m on WP 6.4.1 with CF7 5.8.3 and SPCF7 V.1.0.1.4 / PHP 8.2.10
    ( @nictrical : is this the same environment as yours? )

    Any other form (I have many) works just fine: only the one related to SPCF7 V.1.0.1.4 is not working. By the way: it is not a big issue, since any data is coming in a pdf and in a csv too.

    • This reply was modified 12 months ago by islp.
    Plugin Author Florent Maillefaud

    (@florent73)

    Hi!

    Can you testing with the last version?

    @nictrical : you would enrole you for help us with this plugin support?

    Thanks

    Thread Starter islp

    (@islp)

    @florent73 done, issue is still there

    Plugin Author Florent Maillefaud

    (@florent73)

    Can I have the URL of your form?

    Thanks

    Thread Starter islp

    (@islp)

    @florent73 yes, privately. Can I send it using the contact form on your website (https://restezconnectes.fr/)?

    • This reply was modified 12 months ago by islp.
    Thread Starter islp

    (@islp)

    @florent73

    Ok, I don’t know if this is same issue.

    Anyway: I tried deactivating CF7 and the website stopped working.

    “Hii! WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email. In this case, WordPress caught an error with one of your plugins, Send PDF for Contact Form 7. First, visit your website (https://www.mywebsite.com/) and check for any visible issues. Next, visit the page where the error was caught (https://www.mywebsite.com/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s=) and check for any visible issues. Please contact your host for assistance with investigating this issue further. If your site appears broken and you can’t access your dashboard normally, WordPress now has a special “recovery mode”. This lets you safely login to your dashboard and investigate further. https://www.mywebsite.com/wp-login.php?action=enter_recovery_mode&rm_token=Dkx0s0vA242mLoKI5WbqYt&rm_key=s2YJnnRHTONzcfzmNTzRL5 To keep your site safe, this link will expire in 1 day. Don’t worry about that, though: a new link will be emailed to you if the error occurs again after it expires. When seeking help with this issue, you may be asked for some of the following information: WordPress version 6.4.1 Current plugin: Send PDF for Contact Form 7 (version 1.0.1.6) PHP version 8.2.10

    Error Details An error of type E_ERROR was caused in line 331 of the file /home/q/www/wp-content/plugins/send-pdf-for-contact-form-7/classes/send-pdf.php. Error message: Uncaught Error: Undefined constant “WPCF7_ADMIN_READ_CAPABILITY” in /home/q/www/wp-content/plugins/send-pdf-for-contact-form-7/classes/send-pdf.php:331 Stack trace: 0 /home/q/www/wp-includes/class-wp-hook.php(324): cf7_sendpdf->wpcf7pdf_add_admin(”) 1 /home/q/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) 2 /home/q/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 3 /home/q/www/wp-admin/includes/menu.php(161): do_action(‘admin_menu’, ”) 4 /home/q/www/wp-admin/menu.php(417): require_once(‘/home/q…’) 5 /home/q/www/wp-admin/admin.php(158): require(‘/home/q…’) 6 /home/q/www/wp-admin/plugins.php(10): require_once(‘/home/q…’) 7 {main} thrown

    Plugin Author Florent Maillefaud

    (@florent73)

    Hi!

    In the CF7 plugin you have this code on /contact-form-7\wp-contact-form-7.php line 47 :

    if ( ! defined( 'WPCF7_ADMIN_READ_CAPABILITY' ) ) {
    	define( 'WPCF7_ADMIN_READ_CAPABILITY', 'edit_posts' );
    }

    My plugin uses the WPCF7_ADMIN_READ CAPABILITY function to allow some users to create PDFs.

    WPCF7_ADMIN_READ CAPABILITY must be always defined ! No?

    Thanks

    Thread Starter islp

    (@islp)

    @florent73

    So, are you suggesting this is normal behavior? ??

    • This reply was modified 11 months, 4 weeks ago by islp.
    Plugin Author Florent Maillefaud

    (@florent73)

    Hi!

    Can you testing the last version on GitHub : https://github.com/restezconnectes/send-pdf-for-contact-form-7

    I declare if not exists 2 contants : WPCF7_ADMIN_READ_CAPABILITY and WPCF7_ADMIN_READ_WRITE_CAPABILITY.

    Thanks to report me if it’s works for you.

    Thread Starter islp

    (@islp)

    @florent73

    This last one solves both the issues:

    • the CF7 deactivation doesn’t result in your plugin error;
    • the email body is not rendered as an HTML string;

      Good job. Thanks ??
    Plugin Author Florent Maillefaud

    (@florent73)

    Hi!

    Ok cool!

    But the option “Desactivate line break auto for PDF content?” is not OK.

    I added in the GitHub version 1.0.1.7 (soon) a another option :

    Desactivate line break auto for PDF content?
    This disables automatic line break replacement (\n and \r) in PDF content

    Desactivate line break auto for MAIL?
    This disables automatic line break replacement (\n and \r) in mail content

    In the version 1.0.1.6 the first option does the opposite of what it should do… so I’m going to reverse the code !

    Thanks

    Thread Starter islp

    (@islp)

    @florent73

    no problem, I will update it when the new version is available

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘V.1.0.1.4 issue: HTML not rendered in mail body’ is closed to new replies.