• The pluggin suddenly stopped working for no apparent reason. Everything else continues fine. The Mails from CF7 get sent only the pdfs stopped getting attached. Since this isn’t much to go on I’m not really asking for a solution (I would be glad if anyone has one anyways ?? )but simply for a way to troubleshoot this since there dont seem to be error messages anywhere

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter rccservice

    (@rccservice)

    After some digging I found that the PDF file gets generated, the mail gets sent but the PDF isn’t attached to it.

    Plugin Author Florent Maillefaud

    (@florent73)

    Hi!

    Please, update with the lastest version. I hope it’s working now.

    Thanks

    Thread Starter rccservice

    (@rccservice)

    Found the problem and a solution:
    These lines of code are the culprits:

    ????????????????if ( ! wpcf7_is_file_path_in_content_dir( $path ) ) {
    ????????????????????if ( WP_DEBUG ) {
    ????????????????????????trigger_error(
    ????????????????????????????sprintf(
    ????????????????????????????????/* translators: %s: Attachment file path.?
    ????????????????????????????????__( ‘Failed to attach a file. %s is not in the allowed directory.’, ‘contact-form-7’ ),
    ????????????????????????????????$path
    ????????????????????????????),
    ????????????????????????????E_USER_NOTICE
    ????????????????????????);
    ????????????????????}

    ????????????????????return false;
    ????????????????}

    As far as I can see these lines do nothing useful, because there is a check if the folder is writeable a few lines later.

    Plugin Author Florent Maillefaud

    (@florent73)

    Hi!

    I finding just this code in send-pdf.php line 650:

    if ( ! wpcf7_is_file_path_in_content_dir( $path ) ) {
                    // $path is out of WP_CONTENT_DIR
                    continue;
                }

    That your’s is in mail.php in CF7

    This is it?

    Thread Starter rccservice

    (@rccservice)

    Right, sorry forgot to post the filename where the piece of code is from. It’s from the mail.php from cf7 (fullpath: ‘yourwp-home’\wp-content\plugins\contact-form-7\includes\mail.php). I know this originates in CF7, but if people have this problem they will look here for a solution.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin suddenly stopped working’ is closed to new replies.