WPDM page template – Uncaught TypeError: Argument 3

Viewing 2 posts - 1 through 2 (of 2 total)
#159171

Stefano Cardinale
Participant

Hello, I have a lot of errors Fatal error: Uncaught TypeError: Argument 3
due to this: at line 68 of the code there is a call to get_query_template( ‘page’, $new_template ) but in my case $new_template is a string only and not an array.
I added a line to ensure that $new_Template is an array and this solve this error

67 $new_template = get_post_meta( $id, ‘_wp_page_template’, true );
ADDED LINE if ($new_template && !is_array($new_template)) $new_template = array($new_template);
68 if ( $new_template && file_exists(get_query_template( ‘page’, $new_template )) ) :

I hope this will help other users

#159173

Tanvir
Spectator

Hello @Stevenp,

Sorry for this inconvenience.

Make sure that WPDM and all add-ons you are using of WPDM are in the latest version. We released new version of WPDM yesterday. so please update your WPDM version too. Also for page template, Please update from here.
If, still the problem exists then please share your admin login credentials with us in a private reply so that we can debug and give you a better solution about it?

Best Regards

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘WPDM page template – Uncaught TypeError: Argument 3’ is closed to new replies.