Captcha not loading 2.13.2 r133

hgs

Quote from: tobyw7 on November 16, 2022, 08:41:12 PM
Quote from: crnogorac081 on November 14, 2022, 09:28:26 AM
And the server details are correct ?  Is the mail sent from other modules or  forgotten password form ?

So I created a test user to demo this with, entered the email address but got the following error when pressing the forgot button

There was an uncatched exception
Class "PasswordHash" not found
in line (66) of (/admin/login/forgot/index.php):

I think this already a known issue?

Yes, the bug is known and fixed in the next version
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

sternchen8875

Question to understand....

- you talk about the standard Backend-Login in a newer WB-Version?

- do you use a in this WB-Installation registered email-adress?

You can change the password with this function only one time in two hours (this check means frontend && Backend)

i get the posted error message in a locale testarea, but not on the online server

tobyw7

Quote from: crnogorac081 on November 14, 2022, 09:28:26 AM
And the server details are correct ?  Is the mail sent from other modules or  forgotten password form ?

So I created a test user to demo this with, entered the email address but got the following error when pressing the forgot button

There was an uncatched exception
Class "PasswordHash" not found
in line (66) of (/admin/login/forgot/index.php):

I think this already a known issue?

hgs

I have made a fresh WB installation with r133 and tested everything so far.
php8.1.7
Mail is still on default PHP MAIL

module:
Form--> Captcha is visible and the form is sent.
mpForm 1.3.42.1--> Captcha is visible and the form is sent

Here is the link to the test page

The back with "forgot password" is confirmed and will be fixed in the next version

mpForm also write to the ErrorLogger.
"created: [Tue, 15 Nov 2022 06:29:57 +0000]
Tue, 15 Nov 2022 06:33:58 +0000 [E_DEPRECATED] /modules/mpform/save_field.php:[448]  from /modules/mpform/save_field.php:[448] str_replace "str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated"
Tue, 15 Nov 2022 06:34:32 +0000 [E_USER_DEPRECATED] /framework/class.wb.php:[537]  from /framework/class.wb.php:[537] trigger_error "invalid method call: bin\wb::get_user_id change it to getUserId()"

To "get_user_id" I have already written something here.


LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

crnogorac081

And the server details are correct ?  Is the mail sent from other modules or  forgotten password form ?
Web developer

hgs

SMTP is enabled by default on the test pages.
Unfortunately, the form is not sent. :(
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

crnogorac081

Do not send emails via plain phpmail because it will go to spam , use smtp mail
Web developer

tobyw7

Quote from: crnogorac081 on November 13, 2022, 04:55:41 PM
In backend top buttons you have info, there you will find Server info where you can find if gd library is is already preinstalled on your server. So maybe there is conflict between server gd library and the one from module

I checked, the only things I can see are myqsqli, curl and mbstring...

But thinking about it, the last time my web host did a php upgrade they missed off various modules. I sent a test from the form which says it sent but I haven't received the email so wondering if phpmail is also a problem. I will do some more testing in the week (Y)

crnogorac081

In backend top buttons you have info, there you will find Server info where you can find if gd library is is already preinstalled on your server. So maybe there is conflict between server gd library and the one from module
Web developer

tobyw7

Quote from: sternchen8875 on November 13, 2022, 01:55:30 PM


please take a look into the database and there to the table "TP_mod_mpform_settings" (TP == Table_Prefix)  and there to the value of the setting "use_captcha". Must be 0 or 1 (zero or one).
It is not possible, to change the default value == 0, if the server run's in mysql-strict-mode

if your value in the database == 1, try to change the Type of CAPTCHA in AdminTools -> Captcha Spam Protect

if your value in the database == 0 (zero), try to change it directly in the database to 1 and try it again

Blank Template

the old blank template can not work with the default WB-Installation (since WB 2.10.x). WB use a filter to make some corrections in the code, for example: move  a <link>-Definition from the body-area into the <head>-Area, but the old blank-template has no <body>- and no <head>-Area, it display only the page content

P.S.: i'm sure, your captcha-Problem has nothing to do with the used frontend-template

I checked through this and saw the simple option to test would be to try selecting a different captcha type. Changed to "Calculation as image" and now the captcha loads.

crnogorac081

Hello, this means that somewhere your code is invalid, you are missing or you have an extra closing </div>

Quote from: tobyw7 on November 13, 2022, 01:15:16 PM

There was an uncatched exception
malformed document created, missing head area
in line (67) of (/modules/output_filter/Filters/filterCssToHead.php)
Web developer

sternchen8875

some important corrections, forgot, to explain it in my first post....

mpform ask PHP for the gd-extension (see PHP-Info in the WB-Info-Windows and there a special section called "gd", if installed")

the add.php ask for this section and send's true or false as answer. TRUE is like 1, so no problem, but FALSE is nothing, because, the script needs a integer value, but get nothing as answer and because of this, you get a error message, if you add a mpform-section

if you set the database value from 0 to 1, like my answer in the top) and the gd-library is not installed on this server, you see no captcha picture in the mpform, because, the picture will build "on demand" with the gd-library and put there calculation for the captcha to the background-images.

So without a installed gd-extension on this server, you cannot use the captcha in your mpform. you can set it in "advanced settings" from mpform to DISABLED in the setting "use Captcha"

sternchen8875

Quote from: tobyw7 on November 13, 2022, 01:05:07 PM
I noticed that the GET request to load the captcha is actually succeeding. I tried to load the captcha php directly and received this error:

https://frantik-web.co.uk/include/captcha/captchas/create_ttf_image.php

please take a look into the database and there to the table "TP_mod_mpform_settings" (TP == Table_Prefix)  and there to the value of the setting "use_captcha". Must be 0 or 1 (zero or one).
It is not possible, to change the default value == 0, if the server run's in mysql-strict-mode

if your value in the database == 1, try to change the Type of CAPTCHA in AdminTools -> Captcha Spam Protect

if your value in the database == 0 (zero), try to change it directly in the database to 1 and try it again

Blank Template

the old blank template can not work with the default WB-Installation (since WB 2.10.x). WB use a filter to make some corrections in the code, for example: move  a <link>-Definition from the body-area into the <head>-Area, but the old blank-template has no <body>- and no <head>-Area, it display only the page content

P.S.: i'm sure, your captcha-Problem has nothing to do with the used frontend-template

hgs

That's not what I mean!
I meant the default template supplied for the current WB version.

Or look in your template if in front of the head area
you can find this entry:<?php
        
}

// automatically include optional WB module files (frontend.css)
    
register_frontend_modfiles('css');
// automatically include optional WB module files (frontend.js, jQuery) enable OldModFiles in OutputFilter
    
register_frontend_modfiles('jquery');
    
register_frontend_modfiles('js');
?>

    </head>
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

tobyw7

Quote from: hgs on November 13, 2022, 01:09:36 PM
Please try the default template.

I assume that it works with it.

Hi,

OK So with the Blank Template, I got the following error:

There was an uncatched exception
malformed document created, missing head area
in line (67) of (/modules/output_filter/Filters/filterCssToHead.php):


Changed to template Round and the form loads (not duplicated) but the captcha still fails (PHP error as on the last post if you try and load the image in new window)

https://frantik-web.co.uk/pages/contact-test.php

hgs

Please try the default template.

I assume that it works with it.
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

tobyw7

#6
Quote from: crnogorac081 on November 12, 2022, 07:57:11 PM
Hello, take a look at this:

https://forum.websitebaker.org/index.php/topic,31921.msg223520.html#msg223520

Maybe https is not loading images

Hi

Thanks, I have checked the config and htacess - all looks OK.

I created the droplet too, and enabled it. Do I need to do anything else?


I did some further testing in incognito mode,  in case it was something with Google Ads conflicting.

I noticed that the GET request to load the captcha is actually succeeding. I tried to load the captcha php directly and received this error:

https://frantik-web.co.uk/include/captcha/captchas/create_ttf_image.php

There was an uncatched exception
random_int() expects exactly 2 arguments, 0 given
in line (30) of (/include/captcha/captchas/create_ttf_image.php):

crnogorac081

Web developer

tobyw7

Quote from: hgs on November 12, 2022, 03:28:11 PM
Have a look hereNew Version

I have uploaded this new version of mpform but doesn't seem to have changed anything.

https://frantik-web.co.uk/pages/contact-test.php

In Firefox dev tools I see this error: Uncaught ReferenceError: WB_REL is not defined

Thank you

hgs

#3
Have a look here   New Version
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

tobyw7

I tested creating a new page and exporting the form fields from the other form, and I ended up with the same duplication of fields.

tobyw7

#1
Hi

I've just updated to the latest version of WB.

Using mpform 1.3.40, also updated to latest version from addon depository.

I had this problem 2yrs ago but things have changed since then so likely not the same problem.

PHP is also updated on my host to 8.1 now.

I don't know why I have one set of form above my existing too. I think the module may be slightly corrupt? Is it best to remove and add in again?

https://frantik-web.co.uk/pages/contact-test.php

Also getting a few PHP errors when going into the form settings


Deprecated: Optional parameter $java declared before required parameter $wbt is implicitly treated as a required parameter in /public_html/modules/mpform/modify_settings.php on line 171

Deprecated: Optional parameter $fname declared before required parameter $wbt is implicitly treated as a required parameter in /public_html/modules/mpform/modify_settings.php on line 171

Deprecated: Optional parameter $java declared before required parameter $wbt is implicitly treated as a required parameter in /public_html/modules/mpform/modify_settings.php on line 236

Deprecated: Optional parameter $fname declared before required parameter $wbt is implicitly treated as a required parameter in /public_html/modules/mpform/modify_settings.php on line 236
There was an uncatched exception
Call to a member function print_error() on null
in line (261) of (/modules/admin.php):