Jump to content
spidometrs

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo

Recommended Posts

14 hours ago, Jack_mcs said:

Yes, I did. But it looks like I didn't include the changed file in the latest upload. Please try the attached file and let me know how it goes.

seo.class.php

Perfect Jack! All working as should. Thanks ever so much for the update.

Share this post


Link to post
Share on other sites
On 9/22/2021 at 3:52 AM, Jack_mcs said:

A new version has been uploaded with these changes. Tested through Phoenix 1.0.8.6 and php 8.

  • Added version for Phoenix .0.8.0 and above.
  • Changed code for php 7.4 warnings.
  • Fixed mistake with the uninstall code.
  • Replaced HTTP/1.x protocol checks with $_SERVER['SERVER_PROTOCOL'].

 

Hi dear; is it possible we have the multi language urls with the lanuage folder name in url prior to the actual product name instead like below?

https://www.xxx.com/de/yy-yy-130.html

Share this post


Link to post
Share on other sites

Hi;

Also I am getting this error on install dear version 1.0.8.6 phoenix , I used the fresh seo.class file you shared here in forum-

Undefined index: QUERY_STRING in /xx/xx/xx/includes/classes/seo.class.php on line 2599

Share this post


Link to post
Share on other sites
9 hours ago, radhavallabh said:

is it possible we have the multi language urls with the lanuage folder name in url prior to the actual product name

There's nothing in the code that would allow that. It should be possible to insert the language anywhere in the code where a link is created though I've never tried it. 

 

8 hours ago, radhavallabh said:

Undefined index: QUERY_STRING

That's strange. While none of the SERVER variables are guaranteed to be present, there is a standard that lists items that should be present and that is one of them. I can only think it is something specific to your server since it has never come up before. To prevent it, you can change this line

$this->real_uri = ltrim( basename($_SERVER['SCRIPT_NAME']) . '?' . $_SERVER['QUERY_STRING'], '/' );

to this

$this->real_uri = ltrim( basename($_SERVER['SCRIPT_NAME']) . ( isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : ''), '/' );

 

Share this post


Link to post
Share on other sites
13 hours ago, Jack_mcs said:

There's nothing in the code that would allow that. It should be possible to insert the language anywhere in the code where a link is created though I've never tried it. 

 

That's strange. While none of the SERVER variables are guaranteed to be present, there is a standard that lists items that should be present and that is one of them. I can only think it is something specific to your server since it has never come up before. To prevent it, you can change this line


$this->real_uri = ltrim( basename($_SERVER['SCRIPT_NAME']) . '?' . $_SERVER['QUERY_STRING'], '/' );

to this


$this->real_uri = ltrim( basename($_SERVER['SCRIPT_NAME']) . ( isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : ''), '/' );

 

Hi thank you for the reply dear;

I used the code you gave and the error disappeared.

But dear when I click the product link on shopping cart page it redirects to the index page instead;

Please can you help me understand and fix the issue...

Thank you so much in advance;

Warm Regds./

radhavallabh

Share this post


Link to post
Share on other sites
4 hours ago, radhavallabh said:

Hi thank you for the reply dear;

I used the code you gave and the error disappeared.

But dear when I click the product link on shopping cart page it redirects to the index page instead;

Please can you help me understand and fix the issue...

Thank you so much in advance;

Warm Regds./

radhavallabh

Fixed it dear.. it was a curly braces issue from server.

Share this post


Link to post
Share on other sites

Hi dear;

It seems that it has stopped working on 1.0.8.7 any ideas what the issue may be???

Your help is deeply appreciated dear...

Regds./

radhavallabh

Share this post


Link to post
Share on other sites
5 hours ago, radhavallabh said:

It seems that it has stopped working on 1.0.8.7

Have you installed the latest version and applied the fix mentioned in this thread?

Share this post


Link to post
Share on other sites
11 hours ago, Jack_mcs said:

Have you installed the latest version and applied the fix mentioned in this thread?

Yes dear I installed the latest version and updated the seo.class.php as well;

It worked on 1.0.8.6 but ever since I updated to 1.0.8.7 the addon has stopped functioning dear.

Your help and guidance shall be deeply appreciated dear;

regds./

radhavallabh

Share this post


Link to post
Share on other sites

@radhavallabhIt is working here for that version and others has it working in their shops so it must be something in your installation. Maybe you overwrote the href_link.php file with the upgrade? If that isn't it, are you getting any errors? Do the settings show up in admin?

Share this post


Link to post
Share on other sites
16 hours ago, Jack_mcs said:

@radhavallabhIt is working here for that version and others has it working in their shops so it must be something in your installation. Maybe you overwrote the href_link.php file with the upgrade? If that isn't it, are you getting any errors? Do the settings show up in admin?

Hi dear;

No I am using the same file as provided for the href_link.php,

I just checked dear in most place the tep_href_link function has been replaced with $GLOBALS['Linker']->build ....... Is that the issue ??

I checked more thoroughly on the store  for debugging.....the New Arrivals box on my Index page has the old code with tep_href_link function so those links are displaying the SEO URLS correctly...

The Error console is not showing any error for now.

Settings do show up in the admin properly.

Please guide me on how to proceed;

Regds./

radhavallabh

Edited by radhavallabh

Share this post


Link to post
Share on other sites
12 hours ago, radhavallabh said:

No I am using the same file as provided for the href_link.php,

This is not clear to me. Are you using the file from the addon package or from the Phoenix package?

I just compared a .87 shop I have it installed in with the files from the Phoenix package and they are the same, except for what this addon changes, and the urls are working fine in it so I can't think of any reason why it is failing for you.

Share this post


Link to post
Share on other sites
On 11/24/2021 at 12:40 AM, Jack_mcs said:

This is not clear to me. Are you using the file from the addon package or from the Phoenix package?

I just compared a .87 shop I have it installed in with the files from the Phoenix package and they are the same, except for what this addon changes, and the urls are working fine in it so I can't think of any reason why it is failing for you.

Using the addon file dear.. but still am not able to understand why does my site fail to work...

Share this post


Link to post
Share on other sites

@radhavallabhSince it works in other shops but not yours, it must be something unique to yours. If you turn the addon off in admin do all of the urls work correctly? If it does, try using the Uninstall setting and then reload the shop side. Does that fix it? If not, try turning off all cache options in the settings and try again. If it still fails then the only thing I can think to do is to install it into a new, basic, shop. That should work since it works here. Then you can try it with your database and if it fails, then it is something there that is causing the problem.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×