Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

A new version has been uploaded with these changes:

  • Added a version for Phoenix 1.0.8.9 and above.
  • Fixed problem that could cause "Headers Already Sent" failures.

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

Just installed Ultimate SEO 2-2.2d-24 as per instructions on ms 2.3.4. Great contribution, except one problem. No configuration database entries have been entered into database, thus no  Configuration => SEO URLs and therefore cannot configure. Code is in the seo.class.php file - so unsure why entries not being added...

Apart from the fact that 'as installed' the contribution does exactly as I needed so I don't need to configure any options - I thought it might be a good idea to feedback, as others may have similar problem.

Link to comment
Share on other sites

@lee the beanThanks for posting. The code in the addon can't work if the database entries are missing so they must have been made. If possible, can you look in the confirguration_group and configuration tables in the database to see if there are entries for it?  Also, it might not work correctly if you use the wrong version so please be sure you used the version in the "Not Phoenix" directory.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

30 minutes ago, lee the bean said:

Definitely not there,

Then, as far as I know, the addon should not work. This isn't something I can help with since it requires looking at the database. If it is working for you and the default settings are fine then you can run that way.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

2 hours ago, Jack_mcs said:

Then, as far as I know, the addon should not work. This isn't something I can help with since it requires looking at the database. If it is working for you and the default settings are fine then you can run that way.

Added contribution to a second server - with exactly the same results. Cache table added, seo urls working (categories, products and manufacturers), no option to configure seo options from the Configuration menu, no entries added to configuration table. No errors in php.log, MariaDB.log or Apache.log (only nicely formed urls).

Link to comment
Share on other sites

21 hours ago, lee the bean said:

Added contribution to a second server - with exactly the same results. Cache table added, seo urls working (categories, products and manufacturers), no option to configure seo options from the Configuration menu, no entries added to configuration table. No errors in php.log, MariaDB.log or Apache.log (only nicely formed urls).

So here's the fix - reverted php versions back 5.6.40, 7.0.33, 7.1.33 to no avail, but at least it eliminates php versions.

Found entry with same issue here : [CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo - Page 299 - General Add-Ons Support - osCommerce Community Forum
Amended seo.class.php as per "In function __construct(){ replace all '' values for configuration_id with NULL"
Refreshed product page and whoopydo the link and database entries have now been added.

A new issue:

Setting Enable SEO Urls to false reverts to default urls, except the one category that had already been accessed via an SEO url. Hovering over link - and the link has reverted back, but clicking on it reveals a redirect to the SEO url version. All other category urls behave, even after accessing via SEO. Renamed the .htaccess file, and the category 404's (still accessing the SEO url version). Tried resetting the SEO Url Cache - but to no avail. Stumped on this one (dont like niggling problems like this). The offending category is on sort order 0.

For educational purposes, can someone explain the cache database in simple terms. Does this look ok (don't have the extra addons so not present in database) so only 3 entries.236587489_Screenshot2022-03-01150550.thumb.png.ca68d90542c37c11b5797d2e89595955.png

Link to comment
Share on other sites

The change you made shouldn't have been necessary. I suspect your database server is in strict mode since that will cause problems like this. Still, the code should be able to handle that so I will make a change to it in the next version to account for it.

Regarding the urls not changing, my guess is that you have that link hard-coded to use the rewritten one. But it shouldn't matter because the code will serve a standard url and issue a 301.

The cache is used to store a copy of the url's. Without it the url's have to be rewritten on every page load. In the beginning of this addon having cache enabled could make a big difference.  But nowadays with faster servers and better php code it doesn't make a big difference. Also, the cache code stored all of the url's at once so on sites with a large number of products using cache can slow the site down significantly. So if you have a small number of products you can leave the settings as they are or turn them off and it probably won't make a big difference either way. But if you have a large number of products you may need to turn off caching, at least for the products.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

16 hours ago, Jack_mcs said:

The change you made shouldn't have been necessary. I suspect your database server is in strict mode since that will cause problems like this. Still, the code should be able to handle that so I will make a change to it in the next version to account for it.

Regarding the urls not changing, my guess is that you have that link hard-coded to use the rewritten one. But it shouldn't matter because the code will serve a standard url and issue a 301.

The cache is used to store a copy of the url's. Without it the url's have to be rewritten on every page load. In the beginning of this addon having cache enabled could make a big difference.  But nowadays with faster servers and better php code it doesn't make a big difference. Also, the cache code stored all of the url's at once so on sites with a large number of products using cache can slow the site down significantly. So if you have a small number of products you can leave the settings as they are or turn them off and it probably won't make a big difference either way. But if you have a large number of products you may need to turn off caching, at least for the products.

The single category URL not reverting back to default URL when contribution disabled has disappeared (today), no hardcoded links are/were present.

 

Testing uncovered 2 more possible bugs:

1. Uninstall option breaks with:

[02-Mar-2022 07:42:36 Europe/London] PHP Warning:  array_merge(): Argument #2 is not an array in admin\configuration.php on line 79
[02-Mar-2022 07:42:36 Europe/London] PHP Stack trace:
[02-Mar-2022 07:42:36 Europe/London] PHP   1. {main}() admin\configuration.php:0
[02-Mar-2022 07:42:36 Europe/London] PHP   2. array_merge() admin\configuration.php:79
[02-Mar-2022 07:42:36 Europe/London] PHP Warning:  reset() expects parameter 1 to be array, null given in admin\includes\classes\object_info.php on line 22
[02-Mar-2022 07:42:36 Europe/London] PHP Stack trace:
[02-Mar-2022 07:42:36 Europe/London] PHP   1. {main}() admin\configuration.php:0
[02-Mar-2022 07:42:36 Europe/London] PHP   2. objectInfo->__construct() admin\configuration.php:80
[02-Mar-2022 07:42:36 Europe/London] PHP   3. objectInfo->objectInfo() admin\includes\classes\object_info.php:18
[02-Mar-2022 07:42:36 Europe/London] PHP   4. reset() admin\includes\classes\object_info.php:22
[02-Mar-2022 07:42:36 Europe/London] PHP Warning:  Variable passed to each() is not an array or object in admin\includes\classes\object_info.php on line 23
[02-Mar-2022 07:42:36 Europe/London] PHP Stack trace:
[02-Mar-2022 07:42:36 Europe/London] PHP   1. {main}() admin\configuration.php:0
[02-Mar-2022 07:42:36 Europe/London] PHP   2. objectInfo->__construct() admin\configuration.php:80
[02-Mar-2022 07:42:36 Europe/London] PHP   3. objectInfo->objectInfo() admin\includes\classes\object_info.php:18
[02-Mar-2022 07:42:36 Europe/London] PHP   4. each() admin\includes\classes\object_info.php:23

line 79/80

      $cInfo_array = array_merge($configuration, $cfg_extra);
      $cInfo = new objectInfo($cInfo_array);

2. Using profile query while performance checker off - with  code in application_bottom.php breaks with:

[02-Mar-2022 07:46:16 Europe/London] PHP Warning:  Division by zero in \includes\classes\seo.class.php on line 1819
[02-Mar-2022 07:46:16 Europe/London] PHP Stack trace:
[02-Mar-2022 07:46:16 Europe/London] PHP   1. {main}() \product_info.php:0
[02-Mar-2022 07:46:16 Europe/London] PHP   2. require() \product_info.php:415
[02-Mar-2022 07:46:16 Europe/London] PHP   3. SEO_URL->profile() \includes\application_bottom.php:35
[02-Mar-2022 07:46:16 Europe/London] PHP   4. SEO_URL->calculate_performance() \includes\classes\seo.class.php:1804
[02-Mar-2022 07:47:46 Europe/London] PHP Warning:  Division by zero in \includes\classes\seo.class.php on line 1819
[02-Mar-2022 07:47:46 Europe/London] PHP Stack trace:
[02-Mar-2022 07:47:46 Europe/London] PHP   1. {main}() \product_info.php:0
[02-Mar-2022 07:47:46 Europe/London] PHP   2. require() \product_info.php:415
[02-Mar-2022 07:47:46 Europe/London] PHP   3. SEO_URL->profile() \includes\application_bottom.php:35
[02-Mar-2022 07:47:46 Europe/London] PHP   4. SEO_URL->calculate_performance() \includes\classes\seo.class.php:1804

Edited by lee the bean
Link to comment
Share on other sites

4 hours ago, lee the bean said:

1. Uninstall option breaks with:

If you are still in the SEO UR:s section in admin that is normal since that entry no longer exists after deleting. 

 

5 hours ago, lee the bean said:

2. Using profile query while performance checker off - with  code in application_bottom.php breaks with:

That's probably because you used the optional performance code. That has not been supported in years.so I don't suggest using it. It can be fixed but not something I will do in a support thread.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 1 month later...
On 2/19/2022 at 7:55 PM, Jack_mcs said:

A new version has been uploaded with these changes:

  • Added a version for Phoenix 1.0.8.9 and above.
  • Fixed problem that could cause "Headers Already Sent" failures.

 

Hi dear; The new link building in the latest versions code uses as below for making links in the tep_href_link - Even we need use same format for links in other addons, Will your Seo URL addon support same link building function dear?
Guarantor::ensure_global('Linker')->build($page, phoenix_parameterize($parameters), $add_session_id);
  }

Link to comment
Share on other sites

Also I get error on installing on 1.0.8.13 - 

Undefined index: QUERY_STRING in /hermes/walnacweb06/walnacweb06ae/b527/moo.radhav/ShriGanesha/includes/classes/seo.class.php on line 2599 on every page

and when I click add a review link after login it just refreshes the page does not move to that review page.

 

Link to comment
Share on other sites

7 hours ago, radhavallabh said:

Will your Seo URL addon support same link building function dear?

It is planned but I don't know when. The class you mentioned has to be overridden most likely. There is probably a way to do that but I haven't gone through the code.

 

7 hours ago, radhavallabh said:

Undefined index: QUERY_STRING in

See if this post helps.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...
On 4/13/2022 at 12:57 AM, radhavallabh said:

Will your Seo URL addon support same link building function dear?

Please see the PM I sent you.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 weeks later...
On 12/24/2021 at 3:12 PM, artfulweb said:

Hello Jack and happy holidays,

I too have the same problem. Tried it on a vanilla installation of Phoenix 1.0.8.7 as well as a modified version that already had it installed and working before upgrading to 1.0.8.7 and it does not rewrite. In my logs on both sites I am getting :

=============

 PHP Warning:  Cannot modify header information - headers already sent by (output started at /xxx/xx/xx/xx/templates/default/includes/components/template_top.php:26) in /xx/xx/xx/xx/includes/classes/seo.class.php on line 2908
PHP Warning:  Cannot modify header information - headers already sent by (output started at /xx/xx/xx/xx/templates/default/includes/components/template_top.php:26) in /xx/xx/xx/xx/includes/classes/seo.class.php on line 2910

=============

Have cleared all caches, rechecked my htacces file, uninstalled, reinstalled and still no rewrite. As the vanilla install has no modifications I just do not understand.

 

Thanks
 

I have exactly that as well will latest CE Phoenix v1.0.8.14 

PHP Version 7.4.29 (Zend 3.4.0)

 

Did anyone find a cure?

Link to comment
Share on other sites

1 hour ago, petbeemer said:

Did anyone find a cure?

Yes, sort of. I have a working be version except there is a problem with shopping cart links that have attributes. I will post here when that have been fixed.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

6 hours ago, petbeemer said:

I have exactly that as well will latest CE Phoenix v1.0.8.14 

PHP Version 7.4.29 (Zend 3.4.0)

 

Did anyone find a cure?

Hi Jack, hi Peter,

I just did a new test site with a vanilla version of Phoenix 1.0.8.1.4 and your latest version of Ultimate SEO URLs with no other addons for the moment and it works. I can only assume that my original problem must have had some relation to another add-on as this test site is on the same server as the last and in a subfolder as was the last. A mystery for me but it is working just great.

Link to comment
Share on other sites

Glad you got it to work. The latest uploaded version will work through 1.0.8.5, or so but not in later versions.

Edited by Jack_mcs

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

22 hours ago, Jack_mcs said:

Yes, sort of. I have a working be version except there is a problem with shopping cart links that have attributes. I will post here when that have been fixed.

Thats odd because the original version i used worked fine apart from no-one could check out products at the end, it just looped back to product

Link removed

Edited by Jack_mcs
Link to comment
Share on other sites

@petbeemerThat is a different addon than this one so I can't comment on how well, or if, it works. You should ask in its support thread.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

1 minute ago, Jack_mcs said:

@petbeemerThat is a different addon than this one so I can't comment on how well, or if, it works. You should ask in its support thread.

Yes i realise that, i was just mentioning that both addons seem to have similar issues i.e on the cart side when the last few update of Phoenix came out

Link to comment
Share on other sites

1 minute ago, petbeemer said:

on the cart side when the last few update of Phoenix came out

That's because the code in Pheonix was changed to handle the links differently as well as how the attributes are handled. As mentioned, I have made a change to fix the first but haven't had time for the second. Maybe the person handling that addon will.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 months later...

HI Jack @Jack_mcs I am having a problem with the latest version of this addon installed on to a phoenix 1/0/7/11 store running php 7/4.

In the error logs I am getting lots of the following error. This error has been present for a long while now and I am only now trying to sort it out.

Quote

[18-Aug-2022 08:26:07 UTC] PHP Notice:  Trying to access array offset on value of type null in /home/####/#####/includes/classes/seo.class.php on line 1138

Line 1138 is

                                $pName = $this->strip( $result['pName'] );

If I turn off seo urls the error is not present.

I have checked the install and all files are in the correct places and I cannot see any files or code remaining from any updates. 

Any idea what may be causing this?

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...