Post by ADD Creative » Thu Dec 24, 2020 12:39 am

Generated here.
https://github.com/opencart/opencart/bl ... p.php#L154

And also here.
https://github.com/opencart/opencart/bl ... p.php#L180

The could log the value to check it. In admin/controller/extension/payment/squareup.php, after.

Code: Select all

$data['payment_squareup_redirect_uri'] = str_replace('&', '&', $this->url->link('extension/payment/squareup/oauth_callback', '', true));
Add.

Code: Select all

$this->log->write('payment_squareup_redirect_uri ' . $data['payment_squareup_redirect_uri']);
Then go to the module and then look in your logs.

You could also do the same for $redirect_uri system/library/squareup.php.

www.add-creative.co.uk


Expert Member

Posts

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

Post by pm-netti » Tue May 04, 2021 1:30 pm

This problem was encountered on a client's site.
The problem is reflected in the source code.
Image
The problem return this code in libary/url.php:

Code: Select all

public function link($route, $args = '', $secure = false) {
		if ($this->ssl && $secure) {
			$url = $this->ssl . 'index.php?route=' . $route;
		} else {
			$url = $this->url . 'index.php?route=' . $route;
		}
		
		if ($args) {
			if (is_array($args)) {
				$url .= '&' . http_build_query($args);
			} else {
				$url .= str_replace('&', '&', '&' . ltrim($args, '&'));
			}
		}
		
		foreach ($this->rewrite as $rewrite) {
			$url = $rewrite->rewrite($url);
		}
		
		return $url; 
	}
Does anyone know why eg. that $this->url or $this-> ssl returns "1"?
Or can the join fault be in that $this->rewrite loop?

Ps. New finding. Once SSL is forced on, all links will read "1index.php".
Ps 2. This is the front page of the store, in that respect it is not related to previous posts.
Last edited by pm-netti on Thu May 06, 2021 11:13 pm, edited 2 times in total.

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by ADD Creative » Tue May 04, 2021 5:19 pm

For admin it's here. https://github.com/opencart/opencart/bl ... k.php#L116
Which takes the value from here. https://github.com/opencart/opencart/bl ... min.php#L3
Which takes the value from admin/config.php.

For catalog it's here.
https://github.com/opencart/opencart/bl ... up.php#L39
Which takes the value from the database or configs.

This would suggest your issue is caused by a modification or a corrupt configuration.

www.add-creative.co.uk


Expert Member

Posts

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

Post by xxvirusxx » Tue May 04, 2021 5:45 pm

@pm-netti

Something wrong in your config files.
Products images doesn't load.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by straightlight » Tue May 04, 2021 7:08 pm

Also ensure your .htaccess file is properly configured especially if using SEOs.

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 pm-netti » Tue May 04, 2021 10:14 pm

ADD Creative wrote:
Tue May 04, 2021 5:19 pm
For admin it's here. https://github.com/opencart/opencart/bl ... k.php#L116
Which takes the value from here. https://github.com/opencart/opencart/bl ... min.php#L3
Which takes the value from admin/config.php.

For catalog it's here.
https://github.com/opencart/opencart/bl ... up.php#L39
Which takes the value from the database or configs.

This would suggest your issue is caused by a modification or a corrupt configuration.
This is my store of my client.
I now turned SSL off, meaning its value is '0'.
The front page links are now working properly.
But the home page search form doesn’t work, it still takes SSL by default, even if it’s not turned on.
This will result in the application form redirecting to page 0index.php.
It is also clear here that the '1' in question came from the config_ssl setting in the past.

Another problem is the use of an admin login form.
The common / login.php file does not recognize the submission of the form at all.
The "POST" form looks like this:

Code: Select all

array();

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by ADD Creative » Wed May 05, 2021 5:46 am

The SSL setting in the settings has never done anything in version 3. It looks like someone has tried to fix this and made a mess of things. You would be best to compare against a clean download to see what modifications have been made.

www.add-creative.co.uk


Expert Member

Posts

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

Post by pm-netti » Wed May 05, 2021 10:15 pm

ADD Creative wrote:
Wed May 05, 2021 5:46 am
The SSL setting in the settings has never done anything in version 3. It looks like someone has tried to fix this and made a mess of things. You would be best to compare against a clean download to see what modifications have been made.
I downloaded the database to my own server and installed the pure OC 3.0.3.2 version.
There are no problems with these issues raised here.
Another strange dilemma is that the Seo Url does not work. The file seo_url is completely Ok.
Can this affect my php version 7.4?

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by straightlight » Wed May 05, 2021 10:31 pm

pm-netti wrote:
Wed May 05, 2021 10:15 pm
ADD Creative wrote:
Wed May 05, 2021 5:46 am
The SSL setting in the settings has never done anything in version 3. It looks like someone has tried to fix this and made a mess of things. You would be best to compare against a clean download to see what modifications have been made.
I downloaded the database to my own server and installed the pure OC 3.0.3.2 version.
There are no problems with these issues raised here.
Another strange dilemma is that the Seo Url does not work. The file seo_url is completely Ok.
Can this affect my php version 7.4?
Please read my post above. As for the SSL option, ensure your SSL setting is enabled from your OC admin > systems > settings > edit settings > server tab.

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 ADD Creative » Thu May 06, 2021 12:36 am

pm-netti wrote:
Wed May 05, 2021 10:15 pm
I downloaded the database to my own server and installed the pure OC 3.0.3.2 version.
There are no problems with these issues raised here.
Another strange dilemma is that the Seo Url does not work. The file seo_url is completely Ok.
Can this affect my php version 7.4?
It a clean install doesn't have issues, you may want to check the following on the site for modifications, both directly to the file and in system/storage/modification. Looking for any changes to the config_secure or config_ssl settings.

system/framework.php
admin/controller/setting/setting.php
admin/controller/setting/store.php
admin/view/template/setting/setting.twig
admin/view/template/setting/store_form.twig
catalog/controller/startup/startup.php

www.add-creative.co.uk


Expert Member

Posts

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

Post by pm-netti » Thu May 06, 2021 1:42 pm

ADD Creative wrote:
Thu May 06, 2021 12:36 am
pm-netti wrote:
Wed May 05, 2021 10:15 pm
I downloaded the database to my own server and installed the pure OC 3.0.3.2 version.
There are no problems with these issues raised here.
Another strange dilemma is that the Seo Url does not work. The file seo_url is completely Ok.
Can this affect my php version 7.4?
It a clean install doesn't have issues, you may want to check the following on the site for modifications, both directly to the file and in system/storage/modification. Looking for any changes to the config_secure or config_ssl settings.

system/framework.php
admin/controller/setting/setting.php
admin/controller/setting/store.php
admin/view/template/setting/setting.twig
admin/view/template/setting/store_form.twig
catalog/controller/startup/startup.php
This is strange.
When SSL is on, the page has text: "The page you requested cannot be found!"
Should you try to change the contents of the 'setting' table completely, eg from the file 'opencart.sql'?

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by pm-netti » Thu May 06, 2021 4:48 pm

I just edited the sql script in OC's pure 'setting' table and modified a few settings to match the store settings.
I noticed one strange line in the trade setting.sql file.
It also has some rows of 3-party extensions. It looks like one of these rows of extensions is broken.
I have an script-editor that shows the text in roughly gold, but the text on one line is all white. Can this suggest that not everything in it is all right?

Ps. Setting table is changed. The same problem persists, Seo url cannot find categories and products.

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by straightlight » Thu May 06, 2021 6:25 pm

pm-netti wrote:
Thu May 06, 2021 4:48 pm
I just edited the sql script in OC's pure 'setting' table and modified a few settings to match the store settings.
I noticed one strange line in the trade setting.sql file.
It also has some rows of 3-party extensions. It looks like one of these rows of extensions is broken.
I have an script-editor that shows the text in roughly gold, but the text on one line is all white. Can this suggest that not everything in it is all right?

Ps. Setting table is changed. The same problem persists, Seo url cannot find categories and products.
What line?
Did you enabled the SEO URL in your OC admin's settings page?
Did you enabled or modified your .htaccess file? If so, please post this file in BBCode.

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 pm-netti » Thu May 06, 2021 8:23 pm

straightlight wrote:
Thu May 06, 2021 6:25 pm
pm-netti wrote:
Thu May 06, 2021 4:48 pm
I just edited the sql script in OC's pure 'setting' table and modified a few settings to match the store settings.
I noticed one strange line in the trade setting.sql file.
It also has some rows of 3-party extensions. It looks like one of these rows of extensions is broken.
I have an script-editor that shows the text in roughly gold, but the text on one line is all white. Can this suggest that not everything in it is all right?

Ps. Setting table is changed. The same problem persists, Seo url cannot find categories and products.
What line?
Did you enabled the SEO URL in your OC admin's settings page?
Did you enabled or modified your .htaccess file? If so, please post this file in BBCode.
Thank you!
I had forgotten the htacess file but it was in txt format. Now works.
That 'setting' table line was for simple module. It seemed like some old, homemade json code.

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland

Post by straightlight » Thu May 06, 2021 10:37 pm

pm-netti wrote:
Thu May 06, 2021 8:23 pm
straightlight wrote:
Thu May 06, 2021 6:25 pm
pm-netti wrote:
Thu May 06, 2021 4:48 pm
I just edited the sql script in OC's pure 'setting' table and modified a few settings to match the store settings.
I noticed one strange line in the trade setting.sql file.
It also has some rows of 3-party extensions. It looks like one of these rows of extensions is broken.
I have an script-editor that shows the text in roughly gold, but the text on one line is all white. Can this suggest that not everything in it is all right?

Ps. Setting table is changed. The same problem persists, Seo url cannot find categories and products.
What line?
Did you enabled the SEO URL in your OC admin's settings page?
Did you enabled or modified your .htaccess file? If so, please post this file in BBCode.
Thank you!
I had forgotten the htacess file but it was in txt format. Now works.
That 'setting' table line was for simple module. It seemed like some old, homemade json code.
Now that the issue has been solved, please add: [SOLVED] at the beginning of the subject line on your first post.

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 pm-netti » Thu May 06, 2021 11:10 pm

straightlight wrote:
Thu May 06, 2021 10:37 pm
Now that the issue has been solved, please add: [SOLVED] at the beginning of the subject line on your first post.
Thanks. This problem has been solved on my part.
I moved the database and files to the customer store. The SSL ("1") issues on the front page have been posted.
The admin login page still has the same error, the form i.e. the login information is "empty". However, this error is deeper, i.e. at some server end.
:)

User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä, Finland
Who is online

Users browsing this forum: matteovisotto and 44 guests