Post by sfsf99 » Wed Nov 01, 2023 5:54 am

Hi,

I can't fix this by myself, I tested this in Chrome, Firefox and Chrome in mobile in standard version 4.0.2.3 in php 8.1.25. In version 4.0.1.1 it works ok.

Fields from register.php and login.php are as data received in the ajax call (common.js), but when I debug the register and login jquery functions in register.php and login.php, no post fields are received, all empty. When also looking in debug tools from browser I see this fields in network (the calls) with the post fields displayed but there are 2 calls, first a post call and redirected to a get call, maybe that is normally as builded. This is the latest standard version without modifications.

The header javascript / jqeury files are :
<script src="catalog/view/javascript/jquery/jquery-3.7.1.min.js" type="text/javascript"></script>
<link href="catalog/view/stylesheet/bootstrap.css" type="text/css" rel="stylesheet" media="screen"/>
<link href="catalog/view/stylesheet/fonts/fontawesome/css/all.min.css" type="text/css" rel="stylesheet"/>
<link href="catalog/view/stylesheet/stylesheet.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="catalog/view/javascript/jquery/datetimepicker/moment.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/datetimepicker/moment-with-locales.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/datetimepicker/daterangepicker.js"></script>
<link href="catalog/view/javascript/jquery/datetimepicker/daterangepicker.css" rel="stylesheet" type="text/css"/>
<script src="catalog/view/javascript/common.js" type="text/javascript"></script>

If other developers do not have this problem it is a local problem of course, what could it be (standard version 4.0.2.3) ?

Thanks for responces!
Last edited by sfsf99 on Wed Nov 01, 2023 6:24 am, edited 1 time in total.

New member

Posts

Joined
Thu Jan 11, 2018 5:22 am

Post by softmonke » Wed Nov 01, 2023 6:07 am

Does that mean when you try to register or login, you fill up the fields and submit the form, nothing happens? Have you checked the browser console to look at the request made and the response returned?

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by sfsf99 » Wed Nov 01, 2023 6:33 am

Yes, so I receive messages to fill in the fields but are already filled.

What I wrote, I see these fields in data ajax when debugging, but not as post fields in the php jquery functions register and login.

And that functions are only called once, even I see 2 calls in the network, a post and redirected as a get (so you could think called 2x).

The cart is working without problems.

New member

Posts

Joined
Thu Jan 11, 2018 5:22 am

Post by softmonke » Thu Nov 02, 2023 3:51 am

sfsf99 wrote:
Wed Nov 01, 2023 6:33 am
Yes, so I receive messages to fill in the fields but are already filled.

What I wrote, I see these fields in data ajax when debugging, but not as post fields in the php jquery functions register and login.

And that functions are only called once, even I see 2 calls in the network, a post and redirected as a get (so you could think called 2x).

The cart is working without problems.
What do you mean by "php jquery functions register and login"? jQuery is a JavaScript library and PHP is a backend programming language. Perhaps you can elaborate on how you are debugging the issue?

The redirection is correct, as users will get redirected to the success page, if they successfully register an account. On the same note, the user will be redirected when successfully logging in as well.

Are you trying to make modifications? Or are there any third-party extensions installed? This doesn't sound like the default behaviour of OpenCart, and it works fine for me on a fresh installation of OpenCart 4.0.2.3.

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by sfsf99 » Thu Nov 02, 2023 2:53 pm

softmonke wrote Wed Nov 01, 2023 8:51 pm

What do you mean by "php jquery functions register and login"? jQuery is a JavaScript library and PHP is a backend programming language.
Sorry this was indeed not clear described. I mean in the jquery ajax call to register.php, function register, and login.php, function login.

But I have it already clear for myself, the OpenCart 4 software is ok, it is a a server problem. When I create a new subdomain on the server and copy the OpenCart 4 software from my domain (with the problems) to the subdomain, the problems are gone.

So in the domain something is going wrong, processes have another behaviour than in the subdomain (e.g. what I wrote, a call is redirected to a second call etc. etc.). Difficult to explain clearly without images.

I am going to ask to my provider to setup the domain again like I did for the subdomain, hopefully is the problem gone when installing the OC 4 software again!

I hope there is not a smart hacker busy in the server ..

New member

Posts

Joined
Thu Jan 11, 2018 5:22 am

Post by JNeuhoff » Thu Nov 02, 2023 6:34 pm

Since nobody else can reproduce this error, the next step would be to check the web browser's inspect function for the network, to see what these Ajax requests exactly submit. to what URL, with what method (POST or GET). And then check the server's raw access logs to verify the requests were received.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by sfsf99 » Fri Nov 03, 2023 3:02 am

What you suggested JNeuhoff I have already done, so I see the strange behaviour I already described.

But I have seen now if I copy the database to my subdomain, the problem is there also.

So now I go to see why, what is the relation ..

New member

Posts

Joined
Thu Jan 11, 2018 5:22 am

Post by straightlight » Fri Nov 03, 2023 8:16 am

sfsf99 wrote:
Fri Nov 03, 2023 3:02 am
What you suggested JNeuhoff I have already done, so I see the strange behaviour I already described.

But I have seen now if I copy the database to my subdomain, the problem is there also.

So now I go to see why, what is the relation ..
Which route in the store are you reporting this issue? Have you also looked in the Developers Kit > Console and the Network tab on your browser while troubleshooting this? By running a website analyzer scan, you could also identify some of the errors.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sfsf99 » Fri Nov 03, 2023 12:11 pm

Thanks all for your responces.

It is now clear for me.

If I install OC 4.0.2.3 in the root everything goes right.

If I install OC 4.0.2.3 in a submap e.g. /webshop/ everything works right if I don't switch on SEO.

When I switch on SEO in a submap, it does not work and then I get also the strange behaviour for register.php and login.php (and maybe others with input fields), but the cart works.

Besides when working in a submap I get the error for "Header always set Permissions-Policy "interest-cohort=()" but that seems no problem, just set ## in the .htacces in front of that setting.

I go to ask my provider to look to the problem SEO not working in a submap .. yes I had change that in the .htaccess ..

New member

Posts

Joined
Thu Jan 11, 2018 5:22 am

Post by sfsf99 » Sat Nov 11, 2023 9:48 am

Ok provider has fixed this, but there is still an error and login / registering still not working.

The url with seo is now e.g. : /webshop/jurken/Alaz010080?route=product/product&language=nl-nl

It should be /webshop/jurken/Alaz010080

My provider wrote, this is a webbuilders problem, and still the strange errors in network during debugging :

- see attachment
- you see 2 lines one with 301 (redirect) and than 200, happens every time with enter

As I wrote before, without a submap there is no problem!

Attachments

example.png

example.png (251.24 KiB) Viewed 5165 times


New member

Posts

Joined
Thu Jan 11, 2018 5:22 am

Post by ADD Creative » Sat Nov 11, 2023 4:32 pm

Looks like there is still something wrong with your config.php files and .htaccess. Post them here if you want others to check them.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by sfsf99 » Fri Nov 17, 2023 6:48 am

Here the files you asked, just the standard files delivered by OC 4.0.2.3

I shall try later to do a standard installation again in another map (now map "webshop") .. you never know ..

I just added an order with the cart and that works without problems.

New member

Posts

Joined
Thu Jan 11, 2018 5:22 am

Post by sfsf99 » Fri Nov 17, 2023 9:00 am

The problem is analysed now.

It is the seo language link.

With a fresh installation in a root map everything goes fine with all defaults, also with a second language.

With a fresh installation in a submap it goes fine with the English language, it goes wrong with a second language.

If you create a specific seo link for the second laguage, e.g. Dutch, you get /webshop/nl-nl/ etc., than the problem is gone (old link was /webshop/?route=account/register&language=nl-nl)

In my original shop in a submap it was going wrong for all languages also for English. When I create a specific seo link as above for every language, the problem is gone. I don't know why that link in English was not there, because it is defined in the fresh installation, maybe I was removing examples etc. and maybe I removed that link in the database.

But I have in my original shop in a submap still the strange seo link for categories and products like e.g. /webshop/en-gb/dresses?route=product/category in stead of /webshop/en-gb/dresses (category dresses etc.)

So the bug is, when you create a fresh installation in a submap and don't create a specific seo link for a (second) language like /webshop/nl-nl you get the strange behaviour as I described in this topic.

New member

Posts

Joined
Thu Jan 11, 2018 5:22 am

Post by paulohsrocha » Wed Jul 24, 2024 11:36 pm

It looks like I'm having the same problem here.

The forms do not send the data, it is as if they were not used.

Following what you reported, disabling SEO URL everything works normally.

But I couldn't solve it.

How did you actually solve the problem? Could you reproduce it step by step?

Newbie

Posts

Joined
Wed Jul 24, 2024 10:55 pm

Post by paulohsrocha » Thu Jul 25, 2024 12:37 am

I managed to solve it, it's very simple!

When adding another language and using SEO URL, Opencart does not create the SEO URL for this new language.

In Panel > Design > SEO URL I added the SEO for my language, in my case pt-br, it looked like this:

Key: language
Value: pt-br
Keyword: pt-br
Sort Order: -2

I hope it helps anyone who needs it.

Newbie

Posts

Joined
Wed Jul 24, 2024 10:55 pm
Who is online

Users browsing this forum: No registered users and 4 guests