• On home start page I have a form, Send-pdf is disabled for this form, but a have this message when refresh page

    Warning: Cannot modify header information – headers already sent by (output started at /home/mysite/ftp/mysite.com/wp-content/themes/mintech/header.php:9) in /home/mysite/ftp/mysite.com/wp-content/plugins/send-pdf-for-contact-form-7/classes/send-pdf.php on line 1420

    When i disabled Send PDF for Contact Form 7 , error not showing.

    Ver 0.8.3

Viewing 5 replies - 1 through 5 (of 5 total)
  • Also having this problem. Cookies also appear to be breaking our site caching.

    The specific error we are getting in the admin dashboard is “COOKIE are not generated. COOKIE are required for this plugin.”

    Ok, so I ended up finding some workarounds and likely what the problem is. The cookies are being set twice, which is causing it’s own problem, but our host (Pantheon) caches cookies based of a regex. If you’re having this problem, I would double check if your host requires cookies to be handled a specific way.

    We aren’t using the “pdf_password” cookie in our solution, but I would assume this cookie will have the same problem. My suggestion to the plugin developer would be to make this an editable setting in the admin area to allow for modifications of the name, should vendor requirements need to be met.

    My Workarounds

    So I changed the cookie name in \classes\send-pdf.php and \views\send-pdf-admin.php from “pdf_uniqueid” to “STYXKEY_pdf_uniqueid” so it would be included in our sites CDN cache, as per Pantheons guideline doc https://pantheon.io/docs/cookies#cache-varying-cookies

    After that I modified \classes\send-pdf.php where the cookies were being set multiple times to utilize the function with the existing logic from the initialization.

    
    line 1233: $this->wpcf7pdf_session_start();
    line 1419: $this->wpcf7pdf_session_start();
    
    Thread Starter szymonn841

    (@szymonn841)

    I tested version 0.8.4 from github – now is ok

    • This reply was modified 5 years, 4 months ago by szymonn841.

    I’ll give the new version a shot, wasn’t in the repo when I checked last.
    I’m not able to see that version available to download through the WordPress dashboard, so the developers may be testing before releasing still.

    Ok, so I tried manually updating the plugin to 0.8.4 and it looks like the wp-admin dashboard is working, but our sites CDN caching is still being interrupted. Without looking at the code, my assumption would be the naming of the Session is running into the same problem I outlined earlier with the Cookies.

    If you are expecting your site to have caching, I would verify through the browser inspect tools or by using CURL to verify your caching is not being interrupted without your realizing as this may be an underlying issue.

    For now I’m going to implement the hotfix I outlined in my earlier comment until a stable version is available through the WordPress dashboard as there may be additional bug fixes still being implemented on the gitrepo.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Problem with cookies : Cannot modify header information’ is closed to new replies.