Post by flamingo45 » Sat Sep 28, 2024 10:58 pm

OC 4.0.2.3
PHP 8.1
Works perfectly without SEO.

The following errors appear with SEO:
- Attempting to delete a product in shopping cart results in error "Cannot find product".
- Attempting to log in as a real customer results in error "Customer not found"
- Registering, error "too few characters" occurs for the first name, last name, email and password even they are valid entries

The error folder says nothing about these errors.

Where could the error be? Thank you for help!
Last edited by flamingo45 on Fri Oct 04, 2024 11:14 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri Feb 10, 2017 3:50 pm

Post by chongshengdz » Mon Sep 30, 2024 2:52 am

for a quick resolution, you can check your php error log.

https://www.ectransistors.com/
https://www.transistormosfet.com/


Active Member

Posts

Joined
Sat Apr 12, 2014 10:18 pm


Post by paulfeakins » Mon Sep 30, 2024 7:24 pm

flamingo45 wrote:
Sat Sep 28, 2024 10:58 pm
OC 4.0.2.3
This version isn't really recommended yet.

Instead use 3.0.4.0.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by flamingo45 » Thu Oct 03, 2024 12:34 am

chongshengdz wrote:
Mon Sep 30, 2024 2:52 am
for a quick resolution, you can check your php error log.
For understandable reasons, there are no error logs. The OC program runs completely normally and, when checked, finds that the variables are not as they should be. In fact, in all three cases correct data are entered into the (frontend) form but then processed incorrectly somewhere.

Newbie

Posts

Joined
Fri Feb 10, 2017 3:50 pm

Post by ADD Creative » Thu Oct 03, 2024 4:20 pm

flamingo45 wrote:
Sat Sep 28, 2024 10:58 pm
OC 4.0.2.3
PHP 8.1
Works perfectly without SEO.

The following errors appear with SEO:
- Attempting to delete a product in shopping cart results in error "Cannot find product".
- Attempting to log in as a real customer results in error "Customer not found"
- Registering, error "too few characters" occurs for the first name, last name, email and password even they are valid entries

The error folder says nothing about these errors.

Where could the error be? Thank you for help!
None of those errors actually appear in the OpenCart code. Maybe you just haven't posted the actual errors and just a approximation. It would be helpful to post the actual wording of errors and in what form they appear.

If you haven't already. You need to check the both the PHP error log and the OpenCart error log. Ask you host if you don't know where to find the PHP error log or use phpinfo().

You could also check your web browser's developer console for messages.

Are you using a theme or any extensions?

www.add-creative.co.uk


Guru Member

Posts

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

Post by flamingo45 » Thu Oct 03, 2024 9:35 pm

Thanks to everyone for the support.

Here is the link to a test installation. https://shoptest.anerilol.myhostpoint.ch/tshop/
Access is blocked for certain countries.

Steps to Error 1
- Customer account
- Register
- Fill out the form
- Continue
Image: registrieren

Error 2
- Add product to shopping cart
- Checkout
- Register new customer account
- Fill out form
- Continue
- Registration is confirmed
- Switch to customer account
- Log in
- Log in previously registered customer
Image: einloggen

Error 3
- Add a product to shopping cart
- Shopping cart
- Increase quantity or remove product
Image: cart-product

Hoster Errorlogs
[Thu Oct 03 07:00:42.406561 2024] [rewrite:error] [pid 498:tid 37812520192] [client 66.249.64.129:50200] AH10411: Rewritten query string contains control characters or spaces
[Thu Oct 03 11:02:51.540617 2024] [autoindex:error] [pid 72151:tid 37765954816] [client 66.249.64.129:50297] AH01276: Cannot serve directory /home/anerilol/www/shop-test/: No matching DirectoryIndex (index.html,index.wml,index.cgi,index.shtml,index.js,index.php,index.phtml,index.php4,index.htm,default.html,default.htm,home.htm,defaultpage.php) found, and server-generated directory index forbidden by Options directive
[Thu Oct 03 11:02:51.756418 2024] [autoindex:error] [pid 72153:tid 37819612160] [client 66.249.64.129:43518] AH01276: Cannot serve directory /home/anerilol/www/shop-test/: No matching DirectoryIndex (index.html,index.wml,index.cgi,index.shtml,index.js,index.php,index.phtml,index.php4,index.htm,default.html,default.htm,home.htm,defaultpage.php) found, and server-generated directory index forbidden by Options directive

OC error logs after provoking the error is empty.

Again, without SEO the program is free from errors.

Attachments

einloggen.jpg

einloggen.jpg (75.76 KiB) Viewed 986 times

cart-product.jpg

cart-product.jpg (57.44 KiB) Viewed 986 times

registrieren.jpg

registrieren.jpg (156.26 KiB) Viewed 986 times


Newbie

Posts

Joined
Fri Feb 10, 2017 3:50 pm

Post by ADD Creative » Thu Oct 03, 2024 11:43 pm

The problem is with your config URL, a redirect in your htaccess or an extension your are using.

The register form is doing a POST to "/tshop?route=account/register.register&language=de-ch". However that is getting redirected to "/tshop/?route=account/register.register&language=de-ch" (note the extra /). The redirect will remove all the POST data, which is just like submitting a blank form.

The errors you posted are related to you htaccess, which suggests the problem is in there.

www.add-creative.co.uk


Guru Member

Posts

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

Post by flamingo45 » Fri Oct 04, 2024 5:15 pm

Thank you for your informations.
The argument seems completely plausible.
But I can't see anywhere where this slash comes from.
The htaccess file corresponds to the new state and has the following content regarding rewrite:

Code: Select all

## SEO URL Settings
RewriteEngine On
## If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /tshop/
## Rewrite Rules
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|webp|js|css|svg)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
/tshop/ change to /tshop does not solve the problem.

No 3-party extension is activated.
Only the German language extension. I only find text translations in it.

Where could the slash come from?

Newbie

Posts

Joined
Fri Feb 10, 2017 3:50 pm

Post by ADD Creative » Fri Oct 04, 2024 6:20 pm

It could be a missing entry for your language extension in the SEO URLs. Go to Design -> SEO URL and filter by key -> language. You should have an entry for each language.

www.add-creative.co.uk


Guru Member

Posts

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

Post by flamingo45 » Fri Oct 04, 2024 11:25 pm

Many thanks ADD Creative for the helpful informations.

The entry in the seo_url DB table was:
key: de-ch
value: language
keyword: de-ch

In a virgin OC installation, this entry looks like this:
key: language
value: de-ch
keyword: de-ch

Correcting this entry eliminated all three listed errors. I don't know how that happened.

As a note: When the German language was installed, the same entry was automatically made in the seo-url table for the German languageas as for the English language. This had to be changed manually to the newly installed language. de-ch in my case.

Newbie

Posts

Joined
Fri Feb 10, 2017 3:50 pm
Who is online

Users browsing this forum: No registered users and 3 guests