L030 Errors conflict with duplicate link code
-
The guys who run our website recently installed some code to allow pages in WordPress to be copied. They got the code from here:
https://rudrastyh.com/wordpress/duplicate-post.html#comment-181
Ever since they did that I get an error every time I try and make a change in EntryWizard. The error occurs when I try and save the change and gives me the error message below:
[L030] ***EntryWizard ERROR ***
Ewz_Layout_Input: Unexpected input
client_actionIs the duplicate link code the cause of this? If so is there any way to make them compatible or will they need to remove the duplicate link code if we want touse EntryWizard?
-
I looked at that code, and could not immediately see any way in which it might interact with the saving of an EntryWizard layout. It seems to deal only with posts and pages, and EntryWizard does not use them.
I even tried putting the code in my own functions.php. It appeared to do what it claimed to do, but I did not have any problem making changes to a layout. So I suspect that code is not actually the direct cause of your problem.
The error message above is shown when a variable called “client_action” is passed to EntryWizard along with the parameters for saving a layout. It’s intention is to trap malicious input.
It would be a simple code change to disable this check for all EWZ inputs, but before doing that I’d strongly suggest checking your log files to see just what value was passed in that variable, and what code created it.
If you trust the code involved, and cannot solve the issue in any other way, search for the line containing “unexpected input” in the file classes/validation/ewz_input.php and disable it by putting ‘//’ at the start of the line.
Thanks,
where do I find the logs? Are they on my local machine or stored on the website server somewhere? I don’t actually administer the website myself, I just use EntryWizard to run the competitions for my club so I am not that familiar with the admin for the website but I can ask the guys who do look after it if I can teel them where to look.One of the website guys echoed the variables to the screen for me.
He modified the code by adding the line with the comment ‘JCH added’` public function validate( ) {
// Validate each form field
foreach ( $this->rules as $field => $specs ) {
if ( $specs[‘req’] && ! isset( $this->input_data[$field] ) ) {
throw new EWZ_Exception( get_class( $this ) . “: $field is required.” );
}
}
foreach ( $this->input_data as $field => $value ) {
echo ‘$field’ . ” = ‘” . $field . “‘\n\n” . ‘$value’ . ” array (print_r) =”;print_r($value); echo “\n\n\n”; // JCH ADDED
if( isset( $this->rules[$field] ) ){// rules[$field][‘val’] is either an array of allowed values or a single allowed value or ”
// It should be non-empty for fixed or limited types, or for some special v_… types, and otherwise ”
// Note php treats string ‘0’ like ” in a number of places, so handle it carefullyif ( $value == ” ){ // “0” == ” tests false
`
When I try and make my change, which is to add an option list with the options ‘Scored’ or ‘appraised-only’ I get the following output:[L030] $field = ‘ewzmode’ $value array (print_r) =layout $field = ‘layout_id’ $value array (print_r) =45 $field = ‘layout_name’ $value array (print_r) =Sequence competition layout $field = ‘max_num_items’ $value array (print_r) =1 $field = ‘notes’ $value array (print_r) = $field = ‘fields’ $value array (print_r) =Array ( [205] => Array ( [field_id] => 205 [field_header] => Title [fdata] => Array ( [maxstringchars] => 50 [fieldwidth] => 20 [textrows] => 1 [ss_col_fmt] => -1 ) [field_type] => str [field_ident] => Title [ss_column] => 2 ) [X7] => Array ( [field_id] => [field_header] => Scored [fdata] => Array ( [options] => Array ( [0] => Array ( [label] => scored [value] => scored [maxnum] => 1 ) [1] => Array ( [label] => appraised_only [value] => appraised [maxnum] => 1 ) ) ) [field_type] => opt [field_ident] => Scored [ss_column] => -1 [required] => 1 ) [206] => Array ( [field_id] => 206 [field_header] => Image File 1 [fdata] => Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) [field_type] => img [field_ident] => Filename1 [ss_column] => 5 ) [207] => Array ( [field_id] => 207 [field_header] => Image file 2 [fdata] => Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) [field_type] => img [field_ident] => Filename2 [ss_column] => 6 ) [208] => Array ( [field_id] => 208 [field_header] => Image file 3 [fdata] => Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) [field_type] => img [field_ident] => Filename3 [ss_column] => 7 ) [209] => Array ( [field_id] => 209 [field_header] => Image file 4 [fdata] => Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) [field_type] => img [field_ident] => Filename4 [ss_column] => 8 ) [210] => Array ( [field_id] => 210 [field_header] => Image file 5 [fdata] => Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) [field_type] => img [field_ident] => Filename5 [ss_column] => 9 ) [211] => Array ( [field_id] => 211 [field_header] => Image file 6 [fdata] => Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) [field_type] => img [field_ident] => Filename6 [ss_column] => 10 ) ) $field = ‘field_id’ $value array (print_r) =205 $field = ‘field_header’ $value array (print_r) =Title $field = ‘fdata’ $value array (print_r) =Array ( [maxstringchars] => 50 [fieldwidth] => 20 [textrows] => 1 [ss_col_fmt] => -1 ) $field = ‘field_type’ $value array (print_r) =str $field = ‘field_ident’ $value array (print_r) =Title $field = ‘ss_column’ $value array (print_r) =2 $field = ‘field_id’ $value array (print_r) = $field = ‘field_header’ $value array (print_r) =Scored $field = ‘fdata’ $value array (print_r) =Array ( [options] => Array ( [0] => Array ( [label] => scored [value] => scored [maxnum] => 1 ) [1] => Array ( [label] => appraised_only [value] => appraised [maxnum] => 1 ) ) ) $field = ‘field_type’ $value array (print_r) =opt $field = ‘field_ident’ $value array (print_r) =Scored $field = ‘ss_column’ $value array (print_r) =-1 $field = ‘required’ $value array (print_r) =1 $field = ‘field_id’ $value array (print_r) =206 $field = ‘field_header’ $value array (print_r) =Image File 1 $field = ‘fdata’ $value array (print_r) =Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) $field = ‘field_type’ $value array (print_r) =img $field = ‘field_ident’ $value array (print_r) =Filename1 $field = ‘ss_column’ $value array (print_r) =5 $field = ‘field_id’ $value array (print_r) =207 $field = ‘field_header’ $value array (print_r) =Image file 2 $field = ‘fdata’ $value array (print_r) =Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) $field = ‘field_type’ $value array (print_r) =img $field = ‘field_ident’ $value array (print_r) =Filename2 $field = ‘ss_column’ $value array (print_r) =6 $field = ‘field_id’ $value array (print_r) =208 $field = ‘field_header’ $value array (print_r) =Image file 3 $field = ‘fdata’ $value array (print_r) =Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) $field = ‘field_type’ $value array (print_r) =img $field = ‘field_ident’ $value array (print_r) =Filename3 $field = ‘ss_column’ $value array (print_r) =7 $field = ‘field_id’ $value array (print_r) =209 $field = ‘field_header’ $value array (print_r) =Image file 4 $field = ‘fdata’ $value array (print_r) =Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) $field = ‘field_type’ $value array (print_r) =img $field = ‘field_ident’ $value array (print_r) =Filename4 $field = ‘ss_column’ $value array (print_r) =8 $field = ‘field_id’ $value array (print_r) =210 $field = ‘field_header’ $value array (print_r) =Image file 5 $field = ‘fdata’ $value array (print_r) =Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) $field = ‘field_type’ $value array (print_r) =img $field = ‘field_ident’ $value array (print_r) =Filename5 $field = ‘ss_column’ $value array (print_r) =9 $field = ‘field_id’ $value array (print_r) =211 $field = ‘field_header’ $value array (print_r) =Image file 6 $field = ‘fdata’ $value array (print_r) =Array ( [max_img_w] => 1920 [ss_col_w] => -1 [max_img_h] => 1080 [ss_col_h] => -1 [ss_col_o] => -1 [max_img_size] => 2 [min_longest_dim] => 400 [allowed_image_types] => Array ( [0] => image/jpeg [1] => image/gif ) ) $field = ‘field_type’ $value array (print_r) =img $field = ‘field_ident’ $value array (print_r) =Filename6 $field = ‘ss_column’ $value array (print_r) =10 $field = ‘forder’ $value array (print_r) =Array ( [0] => forder_f45_c205_ [1] => forder_f45_cX7_ [2] => forder_f45_c206_ [3] => forder_f45_c207_ [4] => forder_f45_c208_ [5] => forder_f45_c209_ [6] => forder_f45_c210_ [7] => forder_f45_c211_ ) $field = ‘extra_cols’ $value array (print_r) =Array ( [att] => -1 [aat] => -1 [aae] => -1 [aac] => -1 [add] => -1 [dlc] => -1 [dtu] => 4 [iid] => 3 [wft] => -1 [wid] => -1 [wfm] => -1 [nam] => -1 [fnm] => -1 [lnm] => -1 [mnm] => 1 [mem] => -1 [mid] => -1 [mli] => -1 ) $field = ‘ewznonce’ $value array (print_r) =b0b19798ec $field = ‘_wp_http_referer’ $value array (print_r) =/wordpress/wp-admin/admin.php?page=ewzlayouts $field = ‘action’ $value array (print_r) =ewz_layout_changes $field = ‘client_action’ $value array (print_r) = *** EntryWizard ERROR *** Ewz_Layout_Input: unexpected input client_action
It looks as if the value being passed is empty, which gives me no clue.
But I don’t think whatever code is doing this is following standard practice, although there may be some exceptional reason for doing it.I’d suggest, if you can do it when your site is not in use, or on a test site, deactivating all your other plugins temporarily. If that fixes the problem, re-activate them one by one until you find the culprit. That’s standard WordPress procedure for tracking down plugin interaction issues. ( You can also change themes to check for theme issues ).
If you find a plugin that causes the problem, please let me know.
Otherwise, I can only suggest commenting out the line as I described above. You will have to make the change again any time you update EntryWizard.
If anyone else has run into this issue, I’d like to know about it.
If it turns out to affect others, too, I’ll have to address it. That “unexpected input” check has caught more than one of my own errors in development, so I’m rather reluctant to remove it 🙂
The web guys say we don’t have any plugins so they are not sure what is going on. They disabled the check in the layout code so I can now update my layouts.
However when I then created a webform to use the layout, when I tried to save the webform I got the following error:
[W001] *** EntryWizard ERROR *** Ewz_Webform_Input: unexpected input post_type post
I get the same error when I try and make any change to any existing webform, even if I just open an existing one and press ‘save changes’ without altering anything at all.
I’ve tried in both Internet explorer and Firefox in case it was browser dependent but got the same error in both.
Where did they disable the check? Commenting out line containing “unexpected input” in the file classes/validation/ewz_input.php should stop all these errors.
What version of EntryWizard are you running?
One other thought: it’s just possible you got some corrupted code somehow. You might want to try removing the entrywizard folder from your plugins folder ( keep a backup ), then download the current version and put that in its place.
( Don’t actually uninstall from the wordpress admin area, because that would lose all your data, too. )This was the code they changed:
} else {
// JCH 31/07/2016 – added this ignore for “client_action = see https://ww.wp.xz.cn/support/topic/l030-errors-conflict-with-duplicate-link-code?replies=2#post-8691236
// and speak to Bill Brandt
if ($field != ‘client_action’) {
throw new EWZ_Exception( get_class( $this ) . “: unexpected input $field ” . $value );
}
}
}They have also managed to change it in the other place too so I have been able to set up the first print and projected competitions.
You can see them here:
Then navigate to the members area -> competitions.
You won’t be able to see the actual webforms unless you have a member login but I guess you can work out what I was trying to do from the accompanying text.
Thanks for all your help. It looks like I am sorted for the time being and I will see if the web team can get to the bottom of the original problem once they get a bit more time, they are still working on getting the site ready for next season at the moment.
If I learn anything more I’ll post it back here.
The topic ‘L030 Errors conflict with duplicate link code’ is closed to new replies.