Skip Navigation

[Resolved] CRED post-form not working reliable

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 42 replies, has 2 voices.

Last updated by Christian Cox 4 years, 7 months ago.

Assigned support staff: Christian Cox.

Author
Posts
#492873

I've been testing this for several hours and I cannot replicate the problem locally. Every email I send goes through as expected and every post is created as expected. All the same plugins are enabled. I'm starting to wonder if it's environment-related.

Can your host provide an Apache error log or any other environmental logs?

#493038

Thanks Christian, I wrote to the support of my clients webspace-provider. Hopefully I will get an answer soon.

Aren't there any php-errors in Mail-Bank-Error-Log in your environment?
But you didn't change the outgoing mail-settings in Mail-Bank?
You just changed the receiving e-mail-adress in CRED-post-form (cause I didn't get any confirmation-mails)?
And does your database show any cryptic CRED-Auto-Drafts?
Did you try to change the settings of Auto-Cache-Engine in Comet Cache Pro to your urls?
What php- and mySql-Version are you using?
And which db_charset in wp-config – utf8 or utf8mb4?

#493175

So, I got feedback from the webspace-provider and got the error-logs from 21st February. There are a few ...

These are the ones from my IP-adress – many of them with post-id 793, which is my CRED-post-id:

[Tue Feb 21 14:39:49 2017] [error] [client MYIP] /usr/bin/php-cgi: error while loading shared libraries: cannot allocate symbol search list: Cannot allocate memory, referer: <em><u>hidden link</u></em> 
[Tue Feb 21 14:45:27 2017] [error] [client MYIP] PHP Warning: PHP Startup: Unable to load dynamic library 'https://cdn.toolset.com/usr/lib/php5/20100525/curl.so' - libgnutls.so.26: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client MYIP] Premature end of script headers: admin-ajax.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client MYIP] Premature end of script headers: post.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client MYIP] Premature end of script headers: admin-ajax.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client MYIP] Premature end of script headers: post.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client MYIP] Premature end of script headers: post.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:59 2017] [error] [client MYIP] Premature end of script headers: admin.php, referer: <em><u>hidden link</u></em>

Here the ones form the webservers IP-adress. I assume, the errors from cron-job and the following ones are created from the plugin Cosmet Cache. There is an auto-cache-feature, where I can set urls, which are crawled and cached every 15 minutes. Probably that's not possible for the urls with url-parameter "_success_message". I now changed my settings and deleted these urls from auto-cache. Just to see, if that changes anything.

[Tue Feb 21 10:40:53 2017] [error] [client SERVERIP] Script timed out before returning headers: wp-cron.php, referer: <em><u>hidden link</u></em>..]
[Tue Feb 21 14:38:51 2017] [error] [client SERVERIP] PHP Warning:  PHP Startup: Unable to load dynamic library 'https://cdn.toolset.com/usr/lib/php5/20100525/imagick.so' - liblcms2.so.2: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: wp-cron.php, referer: <em><u>hidden link</u></em>..]
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: index.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: index.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: index.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: index.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: index.php, referer: <em><u>hidden link</u></em> 
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: index.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: index.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: index.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: index.php, referer: <em><u>hidden link</u></em>

One error from an IP, which my Wordfence-Plugin classified as "human" (no bot):

[Tue Feb 21 10:37:27 2017] [error] [client AHUMANIP] (70007)The timeout specified has expired: ap_content_length_filter: apr_bucket_read() failed, referer: <em><u>hidden link</u></em>

And three from a different IP, which I can't find anywhere in any of my logs:

[Tue Feb 21 14:38:51 2017] [error] [client 62.255.51.195] PHP Warning: PHP Startup: Unable to load dynamic library 'https://cdn.toolset.com/usr/lib/php5/20100525/imagick.so' - libtiff.so.4: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client 62.255.51.195] Premature end of script headers: admin-ajax.php, referer: <em><u>hidden link</u></em> 
[Tue Feb 21 14:45:58 2017] [error] [client 62.255.51.195] Premature end of script headers: admin-ajax.php, referer: <em><u>hidden link</u></em>

And again there are two errors in my Mail-Bank-Error-Logs with todays timestamp:

[23-Feb-2017 13:33:42 UTC] PHP Notice:  Trying to get property of non-object in /var/www/tophosting/cablelink/vhost_43642/wp-content/plugins/cred-frontend-editor/embedded/classes/CRED.php on line 121

I know, there would be a pack of updates for the Toolset-Plugins, but I tried to update mine and saw that the updates are destroying my layout completely. Even though I'm working in a child-template. So I'm awaiting the next updates and hope, that this is working out then ...

#493226

Okay so we have at least these problems on the host box:

[Tue Feb 21 14:39:49 2017] [error] [client MYIP] /usr/bin/php-cgi: error while loading shared libraries: cannot allocate symbol search list: Cannot allocate memory, referer: <em><u>hidden link</u></em> 
[Tue Feb 21 14:45:27 2017] [error] [client MYIP] PHP Warning: PHP Startup: Unable to load dynamic library 'https://cdn.toolset.com/usr/lib/php5/20100525/curl.so' - libgnutls.so.26: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client MYIP] Premature end of script headers: admin-ajax.php, referer: <em><u>hidden link</u></em>
[Tue Feb 21 10:40:53 2017] [error] [client SERVERIP] Script timed out before returning headers: wp-cron.php, referer: <em><u>hidden link</u></em>..]
[Tue Feb 21 14:38:51 2017] [error] [client SERVERIP] PHP Warning:  PHP Startup: Unable to load dynamic library 'https://cdn.toolset.com/usr/lib/php5/20100525/imagick.so' - liblcms2.so.2: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client SERVERIP] Premature end of script headers: wp-cron.php, referer: <em><u>hidden link</u></em>..]
[Tue Feb 21 10:37:27 2017] [error] [client AHUMANIP] (70007)The timeout specified has expired: ap_content_length_filter: apr_bucket_read() failed, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:38:51 2017] [error] [client 62.255.51.195] PHP Warning: PHP Startup: Unable to load dynamic library 'https://cdn.toolset.com/usr/lib/php5/20100525/imagick.so' - libtiff.so.4: failed to map segment from shared object: Cannot allocate memory in Unknown on line 0, referer: <em><u>hidden link</u></em>
[Tue Feb 21 14:45:58 2017] [error] [client 62.255.51.195] Premature end of script headers: admin-ajax.php, referer: <em><u>hidden link</u></em> 

This seems to validate the concern that your problem is environmental. If libraries can't be loaded, if PHP cannot allocate memory, if you have Apache timeouts, these are red flags for serious problems that need to be resolved with your host.


Aren't there any php-errors in Mail-Bank-Error-Log in your environment?

I have new PHP notices like you have seen but no errors.

But you didn't change the outgoing mail-settings in Mail-Bank?
No, I did not adjust these settings at all.

You just changed the receiving e-mail-adress in CRED-post-form (cause I didn't get any confirmation-mails)?
Correct, I modified all the email addresses to point to addresses I have access to. I didn't want to spam you or your client unnecessarily 🙂


And does your database show any cryptic CRED-Auto-Drafts?

It does not at the moment.


Did you try to change the settings of Auto-Cache-Engine in Comet Cache Pro to your urls?

No, I did not try that.


What php- and mySql-Version are you using?

PHP 7.0.16
mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64)
Also of note - the MySQL version I see in your debug info, 5.1.73, is no longer available for download from the MySQL archive:
hidden link


And which db_charset in wp-config – utf8 or utf8mb4?

utf8

#493588

Hi again! The webspace-provider told me, that these error-logs were the last on the server. So there aren't any new errors after the 21st 15:00. And that's a time-period, where they had an issue with their services. So the problem has to be on my side ... pfff ...

I now updated the CRED-plugin only (because the others ruined my layout). Perhaps that will help. I will have a look on all the logs in the next few days.

If it's not CRED, what's causing my problems, then it's probably either with the Cache-Plugin or with my old mySQL-version (which the provider is not able to update in the moment).

If you have my urls in the Auto-Cache-Engine in the Comet Cache Plugin on your installation, please disable the Auto-Cache. I want to test, if this function causes the cryptic CRED-Auto-Drafts in my database.

What about the php-notices? Couldn't they cause the problems?
But perhaps they will be gone too, after todays update ...

#493591

Oh, after CRED-update, there is a new php-notice:

[24-Feb-2017 09:47:25 UTC] PHP Notice:  Undefined index: The Big Sleep in myserver/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/Form_Builder_Helper.php on line 1065

Perhaps that's because I didn't update the other plugins? Is there a problem with that?

#493622

Just for your info: In the meanwhile I updated all Toolset Plugins except the Layouts Plugin, because when updating only the CRED-plugin the views and content-templates didn't work in backen anymore. Layouts is causing the worst problems with my layout – so I hope I can wait for the next update on this ...

#493722

Hi Diana,

I asked our developers about the CRED Auto Draft posts. As I understand it, whenever a user visits a CRED form, an auto draft is created. This is the expected behavior. A cron running in the background cleans these up every 4 or 8 hours. Auto Drafts are used on the backend somehow to avoid creating duplicated posts. Do you have CRED Auto Drafts older than 8 hours?

I'll try to get some information on the Big Sleep notice you are seeing after the update.

#493749

I just spoke with a developer about the notice of undefined index for The Big Sleep. The line number and file indicates that this is a problem has to do with a Types checkboxes value. He created a CRED form with Types checkboxes and a notification that sends %%FORM_DATA%%, but cannot replicate the notification locally. Is it possible there is a hook or something else in the middle stripping the $_POST 'The Big Sleep' value?

I see that you have an aktionen post titled "The Big Sleep." Do you have any CRED forms that modify this post, or create child posts or something similar? Are you able to give me any specific steps to recreate that notice?

#493788

No, I don't have CRED Auto Drafts older than 8 hours. So that's okay. Thanks for the info.

Yes, I have a special offer (= custom post type "Aktionen") called "The big sleep". This PHP notice showed up straight after the update of CRED-plugin. But only once. And yes, the special offers are listed as checkboxes in my CRED-form. To fill in the list as checkboxes in CRED, I had to modify a view:

// Replacing html for correct JSON-format - for Checkboxes with AKTIONEN in CRED
add_filter( 'wpv_filter_wpv_view_shortcode_output', 'prefix_clean_view_output', 5, 2 );
function prefix_clean_view_output( $out, $id ) {
    if ( $id == '914' ) {
        $start = strpos( $out, '<!-- wpv-loop-start -->' );
        if ( 
            $start !== false
            && strrpos( $out, '<!-- wpv-loop-end -->', $start ) !== false
        ) {
            $start = $start + strlen( '<!-- wpv-loop-start -->' );
            $out = substr( $out , $start );
            $end = strrpos( $out, '<!-- wpv-loop-end -->' );
            $out = substr( $out, 0, $end );
        }
    }
    return $out;
}

But I can't see any other error or notices with "The Big Sleep" since the one I wrote you. So hopefully there was only a problem during the update?

Since the update, the old php notices (Form_Builder.php line 1132 and CRED.php line 121) didn't come back. But now there is a new one, which showed up 5 times since 14:00

PHP Notice:  Trying to get property of non-object in myhost/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/common/cred_functions.php on line 72

I compared all of the data in Google Analytics with my new CRED-posts and mail-log. As if by a miracle todays CRED-submissions all were saved correctly. There is no new submission which can't be found in WordPress. Everything went well for today. So perhaps the CRED-update solved my problem?

If you don't see any conflicts with the new PHP Notice from above, I suggest, that I will have a look on the reports, the analytics and the error-logs for the next days. And then we'll see, if there is anything left to repair.

Thanks for your patience and your help!

#493840

I'm glad to help, and I appreciate your patience as well. I am able to reliably reproduce this notice on my end. Here is how I do it:

Go to en/our-special-offers
Scroll down and click the Enquiry button just above "Family Weeks"
Choose tomorrow and the next day for dates
Type 1 for Nights, select 1 adult, no children
Check Single room, Check The Big Sleep, Check Car parking
Fill out details and press submit

Each time I get the notice shown. Interestingly, in the source I see your checkbox value has an

&nbsp;

in it. I wonder if that could be related? I'm not sure how your translations are set up, and I assume this is either in String Translation or a .po file somewhere.

#493855

You mean the amp+nbsp? I see. Strange ... I checked everything. There is no translation in String Translation or in a .po File. The view just outputs the title of the "Aktion", in this case the English title "The Big Sleep". I tried to change the title to "The Biggest Sleep" or to "The BigSleep" and then it worked. But everytime I switch back to my wanted title "The Big Sleep" it fills in the nbsp. Really don't know why. Tried a view variants in my view, butall with the exact same output:

,{"value":"[wpv-post-title]","label":"[wpv-post-title]"}
,{"value":"[wpv-post-title output='sanitize']","label":"[wpv-post-title output='sanitize']"}
,{"value":"[wpv-post-title format='meta' meta='ID']","label":"[wpv-post-title format='meta' meta='ID']"}

I even tried to change the title directly in my database, but with the same result. I didn't have this before I updated CRED. Is there a new function?

#493865

Found it - wp-Typography is adding markup. If I disable it, the extra characters are removed.

#493886

I'm soooo sorry. That was my first thought, too. So I set an exception in wp-Typography. But that didn't work. I should have thought of disabling it. Okay, now the exception works, and the typography-failure is gone. THANKS!

I think the php-notices with cred_functions.php in line 72 are gone, too now. The last one is from about 5 hours ago. I will have a look at all of this in the next days. Please leave this ticket as open. I will come back, when I'm sure, that everything works as expected now.

So have a nice weekend! 🙂

#493899

No problem 🙂 I will check in Monday. Schönes Wochenende!