PHP Fatal error: Uncaught Error: Call to undefined function cmplz_get_cookiebanners() in …/wp-content/mu-plugins/banner.php:44
I had to remove this addon in folder mu-plugins to correct this error. Am I correct that this addon isn’t working anymore with the recent verion of WordPress?
I could notice the form isn’t loading, however, it might be more related to the minification. Could you temporarily disable the minification in the Litespeed plugin and then check how it behaves?
If it works, clearing the cache should resolve on the plugin side. Would also recommend checking whether enabling the “Load form using AJAX” option makes any difference or not. If this option is currently off, attempt switching it on or performing the opposite action if it is already enabled. Test your site’s functionality throughout these adjustments to monitor for any changes.
The option can be found when you edit your form under “Behaviour” tab > Rendering
If the issue is still the same even after the above then please open a new thread referring to this thread, so that we can investigate further.
Since this thread is initially opened by a different user, troubleshooting in this thread can cause miscommunication.
Please use the following URL to open a new thread:
https://www.ads-software.com/support/plugin/forminator/#new-topic-0
I hope you understand.
Hello, hope you’re doing good!
I open a new topic because I followed the steps to install the mu-plugin for calculating the difference between dates and it runs fine for me in the preview but is not displaying the form in any other browser. Looks weird..
This is the topic I was following:
https://www.ads-software.com/support/topic/forminator-mu-plugins-difference-between-two-dates/
I did the last instructions @wpmudevsupport11 gave me about lightspeed and enabling AJAX.
– Lightspeed changes did nothing.
– Enabling AJAX worked to display the form but the mu-plugin is not working and filling the “number” field with the difference of dates.
I hope you can give me a hand!
Thanks
I’m using Complianz and Rentalhive theme and I want to block the Google Maps API till the user accepts all cookies. I use script center to block google urls like it describes here: https://complianz.io/debugging-google-maps/.
But, no matter the settings I tried (accept/deny), in the console it gives the following error message: Uncaught ReferenceError: google is not defined. It seems some js, like common.min.js or jquery.min.js etc., still try to request the Google Maps.
Uncaught ReferenceError: google is not defined
at HTMLDivElement. (common.min.js?ver=1.3.7:1:2912)
at Function.each (jquery.min.js?ver=3.7.0:2:3129)
at e..each (jquery.min.js?ver=3.7.0:2:1594)
at hivepress.initGeolocation (common.min.js?ver=1.3.7:1:2077)
at HTMLDocument. (common.min.js?ver=1.3.7:1:4104)
at HTMLDocument.dispatch (jquery.min.js?ver=3.7.0:2:39997)
at v.handle (jquery.min.js?ver=3.7.0:2:37968)
at Object.trigger (jquery.min.js?ver=3.7.0:2:70063)
at HTMLDocument. (jquery.min.js?ver=3.7.0:2:70665)
at Function.each (jquery.min.js?ver=3.7.0:2:3129)
On the main page I have the similar error:
Uncaught ReferenceError: google is not defined
at GeoComplete.initGeocoder (jquery.geocomplete.min.js?ver=1.3.7:8:2461)
at GeoComplete.init (jquery.geocomplete.min.js?ver=1.3.7:8:1270)
at new GeoComplete (jquery.geocomplete.min.js?ver=1.3.7:8:1177)
at HTMLInputElement.<anonymous> (jquery.geocomplete.min.js?ver=1.3.7:8:8724)
at Function.each (jquery.min.js?ver=3.7.0:2:3129)
at e.<computed>.each (jquery.min.js?ver=3.7.0:2:1594)
at $.fn.geocomplete (jquery.geocomplete.min.js?ver=1.3.7:8:8649)
at HTMLDivElement.<anonymous> (common.min.js?ver=1.3.7:1:1179)
at Function.each (jquery.min.js?ver=3.7.0:2:3129)
at e.<computed>.each (jquery.min.js?ver=3.7.0:2:1594)
I followed this tutorial to fix it : https://complianz.io/custom-google-maps-implementation/ but still I can’t get the problem fixed.
Could you please help me to find a technical solution with a MU plugin? I would be happy about any help!
Best regards
]]>I’m working on the user experience of my paginated form.
In trying to reduce friction, I’d like the form to auto-submit when a custom css class becomes visible.
I’ve tried using an mu-plugin set-up with a mutation observer, but it breaks my site.
I’ve tried using similar code in the custom css/javascript section of my website and it does nothing at all.
As a temp workaround while I build out the form I even tried placing bespoke submit buttons using the HTML field trick described here: https://www.ads-software.com/support/topic/how-to-add-custom-html-inside-submit-button/
But I can’t get those buttons to work either.
My preference is definitely for an auto-submit – I think its a better user experience in this form’s use case.
I can’t seem to figure this out, can you please help me with this?
please see a wetransfer link with all code involved: https://we.tl/t-tR9KL6cgXe
Look forward to hearing from you,
Sebastian
So, I have a Forminator regsitration form that I want to change the redirect URL of, depending on the URL variable
I copied and changed this code thinking it would work:
<?php
/**
* Plugin Name: [Forminator] - Custom Form Redirect
* Plugin URI: https://wpmudev.com/
* Description: Adds custom redirect to Forms based on submitted data
* Task: SLS-183
* Version: 1.0.0
* Author: Panos Lyrakis @ WPMUDEV
* Author URI: https://wpmudev.com/
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( defined( 'WP_CLI' ) && WP_CLI ) {
return;
}
if ( ! class_exists( 'WPMUDEV_Forminator_CustomForm_Redirect' ) ) {
class WPMUDEV_Forminator_CustomForm_Redirect {
private $form_id = 380;
private static $_instance = null;
public static function get_instance() {
if( is_null( self::$_instance ) ){
self::$_instance = new WPMUDEV_Forminator_CustomForm_Redirect();
}
return self::$_instance;
}
private function __construct() {
add_filter( 'forminator_custom_form_submit_response', array( $this, 'handle_response' ), 20, 2 );
add_filter( 'forminator_custom_form_ajax_submit_response', array( $this, 'handle_response' ), 20, 2 );
}
public function handle_response( $response, $form_id ) {
if ( ! $this->is_valid_form( $form_id ) ) {
return $response;
}
if( isset( $response['url'] ) ){
$response['url'] = $this->calc_url( $response['url'] );
}
return $response;
}
private function calc_url( $redirect_url ) {
$new_url = get_bloginfo('url').'/checkout';
if(isset($_GET['redirect_to']) && $_GET['redirect_to'] == $new_url) {
$redirect_url = esc_url($new_url);
}
return $redirect_url;
}
private function is_valid_form( $form_id ) {
return (int) $form_id === $this->form_id;
}
}
if ( ! function_exists( 'wpmudev_forminator_customform_redirect' ) ) {
function wpmudev_forminator_customform_redirect(){
return WPMUDEV_Forminator_CustomForm_Redirect::get_instance();
};
add_action( 'plugins_loaded', 'wpmudev_forminator_customform_redirect', 99 );
}
}
The bit I edited is the calc_url()
function, as that’s the bit in the original code that did the redirect URL change (I think)
The login/reg page has the URL variable ?redirect_to=https://mydomainnamehere.com/checkout
on the end which is needed for something else and can’t be removed
Basically, I want the form with ID = 380
to redirect to that URL variable, but ONLY if it is present (hence the if statement in my calc_url() change above
Can anyone see why this isn’t working?
]]>I found a mu-plugin workaround to change the email but it’s only changing the subject and not the message content so I think it’s something in Forminator that is making it not work. I asked the guy who made it and he said it’s probably Forminator doing something. He did say something about the priorities for the hook but I got no idea.
This is what I have for the code. Do you know how it can be fixed to make it work?
I edited the activation link part to “?page=account_activation&key=$key” as that what comes in the email but nothing.
Thanks.
<?php
/**
* Plugin Name: Custom Activation Email
* Description: Change what is sent for the email activation.
*/
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from($old) {
return 'SENDER EMAIL';
}
function new_mail_from_name($old) {
return 'SENDER NAME';
}
add_filter( 'wpmu_signup_user_notification_subject', 'my_activation_subject', 10, 4 );
function my_activation_subject( $text ) {
return 'Activate your account for SITE NAME';
}
add_filter('wpmu_signup_user_notification_email', 'my_custom_email_message', 10, 4);
function my_custom_email_message($message, $user, $user_email, $key) {
$message = sprintf(__(( "To activate your new account, please click the following link:\n\n%s\n\n After you activate you will be able to log in.\n\n" ),
$user, $user_email, $key, $meta),site_url( "?page=account_activation&key=$key" ));
return sprintf($message);
}
]]>I would like to use Complianz with the Homey Theme. I have problems with the integration of Google Maps. I don’t get them loaded correctly when the Google Maps integration of Complianz is enabled.
I came across the following thread where the same thing was discussed: https://www.ads-software.com/support/topic/updates-dont-make-google-maps-on-my-site-work/
This one is set to “resolved” but I could not find a solution in the replies. Could meanwhile find a technical solution e.g. with a MU plugin? I would be very happy about any help.
Kind regards
wp_options' doesn't exist for query INSERT INTO 'wp_options'('option_name','option_value','autoload') VALUES ('wp-phpmyadmin-extension'...
]]>When we try to update WordPress either through one touch or manually it crashes.
The debug log seems to point at a mu-plugin causing the crash. We disabled all other plugins and it still crashes.
Here is what the debug script says:
thrown in /home/(***client***)/public_html/wp-content/mu-plugins/force-strong-passwords/slt-force-strong-passwords.php on line 53
[23-Sep-2021 02:31:41 UTC] PHP Notice: is_embed was called <strong>incorrectly</strong>. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a href="https://www.ads-software.com/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /home/(***client***)/public_html/wp-includes/functions.php on line 5663
[23-Sep-2021 02:31:41 UTC] PHP Notice: is_search was called <strong>incorrectly</strong>. Conditional query tags do not work before the query is run. Before then, they always return false. Please see <a href="https://www.ads-software.com/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 3.1.0.) in /home/(***client***)/public_html/wp-includes/functions.php on line 5663
[23-Sep-2021 02:31:44 UTC] PHP Fatal error: Uncaught TypeError: round(): Argument #1 ($num) must be of type int|float, string given in /home/dcac/public_html/wp-content/mu-plugins/force-strong-passwords/slt-force-strong-passwords.php:53
Any idea how to fix this so I can update the platform?
]]>i just need to find inside my hosting file manager(cPanel in my case )the folder wp-content/mu-plugin and add that .php file?
and if this remove the shipping option on the check out in PayPal they will understand why this is this way i mean there’s no going to be any kind of trouble with my account to process this action? thanks for you attention.
]]>