WP Contact form is not working, Spinning wheel forever after submitting form - wordpress

I have created a contact form on our website, I thought it worked in the past, but now when you click the submit button nothing happens and a blue spinning wheel comes up and nothing happens.
Does anyone know what it can be? Some manage to fix it by deleting the password-protect plugin but I do not have that enabled.
Java error from console
Link to the website with the contact form: https://www.hamarbilpleie.no/kontakt-oss/
Dubug plugin result
[03-Mar-2021 20:31:48 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/2/h/hamarbilpleie/www/wp-content/themes/carservice/contact_form.php on line 261
[03-Mar-2021 20:31:48 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to cs_phpmailer_init() must be an instance of PHPMailer, instance of PHPMailer\PHPMailer\PHPMailer given, called in /home/2/h/hamarbilpleie/www/wp-includes/class-wp-hook.php on line 287 and defined in /home/2/h/hamarbilpleie/www/wp-content/themes/carservice/functions.php:298 Stack trace:
#0 /home/2/h/hamarbilpleie/www/wp-includes/class-wp-hook.php(287): cs_phpmailer_init(Object(PHPMailer\PHPMailer\PHPMailer))
#1 /home/2/h/hamarbilpleie/www/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array)
#2 /home/2/h/hamarbilpleie/www/wp-includes/plugin.php(551): WP_Hook->do_action(Array)
#3 /home/2/h/hamarbilpleie/www/wp-includes/pluggable.php(494): do_action_ref_array('phpmailer_init', Array)
#4 /home/2/h/hamarbilpleie/www/wp-content/themes/carservice/contact_form.php(280): wp_mail(Array, 'Foresp\xC3\xB8rsel fr...', 'F\xC3\xB8lgende henve...', Array)
#5 /home/2/h/hamarbilpleie/www/wp-includes/class-wp-hook.php(287): cs_theme_contact_form('')
#6 /home/2/h/hamarbilple in /home/2/h/hamarbilpleie/www/wp-content/themes/carservice/functions.php on line 298

Probably you are having a bug in Javascript. What you have to do is, open up the Developer Tools in your browser, then goto Console tab. You would find the error messages there. Copy that error and share it with us.
EDIT
I can see that there's a 500 Internal Server Error (based on the screenshot you provided) when the data is submitted to the server. What you have to do is, see if there's any error log created inside your server. It would have some information regarding what is causing the issue. Please share it with us. If you are not able to see it, please follow this: Debugging in WordPress
EDIT 2
It appears that you are having two issues in your theme's functions.php file. It's using one depreciated function and for the other probably because of old code. The line numbers are #261 and #298 (/wp-content/themes/carservice/functions.php). The easy would be to ask your theme developer to get it fixed for you. If you have the update available for your theme and plugins, make sure you update it. Kindly note that, if you have done any modifications on the functions.php file, instead of doing it in a child theme, those changes would be overwritten when you update the theme.

After some digging and discussion, I found out that the theme had not been updated for ages. But to find an update for this was not easy. For some reason, it did not automatically update from WP. But it is fixed now. Thanks for the tips and hints, guys.

Related

Uncaught Error: Call to a member function get_slider_language()

I'm attempting to move my wordpress sites over to Google Cloud, I've moved two successfully with revslider - the third had a bloated database and I needed to trim some fat to get it in.
I'm now getting the following error when trying to view a slide from any of the front-end pages.
Fatal error: Uncaught Error: Call to a member function get_slider_language() on null in /var/www/rr/wp-content/plugins/revslider/includes/output.class.php:675 Stack trace: #0 /var/www/rr/wp-content/plugins/revslider/includes/output.class.php(634): RevSliderOutput->add_slider_base() #1 /var/www/rr/wp-content/plugins/revslider/revslider.php(96): RevSliderOutput->add_slider_to_stage('new_home', '', '', '', '') #2 /var/www/rr/wp-includes/shortcodes.php(343): rev_slider_shortcode(Array, '', 'rev_slider') #3 [internal function]: do_shortcode_tag(Array) #4 /var/www/rr/wp-includes/shortcodes.php(218): preg_replace_callback('/\\[(\\[?)(rev_sl...', 'do_shortcode_ta...', '[rev_slider sli...') #5 /var/www/rr/wp-content/plugins/js_composer/include/helpers/helpers.php(240): do_shortcode('[rev_slider sli...') #6 /var/www/rr/wp-content/plugins/js_composer/include/templates/shortcodes/vc_column.php(94): wpb_js_remove_wpautop('[rev_slider sli...') #7 /var/www/rr/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakerys in /var/www/rr/wp-content/plugins/revslider/includes/output.class.php on line 675
There has been a critical error on your website.
Learn more about debugging in WordPress.
I've attempted the following steps to no avail.
Switched theme.
Disabled all plugins.
Deleted all slides and attempted with a freshly made slide.
Updated all plugins, including deleting Slider Revolution entirely and reinstalling the latest version.
I removed some language packs from the VM in an attempt to claw back some space and thought that might've been it - but reinstalling with apt-get -y install "check-language-support -l en" doesn't seem to have helped.
Updated to PHP 7.4.8
I'm using a Google Cloud VM with OpenLiteSpeed, and MySQL+Redis. I changed the only relevant option I could see in Slider Revolution Global Config from using default as the language to en. The slide works as expected in preview mode within the admin panel.
This is caused by what appears to be a bug in the Revolution Slider plugin, at least as of v6.2.21 (and it doesn't appear to have been fixed since). In revslider/includes/output.class.php:678 it calls
$lang = $rs_wmpl->get_slider_language($this->slider);
but if the WPML plugin is not installed, then $rs_wmpl is null.
Until they fix it you can hack the plugin to check for null, e.g.,
//set slider language
if($this->get_preview_mode() == false && !empty($rs_wmpl)){
$lang = $rs_wmpl->get_slider_language($this->slider);
$this->change_language($lang);
}
Edit: This bug doesn't reproduce under ordinary page loads, but does reproduce when loading the site under WP-CLI, e.g., via wp profile. Suspect it has something to do with the way global variables are handled in that case.

WordPress Fatal Error Class 'wpforge_walker' not found line 317

I'm receiving the following error on my WordPress website:
Fatal error: Class 'wpforge_walker' not found in
/home/content/25/11572025/html/site/wp-content/themes/wp-starter/content-nav.php
on line 317
On my FTP File Manager, line 317 on "content-nav.php" shows the following:
'walker' => new wpforge_walker( array(
After reading on this issue other forums mentioned how removing the parenthesis might solve the problem. Accordingly, this is how I saved the "content-nav.php" file:
'walker' => new wpforge_walker
After refreshing my website, it is showing the following error:
Parse error: syntax error, unexpected ''in_top_bar''
(T_CONSTANT_ENCAPSED_STRING), expecting ')' in
/home/content/25/11572025/html/site/wp-content/themes/wp-starter/content-nav.php
on line 319
I went back to my FTP File Manager and put back the "( array(" into the "content-nav.php" file and now I'm back to my initial problem.
Any assistance would be appreciated. Thanks!
You are using the Theme wp-starter, can you share any more info about it, developer, website, etc.?
Share a bigger chunk of code from content-nav.php, for example rows 300 till 350. Make sure you include the complete block of code.
Removing ( array( will result in another error. This is normal because it will completely break the function.
Some info about the error.
The code wants to load the class wpforge_walker, but it isn't available. Something went wrong with including the file that contains that particular class.
In the error log, do you see another returning log (notice or something else) before the fatal error? I'm looking for an include_once() / No such file or directory error, or something like that.
Another option is to re-upload ALL theme files, maybe an update or something else did not complete correctly. You can overwrite all theme files savely.
Edit: re-upload all theme files fixed the problem.
Disable theme to get WP admin access.
Using FTP or a hosting filemanager you can rename the theme folder, example 'wp-starter-off'.
WP will then deactivate the theme and you can access WP again.
Regards, Bjorn

Wordpress Contact form 7 - dropdown issue due to too many options

I've been encountering an error when having too many options in a drop down. It simply freezes if there are over 222 options.
I'm running on PHP 5.3.5, but this also happens when running on PHP 5.3.13. Curiously, this issue DOES NOT happen when using 5.2.27.
I've been trying to back trace the error, and I believe it's got something to do with the preg_replace_callback() function called inside do_shortcode () in /includes/shortcodes.php on row 62.
Has any of you encountered the same issue, and do you happen to know how to solve it?
Thanks

Wordpress error when sending comment

I'm using the default comments template, on my own self-built theme. When I send a comment I get the following error message:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'wp_set_comment_cookies' not found or invalid function name in /home/mattator/public_html/wp-includes/plugin.php on line 403
Warning: Cannot modify header information - headers already sent by (output started at /home/mattator/public_html/wp-includes/plugin.php:403) in /home/mattator/public_html/wp-includes/pluggable.php on line 881
couldn't find a call to the funciton 'wp_set_comment_cookies' anywhere in the code. It is noteworthy that despite the error message the comment is being sent properly. I also tried to disable all plugins but the problem persists.
Any ideas would be appreciated.
May be you have some extra white space before
<?php
tag in starting of a theme file
Thanks
Well, I experimented a little bit, and as turns out the problem was a call to the function "nocache_headers()", in Line 18 of the file "wp-comments-post.php" which lies at WP root directory.
I deleted it, and voila, everything works. Not sure why though.

Drupal Themes getting "unselected"

Sometimes, at least 1 time a month +-, when I visit my site, there is no theme selected and I get a lot of error code.
Notice: Undefined index: highlighted em include() (linha 120 de /var/www/novoportal.faccat.br/htdocs/portal/modules/system/page.tpl.php).
Notice: Undefined index: sidebar_first em include() (linha 132 de /var/www/novoportal.faccat.br/htdocs/portal/modules/system/page.tpl.php).
Notice: Undefined index: sidebar_second em include() (linha 138 de /var/www/novoportal.faccat.br/htdocs/portal/modules/system/page.tpl.php).
Notice: Undefined index: genesis em drupal_theme_initialize() (linha 100 de /var/www/novoportal.faccat.br/htdocs/portal/includes/theme.inc).
Notice: Trying to get property of non-object em _drupal_theme_initialize() (linha 145 de /var/www/novoportal.faccat.br/htdocs/portal/includes/theme.inc).
Notice: Trying to get property of non-object em _theme_load_registry() (linha 321 de /var/www/novoportal.faccat.br/htdocs/portal/includes/theme.inc).
Notice: Undefined index: genesis em theme_get_setting() (linha 1316 de /var/www/novoportal.faccat.br/htdocs/portal/includes/theme.inc).
I always need to select the theme again and clear the cache.
Also I used the Devel theme rebuild tool, but I keep getting these errors.
Any Ideas?
This is what I suggest:
1) First check the .info file and make sure the regions are there as per page.tpl.php. Your error is based on that .
2) If the the above is true then the next thing I would do is make a new fresh installation and only move the sites/all/themes/ folder to it and the db I would then test it to make sure the error does not occur.
Hope it helps.
From your description I think it might be a weird bug in Drupals theme discovery - try calling:
_system_rebuild_theme_data()
One call to it should be enough so don't leave it permanent - as it will cripple your site load times.
I've filed a bug and description.
Edit
The above will probably not fix your problem permanently, I just thought it would at the time of writing.
I believe this may be caused in some cases by a failed cron run.
I was observing this problem on a dev site where I was basically the only person interacting with it. The problem would surface after a couple of hours of inactivity. The only events in the log would be related to cron runs.
I was able to determine that a normal, user-initiated cron run would not cause the problem.
One type of cron entry was an 'invalid key' error. I investigated and determined that there was a cron job set up to run without a key. After eliminating that cron job, I wasn't able to observe the error any longer.
i also had faced similar issue and after installing nucleus https://www.drupal.org/project/nucleus theme (which is required to install any custom theme on drupal7) and secondly I deleted cache entry for my custom theme(drupal_cache table), then above issue resolved.I could see modules now then i went to appearance tab and set my custom theme as Default theme.
Hope this would help
Though I have no answer to this problem, I thought it might come in handy to add some cross links:
"Theme is randomly disabled" at drupal.org
"Themes (custom/derived/new) are disabled at random intervals" at drupal.org
If you find more links, please add them here!
EDIT (2014-10-22): In a multisite environment we had not installed the default site at first. Because of this Drush occasionally generated warnings or errors, so we added a settings.php file to the default site's directory with database credentials of a test site's database. Since we installed the default site with it's own database, the problem fortunately has not occurred anymore. :-)
It might have had something to do with multiple crons being executed on the same database at the same time...?

Resources